PIC18C242 MICROCHIP [Microchip Technology], PIC18C242 Datasheet - Page 173

no-image

PIC18C242

Manufacturer Part Number
PIC18C242
Description
High-Performance Microcontrollers with 10-Bit A/D
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18C242-I/SO
Manufacturer:
MICROCHIP
Quantity:
2 000
Part Number:
PIC18C242/JW
Manufacturer:
NS
Quantity:
10
16.4
Figure 16-3 shows the operation of the A/D converter
after the GO bit has been set. Clearing the GO/DONE
bit during a conversion will abort the current conver-
sion. The A/D result register pair will NOT be updated
with the partially completed A/D conversion sample.
That is, the ADRESH:ADRESL registers will continue
to contain the value of the last completed conversion
(or the last value written to the ADRESH:ADRESL reg-
isters). After the A/D conversion is aborted, a 2T
is required before the next acquisition is started. After
this 2T
automatically started.
FIGURE 16-3: A/D CONVERSION T
7/99 Microchip Technology Inc.
Note:
AD
A/D Conversions
Tcy - T
wait, acquisition on the selected channel is
Set GO bit
The GO/DONE bit should NOT be set in
the same instruction that turns on the A/D.
Holding capacitor is disconnected from analog input (typically 100 ns)
AD
Conversion Starts
T
AD
b9
1 T
AD
b8
2 T
AD
b7
3 T
AD
b6
AD
Next Q4: ADRESH/ADRESL is loaded, GO bit is cleared,
4 T
CYCLES
AD
AD
b5
5 T
wait
Preliminary
ADIF bit is set, holding capacitor is connected to analog input.
AD
b4
6 T
AD
b3
7 T
16.5
An A/D conversion can be started by the “special event
trigger” of the CCP2 module. This requires that the
CCP2M3:CCP2M0 bits (CCP2CON<3:0>) be pro-
grammed as 1011 and that the A/D module is enabled
(ADON bit is set). When the trigger occurs, the GO/
DONE bit will be set, starting the A/D conversion, and
the Timer1 (or Timer3) counter will be reset to zero.
Timer1 (or Timer3) is reset to automatically repeat the
A/D acquisition period with minimal software overhead
(moving ADRESH/ADRESL to the desired location).
The appropriate analog input channel must be selected
and the minimum acquisition done before the “special
event trigger” sets the GO/DONE bit (starts a conver-
sion).
If the A/D module is not enabled (ADON is cleared), the
“special event trigger” will be ignored by the A/D mod-
ule, but will still reset the Timer1 (or Timer3) counter.
AD
b2
8
Use of the CCP2 Trigger
T
AD
b1
9 T
AD
b0
10
T
AD
PIC18CXX2
b0
11
DS39026B-page 173

Related parts for PIC18C242