Datasheet

PIC18FXX2
DS39564C-page 186 © 2006 Microchip Technology Inc.
17.2 Selecting the A/D Conversion Clock
The A/D conversion time per bit is defined as TAD. The
A/D conversion requires 12 T
AD per 10-bit conversion.
The source of the A/D conversion clock is software
selectable. The seven possible options for TAD are:
•2 T
OSC
•4 TOSC
•8 TOSC
•16 TOSC
•32 TOSC
•64 T
OSC
Internal A/D module RC oscillator (2-6 μs)
For correct A/D conversions, the A/D conversion clock
(T
AD) must be selected to ensure a minimum TAD time
of 1.6 μs.
Table 17-1 shows the resultant TAD times derived from
the device operating frequencies and the A/D clock
source selected.
17.3 Configuring Analog Port Pins
The ADCON1, TRISA and TRISE registers control the
operation of the A/D port pins. The port pins that are
desired as analog inputs, must have their corresponding
TRIS bits set (input). If the TRIS bit is cleared (output),
the digital output level (V
OH or VOL) will be converted.
The A/D operation is independent of the state of the
CHS2:CHS0 bits and the TRIS bits.
TABLE 17-1: TAD vs. DEVICE OPERATING FREQUENCIES
Note 1: When reading the port register, all pins con-
figured as analog input channels will read
as cleared (a low level). Pins configured as
digital inputs will convert an analog input.
Analog levels on a digitally configured input
will not affect the conversion accuracy.
2: Analog levels on any pin that is defined as
a digital input (including the AN4:AN0
pins) may cause the input buffer to con-
sume current that is out of the device’s
specification.
AD Clock Source (TAD) Maximum Device Frequency
Operation ADCS2:ADCS0 PIC18FXX2 PIC18LFXX2
2 T
OSC 000 1.25 MHz 666 kHz
4 TOSC 100 2.50 MHz 1.33 MHz
8 T
OSC 001 5.00 MHz 2.67 MHz
16 TOSC 101 10.00 MHz 5.33 MHz
32 TOSC 010 20.00 MHz 10.67 MHz
64 T
OSC 110 40.00 MHz 21.33 MHz
RC 011 ——