English
Language : 

PIC18F2331 Datasheet, PDF (252/396 Pages) Microchip Technology – 28/40/44-Pin Enhanced Flash Microcontrollers with nanoWatt Technology, High Performance PWM and A/D
PIC18F2331/2431/4331/4431
The A/D channels are grouped into four sets of 2 or 3
channels. For the PIC18F2X31 devices, AN0 and AN4
are in Group A, AN1 is in Group B, AN2 is in Group C
and AN3 is in Group D. For the PIC18F4X31 devices,
AN0, AN4 and AN8 are in Group A, AN1 and AN5 are
in Group B, AN2 and AN6 are in Group C and AN3 and
AN7 are in Group D. The selected channel in each
group is selected by configuring the A/D Channel
Select Register, ADCHS.
The analog voltage reference is software selectable to
either the device’s positive and negative analog supply
voltage (AVDD and AVSS), or the voltage level on the
RA3/AN3/VREF+/CAP2/QEA and RA2/AN2/VREF-/
CAP1/INDX, or some combination of supply and
external sources. Register ADCON1 controls the
voltage reference settings.
FIGURE 20-1:
A/D BLOCK DIAGRAM
AVDD AVSS
VREF+
VREF-
The A/D converter has a unique feature of being able
to operate while the device is in Sleep mode. To
operate in Sleep, the A/D conversion clock must be
derived from the A/D’s internal RC oscillator.
A device Reset forces all registers to their Reset state.
This forces the A/D module to be turned off and any
conversion in progress is aborted.
Each port pin associated with the A/D converter can
individually be configured as an analog input or digital
I/O using the ANSEL0 and ANSEL1 registers. The
ADRESH and ADRESL registers contain the value in
the result buffer pointed to by ADPNT<1:0>
(ADCON1<1:0>). The result buffer is a 4-deep circular
buffer that has an empty status bit, BEMT
(ADCON1<3>), and an overflow status bit, BOVFL
(ADCON1<2>).
VCFG<1:0>
AN0
AN4
AN8(1)
AN2/VREF-
AN6(1)
Analog
Mux
VREFL
VREFH
ADC
ADRESH, ADRESL
10
MUX
ADPNT<1:0>
ACMOD, GxSEL<1:0>
S/H-1
+
S/H
-
1
2
3
4
4x10-bit FIFO
00
01
10
11
AN1
AN5(1)
AN3/VREF+
AN7(1)
Analog
Mux
AVSS
ACONV
ACSCM
ACMOD
S/H-2
+
S/H
-
Note 1:
ACMOD, GxSEL<1:0>
AVSS
Seq.
Cntrl.
AN5 through AN8 are available only on PIC18F4X31 devices.
DS39616B-page 250
Preliminary
 2003 Microchip Technology Inc.