English
Language : 

PIC18F45K80-I Datasheet, PDF (357/622 Pages) Microchip Technology – 28/40/44/64-Pin, Enhanced Flash Microcontrollers with ECAN and nanoWatt XLP Technology
PIC18F66K80 FAMILY
23.0 12-BIT ANALOG-TO-DIGITAL
CONVERTER (A/D) MODULE
The Analog-to-Digital (A/D) Converter module in the
PIC18F66K80 family of devices. It is a 13-bit differential
A/D with 12-bit single-ended compatibility. It has inputs
eight inputs for the 28-pin devices, 11 inputs for the
40/44-pin and 64-pin devices. This module allows con-
version of an analog input signal to a corresponding
12-bit digital number.
The module has these registers:
• A/D Control Register 0 (ADCON0)
• A/D Control Register 1 (ADCON1)
• A/D Control Register 2 (ADCON2)
• A/D Port Configuration Register 1 (ANCON0)
• A/D Port Configuration Register 2 (ANCON1)
• ADRESH (the upper, A/D Results register)
• ADRESL (the lower, A/D Results register)
The ADCON0 register, shown in Register 23-1, con-
trols the operation of the A/D module. The ADCON1
register, shown in Register 23-2, configures the voltage
reference and special trigger selection. The ADCON2
register, shown in Register 23-3, configures the A/D
clock source and programmed acquisition time and
justification.
23.1 Differential A/D Converter
The converter in PIC18F66K80 family devices is
implemented as a differential A/D where the differential
voltage between two channels is measured and
converted to digital values (see Figure 23-1).
The converter also can be configured to measure a
voltage from a single input by clearing the CHSNx bits
(ADCON1<2:0>). With this configuration, the negative
channel input is connected internally to AVSS (see
Figure 23-2).
FIGURE 23-1:
DIFFERENTIAL CHANNEL
MEASUREMENT
Positive Input
CHS<4:0>
Negative Input
A/D
CHSN<2:0>
Differential conversion feeds the two input channels to
a unity gain differential amplifier. The positive channel
input is selected using the CHSx bits (ADCON0<6:2>)
and the negative channel input is selected using the
CHSNx bits (ADCON1<2:0>).
The output from the amplifier is fed to the A/D Con-
verter, as shown in Figure 23-1. The 12-bit result is
available on the ADRESH and ADRESL registers. An
additional bit indicates if the 12-bit result is a positive or
negative value.
FIGURE 23-2:
SINGLE CHANNEL
MEASUREMENT
Positive Input
CHS<4:0>
A/D
CHSN<2:0> = 000
In the Single Channel Measurement mode, the
negative input is connected to AVSS by clearing the
CHSNx bits (ADCON1<2:0>).
 2010-2012 Microchip Technology Inc.
DS39977F-page 357