6.4.2 PORTC Analog Control Selection
The ANSEL2 register is used to configure the input mode of I/O pin to analog mode. Setting the
appropriate bit in ANSEL2 to 1 will cause all digital read operations of the corresponding pin to return to 0
and make the analog function of the pin work normally. The state of the ANSEL2 bit has no effect on the
digital output function. The pin with TRIS cleared and ANSEL2 set to 1 is still used as a digital output, but
the input mode will become an analog mode. This can cause unpredictable results when performing read-
modify-write operations on the affected port.
PORTC analog selection register ANSEL2 (112H)
Analog selection bits, select the analog or digital functions of pin AN<18:16>.
Analog input. The pin is selected as analog input.
Digital I/O. The pin is selected as port or special function
Note: ANS and ports are not corresponding, please check the pin diagram for specific corresponding
relationship.
6.4.3 PORTC Pull Down Resistance
Each PORTC pin has an internal weak pull down that can be individually configured. The control bits
WPDC<3:0> enable or disable each weak pull down.
PORTC pull down resistance register WPDC (98H)
Weak pull down register bit
Note:
1) WPDC[3] will invalid if RC3 is configured as reset input.
2) If pin is configured as output, weak pull down will be automatically disabled.