Datasheet
PIC16F785/HV785
DS41249E-page 82 © 2008 Microchip Technology Inc.
REGISTER 12-1: ANSEL0: ANALOG SELECT REGISTER
REGISTER 12-2: ANSEL1: ANALOG SELECT REGISTER
TABLE 12-2: ANALOG SELECT CROSS REFERENCE
R/W-1 R/W-1 R/W-1 R/W-1 R/W-1 R/W-1 R/W-1 R/W-1
ANS7 ANS6 ANS5 ANS4 ANS3 ANS2 ANS1 ANS0
bit 7 bit 0
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
bit 7-0 ANS<7:0>: Analog Select bits
Analog select between analog or digital function on pins AN<7:0>, respectively.
1 = Analog input. Pin is assigned as analog input.
(1)
0 = Digital I/O. Pin is assigned to port or special function.
Note 1: Setting a pin to an analog input automatically disables the digital input circuitry, weak pull-ups, and inter-
rupt-on-change, if available. The corresponding TRIS bit must be set to Input mode in order to allow exter-
nal control of the voltage on the pin. Port reads of pins configured assigned as analog inputs will read as
‘0’.
U-0 U-0 U-0 U-0 R/W-1 R/W-1 R/W-1 R/W-1
— — — — ANS11 ANS10 ANS9 ANS8
bit 7 bit 0
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
bit 7-4 Unimplemented: Read as ‘0’
bit 3-0 ANS<11:8>: Analog Select bits
Analog select between analog or digital function on pins AN<11:8>, respectively.
1 = Analog input. Pin is assigned as analog input.
(1)
0 = Digital I/O. Pin is assigned to port or special function.
Note 1: Setting a pin to an analog input automatically disables the digital input circuitry, weak pull-ups, and inter-
rupt-on-change, if available. The corresponding TRIS bit must be set to Input mode in order to allow exter-
nal control of the voltage on the pin. Port reads of pins assigned as analog inputs will read as ‘0’.
Mode Reference
Analog
Select
ANS11 ANS10 ANS9 ANS8 ANS7 ANS6 ANS5 ANS4 ANS3 ANS2 ANS1 ANS0
Analog
Channel
AN11AN10AN9AN8AN7AN6AN5AN4AN3AN2AN1AN0
I/O Pin RB5 RB4 RC7 RC6 RC3 RC2 RC1 RC0 RA4 RA2 RA1 RA0