Microchip Technology TDGL003 - chipKIT Max32 Development Board TDGL003 TDGL003 Data Sheet

Product codes
TDGL003
Page of 214
PIC32MX3XX/4XX
DS61143H-page 34
© 2011 Microchip Technology Inc.
2.9
Configuration of Analog and 
Digital Pins During ICSP 
Operations
If MPLAB ICD 2, 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 ADPCFG register.
The bits in this register that correspond to the Analog-
to-Digital pins that are initialized by MPLAB ICD 2, 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 Analog-to-
Digital pins as analog input pins during the debug
session, the user application must clear the
corresponding bits in the ADPCFG register during
initialization of the ADC module. 
When MPLAB ICD 2, ICD 3 or REAL ICE is used as a
programmer, the user application firmware must
correctly configure the ADPCFG register. Automatic
initialization of this register is only done during
debugger operation. Failure to correctly configure the
register(s) will result in all Analog-to-Digital 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.
Alternately, inputs can be reserved by connecting the
pin to V
SS
 through a 1k to 10k resistor and configuring
the pin as an input.