Intel 8XC196NT User Manual page 278

Table of Contents

Advertisement

The AD_TIME register (Figure 11-4) specifies the A/D sample and conversion times. To avoid
erroneous conversion results, use the T
appropriate values.
AD_TIME
The A/D time (AD_TIME) register programs the sample window time and the conversion time for each
bit.
7
SAM2
SAM1
Bit
Bit
Number
Mnemonic
7:5
SAM2:0
4:0
CONV4:0
NOTES:
1.
This register programs the speed at which the A/D can run — not the speed at which it can con-
vert correctly. Consult the data sheet for recommended values.
2.
Initialize the AD_TIME register before initializing the AD_COMMAND register.
3.
Do not write to this register while a conversion is in progress; the results are unpredictable.
and T
SAM
SAM0
CONV4
A/D Sample Time
These bits specify the sample time. Use the following formula to
compute the sample time.
×
T
F
SAM
O SC
------------------------------------------- -
SAM
=
8
where:
SAM = 1 to 7
= the sample time, in µsec, from the data sheet
T
SAM
F
= the XTAL1 frequency, in MHz
OSC
A/D Convert Time
These bits specify the conversion time for each bit. Use the following
formula to compute the conversion time.
×
T
CO NV
-----------------------------------------------
CO NV
=
×
2 B
where:
CONV = 2 to 31
= the conversion time, in µsec, from the data sheet
T
CONV
F
= the XTAL1 frequency, in MHz
OSC
B
= the number of bits to be converted (8 or 10)
Figure 11-4. A/D Time (AD_TIME) Register
ANALOG-TO-DIGITAL CONVERTER
specifications on the datasheet to determine
CONV
CONV3
CONV2
Function
2
F
3
OSC
1
Address:
1FAFH
Reset State:
FFH
0
CONV1
CONV0
11-7

Advertisement

Table of Contents
loading

Table of Contents