PIC18F23K20-E/MLQTP MICROCHIP [Microchip Technology], PIC18F23K20-E/MLQTP Datasheet - Page 134

no-image

PIC18F23K20-E/MLQTP

Manufacturer Part Number
PIC18F23K20-E/MLQTP
Description
28/40/44-Pin Flash Microcontrollers with 10-Bit A/D and nanoWatt Technology
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
PIC18F2XK20/4XK20
10.7
Some port pins are multiplexed with analog functions
such as the Analog-to-Digital Converter and compara-
tors. When these I/O pins are to be used as analog
inputs it is necessary to disable the digital input buffer
to avoid excessive current caused by improper biasing
of the digital input. Individual control of the digital input
buffers on pins which share analog functions is pro-
vided by the ANSEL and ANSELH registers. Setting an
ANSx bit high will disable the associated digital input
REGISTER 10-2:
DS41303B-page 132
bit 7
Legend:
R = Readable bit
-n = Value at POR
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
Note 1:
ANS7
R/W-1
Port Analog Control
(1)
These bits are not implemented on PIC18F2XK20 devices.
ANS7: RE2 Analog Select Control bit
1 = Digital input buffer of RE2 is disabled
0 = Digital input buffer of RE2 is enabled
ANS6: RE1 Analog Select Control bit
1 = Digital input buffer of RE1 is disabled
0 = Digital input buffer of RE1 is enabled
ANS5: RE0 Analog Select Control bit
1 = Digital input buffer of RE0 is disabled
0 = Digital input buffer of RE0 is enabled
ANS4: RA5 Analog Select Control bit
1 = Digital input buffer of RA5 is disabled
0 = Digital input buffer of RA5 is enabled
ANS3: RA3 Analog Select Control bit
1 = Digital input buffer of RA3 is disabled
0 = Digital input buffer of RA3 is enabled
ANS2: RA2 Analog Select Control bit
1 = Digital input buffer of RA2 is disabled
0 = Digital input buffer of RA2 is enabled
ANS1: RA1 Analog Select Control bit
1 = Digital input buffer of RA1 is disabled
0 = Digital input buffer of RA1 is enabled
ANS0: RA0 Analog Select Control bit
1 = Digital input buffer of RA0 is disabled
0 = Digital input buffer of RA0 is enabled
ANS6
R/W-1
ANSEL: ANALOG SELECT REGISTER 1
(1)
W = Writable bit
‘1’ = Bit is set
ANS5
R/W-1
(1)
Advance Information
R/W-1
ANS4
(1)
(1)
(1)
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared
R/W-1
buffer and cause all reads of that pin to return ‘0’ while
allowing analog functions of that pin to operate
correctly.
The state of the ANSx bits has no affect on digital
output functions. A pin with the associated TRISx bit
clear and ANSx bit set will still operate as a digital
output but the input mode will be analog. This can
cause unexpected behavior when performing read-
modify-write operations on the affected port.
ANS3
R/W-1
ANS2
© 2007 Microchip Technology Inc.
x = Bit is unknown
R/W-1
ANS1
R/W-1
ANS0
bit 0

Related parts for PIC18F23K20-E/MLQTP