
PIC16F87X
DS30292C-page 112
2001 Microchip Technology Inc.
REGISTER 11-2:
ADCON1 REGISTER (ADDRESS 9Fh)
The ADRESH:ADRESL registers contain the 10-bit
result of the A/D conversion. When the A/D conversion
is complete, the result is loaded into this A/D result reg-
ister pair, the GO/DONE bit (ADCON0<2>) is cleared
and the A/D interrupt flag bit ADIF is set. The block dia-
gram of the A/D module is shown in Figure 11-1.
After the A/D module has been configured as desired,
the selected channel must be acquired before the con-
version is started. The analog input channels must
have their corresponding TRIS bits selected as inputs.
To determine sample time, see Section 11.1. After this
acquisition time has elapsed, the A/D conversion can
be started.
U-0
ADFM
bit 7
U-0
—
R/W-0
—
U-0
—
R/W-0
PCFG3
R/W-0
PCFG2
R/W-0
PCFG1
R/W-0
PCFG0
bit 0
bit 7
ADFM:
A/D Result Format Select bit
1
= Right justified. 6 Most Significant bits of ADRESH are read as
‘
0
’
.
0
= Left justified. 6 Least Significant bits of ADRESL are read as
‘
0
’
.
Unimplemented:
Read as '0'
PCFG3:PCFG0
: A/D Port Configuration Control bits:
bit 6-4
bit 3-0
Note 1:
These channels are not available on PIC16F873/876 devices.
2:
This column indicates the number of analog channels available as A/D inputs and
the number of analog channels used as voltage reference inputs.
Legend:
R = Readable bit
- n = Value at POR
W = Writable bit
’
1
’
= Bit is set
U = Unimplemented bit, read as
‘
0
’
’
0
’
= Bit is cleared
x = Bit is unknown
A = Analog input D = Digital I/O
PCFG3:
PCFG0
AN7
(1)
RE2
AN6
(1)
RE1
AN5
(1)
RE0
AN4
RA5
AN3
RA3
AN2
RA2
AN1
RA1
AN0
RA0
V
REF
+
V
REF
-
C
HAN
/
Refs
(2)
0000
A
A
D
D
D
D
D
A
D
D
D
D
D
D
D
A
A
D
D
D
D
D
A
D
D
D
D
D
D
D
A
A
D
D
D
D
D
A
A
A
A
D
D
D
D
A
A
A
A
D
D
D
A
A
A
A
A
D
D
D
A
A
A
A
A
D
D
D
A
A
A
A
A
A
D
A
A
A
A
A
A
D
D
A
A
A
A
A
A
D
A
A
A
A
A
A
A
A
V
DD
RA3
V
DD
RA3
V
DD
RA3
V
DD
RA3
V
DD
RA3
RA3
RA3
RA3
V
DD
RA3
V
SS
V
SS
V
SS
V
SS
V
SS
V
SS
V
SS
RA2
V
SS
V
SS
RA2
RA2
RA2
V
SS
RA2
8/0
7/1
5/0
4/1
3/0
2/1
0/0
6/2
6/0
5/1
4/2
3/2
2/2
1/0
1/2
0001
V
REF
+
A
V
REF
+
A
V
REF
+
D
V
REF
+
A
V
REF
+
V
REF
+
V
REF
+
V
REF
+
D
V
REF
+
0010
0011
0100
0101
011x
1000
V
REF
-
A
A
V
REF
-
V
REF
-
V
REF
-
D
V
REF
-
1001
1010
1011
1100
1101
1110
1111