Datasheet

PIC18CXX2
DS39026D-page 170 1999-2013 Microchip Technology Inc.
16.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 T
AD are:
•2T
OSC
•4TOSC
•8TOSC
•16TOSC
•32TOSC
•64TOSC
Internal RC oscillator
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 16-1 shows the resultant T
AD times derived from
the device operating frequencies and the A/D clock
source selected.
16.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 16-1: TAD vs. DEVICE OPERATING FREQUENCIES
TABLE 16-2: T
AD vs. DEVICE OPERATING FREQUENCIES (FOR EXTENDED, LC, DEVICES)
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 dig-
ital inputs will convert an analog input. Ana-
log 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 devices
specification.
AD Clock Source (TAD) Device Frequency
Operation ADCS2:ADCS0 40 MHz 20 MHz 5 MHz 1.25 MHz 333.33 kHz
2T
OSC 000 50 ns 100 ns
(2)
400 ns
(2)
1.6 s6 s
4T
OSC 100 100 ns 200 ns
(2)
800 ns
(2)
3.2 s12 s
8TOSC 001 200 ns 400 ns
(2)
1.6 s6.4 s 24 s
(3)
16TOSC 101 400 ns 800 ns
(2)
3.2 s12.8 s 48 s
(3)
32TOSC 010 800 ns 1.6 s6.4 s 25.6 s
(3)
96 s
(3)
64TOSC 110 1.6 s3.2 s12.8 s 51.2 s
(3)
192 s
(3)
RC 011 2 - 6 s
(1)
2 - 6 s
(1)
2 - 6 s
(1)
2 - 6 s
(1)
2 - 6 s
(1)
Legend: Shaded cells are outside of recommended range.
Note 1: The RC source has a typical T
AD time of 4 s.
2: These values violate the minimum required T
AD time.
3: For faster conversion times, the selection of another clock source is recommended.
AD Clock Source (T
AD) Device Frequency
Operation ADCS2:ADCS0 4 MHz 2 MHz 1.25 MHz 333.33 kHz
2T
OSC 000 500 ns
(2)
1.0 s
(2)
1.6 s
(2)
6 s
4T
OSC 100 1.0 s
(2)
2.0 s
(2)
3.2 s
(2)
12 s
8T
OSC 001 2.0 s
(2)
4.0 s6.4 s 24 s
(3)
16TOSC 101 4.0 s
(2)
8.0 s 12.8 s 48 s
(3)
32TOSC 010 8.0 s16.0 s 25.6 s
(3)
96 s
(3)
64TOSC 110 16.0 s32.0 s 51.2 s
(3)
192 s
(3)
RC 011 3 - 9 s
(1,4)
3 - 9 s
(1,4)
3 - 9 s
(1,4)
3 - 9 s
(1,4)
Legend: Shaded cells are outside of recommended range.
Note 1: The RC source has a typical T
AD time of 6 s.
2: These values violate the minimum required T
AD time.
3: For faster conversion times, the selection of another clock source is recommended.