English
Language : 

PIC24HJ32GP302_12 Datasheet, PDF (141/390 Pages) Microchip Technology – 16-bit Microcontrollers (up to 128 KB Flash and 8K SRAM) with Advanced Analog
PIC24HJ32GP302/304, PIC24HJ64GPX02/X04 AND PIC24HJ128GPX02/X04
11.7 I/O Helpful Tips
1. In some cases, certain pins as defined in Table 28-
9 under “Injection Current”, have internal protec-
tion diodes to VDD and VSS. The term “Injection
Current” is also referred to as “Clamp Current”. On
designated pins, with sufficient external current
limiting precautions by the user, I/O pin input volt-
ages are allowed to be greater or less than the
data sheet absolute maximum ratings with nominal
VDD with respect to the VSS and VDD supplies.
Note that when the user application forward biases
either of the high or low side internal input clamp
diodes, that the resulting current being injected
into the device that is clamped internally by the
VDD and VSS power rails, may affect the ADC
accuracy by four to six counts.
2. I/O pins that are shared with any analog input pin,
(i.e., ANx), are always analog pins by default after
any reset. Consequently, any pin(s) configured as
an analog input pin, automatically disables the dig-
ital input pin buffer. As such, any attempt to read a
digital input pin will always return a ‘0’ regardless
of the digital logic level on the pin if the analog pin
is configured. To use a pin as a digital I/O pin on a
shared ANx pin, the user application needs to con-
figure the analog pin configuration registers in the
ADC module, (i.e., ADxPCFGL, AD1PCFGH), by
setting the appropriate bit that corresponds to that
I/O port pin to a ‘1’. On devices with more than one
ADC, both analog pin configurations for both ADC
modules must be configured as a digital I/O pin for
that pin to function as a digital I/O pin.
Note:
Although it is not possible to use a digital
input pin when its analog function is
enabled, it is possible to use the digital I/O
output function, TRISx = 0x0, while the
analog function is also enabled. However,
this is not recommended, particularly if the
analog input is connected to an external
analog voltage source, which would cre-
ate signal contention between the analog
signal and the output pin driver.
Most I/O pins have multiple functions. Referring to the
device pin diagrams in the data sheet, the priorities of
the functions allocated to any pins are indicated by
reading the pin name from left-to-right. The left most
function name takes precedence over any function to
its right in the naming convention. For example: AN16/
T2CK/T7CK/RC1. This indicates that AN16 is the high-
est priority in this example and will supersede all other
functions to its right in the list. Those other functions to
its right, even if enabled, would not work as long as any
other function to its left was enabled. This rule applies
to all of the functions listed for a given pin.
11.8 I/O Ports Resources
Many useful resources related to I/O Ports are provided
on the main product page of the Microchip web site for
the devices listed in this data sheet. This product page,
which can be accessed using this link, contains the
latest updates and additional information.
Note:
In the event you are not able to access the
product page using the link above, enter
this URL in your browser:
http://www.microchip.com/wwwproducts/
Devices.aspx?dDocName=en532315
11.8.1 KEY RESOURCES
• Section 10. “I/O Ports” (DS70193)
• Code Samples
• Application Notes
• Software Libraries
• Webinars
• All related dsPIC33F/PIC24H Family Reference
Manuals Sections
• Development Tools
11.9 Peripheral Pin Select Registers
The PIC24HJ32GP302/304, PIC24HJ64GPX02/X04
and PIC24HJ128GPX02/X04 family of devices
implement 27 registers for remappable peripheral
configuration:
• 14 Input Remappable Peripheral Registers:
- RPINR0-RPINR1, RPINR3-RPINR4,
RPINR7, RPINR10-RPINR11, RPINR18-
RPINR23 and PRINR26
• 13 Output Remappable Peripheral Registers:
- RPOR0-RPOR12
Note:
Input and Output Register values can only
be changed if the IOLOCK bit
(OSCCON<6>) is set to ‘0’. See
Section 11.6.3.1 “Control Register
Lock” for a specific command sequence.
© 2007-2012 Microchip Technology Inc.
DS70293G-page 141