Datasheet
2009-2013 Microchip Technology Inc. DS60001156H-page 47
PIC32MX5XX/6XX/7XX
2.7 Trace
The trace pins can be connected to a hardware-trace-
enabled programmer to provide a compress real time
instruction trace. When used for trace the TRD3,
TRD2, TRD1, TRD0 and TRCLK pins should be
dedicated for this use. The trace hardware requires
a22 series resistor between the trace pins and the
trace connector.
2.8 External Oscillator Pins
Many MCUs have options for at least two oscillators: a
high-frequency primary oscillator and a low-frequency
secondary oscillator. Refer to Section 8.0 “Oscillator
Configuration” for details.
The oscillator circuit should be placed on the same side
of the board as the device. Also, place the oscillator cir-
cuit close to the respective oscillator pins, not exceed-
ing one-half inch (12 mm) distance between them. The
load capacitors should be placed next to the oscillator
itself, on the same side of the board. Use a grounded
copper pour around the oscillator circuit to isolate them
from surrounding circuits. The grounded copper pour
should be routed directly to the MCU ground. Do not
run any signal traces or power traces inside the ground
pour. Also, if using a two-sided board, avoid any traces
on the other side of the board where the crystal is
placed. A suggested layout is illustrated in Figure 2-3.
FIGURE 2-3: SUGGESTED OSCILLATOR
CIRCUIT PLACEMENT
2.9 Configuration of Analog and
Digital Pins During ICSP
Operations
If MPLAB ICD 3 or REAL ICE is selected as a
debugger, it automatically initializes all of the Analog-
to-Digital input pins (ANx) as “digital” pins by setting
all bits in the AD1PCFG register.
The bits in this register that correspond to the Analog-
to-Digital pins that are initialized by MPLAB ICD 3 or
REAL ICE, must not be cleared by the user application
firmware; otherwise, communication errors will result
between the debugger and the device.
If your application needs to use certain ADC pins as
analog input pins during the debug session, the user
application must clear the corresponding bits in the
AD1PCFG register during initialization of the ADC
module.
When MPLAB ICD 3 or REAL ICE is used as a pro-
grammer, the user application firmware must correctly
configure the AD1PCFG register. Automatic initializa-
tion of this register is only done during debugger oper-
ation. Failure to correctly configure the register(s) will
result in all ADC pins being recognized as analog input
pins, resulting in the port value being read as a logic ‘0’,
which may affect user application functionality.
2.10 Unused I/Os
Unused I/O pins should not be allowed to float as
inputs. They can be configured as outputs and driven
to a logic-low state.
Alternatively, inputs can be reserved by connecting the
pin to V
SS through a 1k to 10k resistor and configuring
the pin as an input.
Main Oscillator
Guard Ring
Guard Trace
Secondary
Oscillator