ANALOG-TO-DIGITAL (A/D) CONVERTER

AD_TIME

Address:

1FAFH

 

Reset State:

FFH

The A/D time (AD_TIME) register programs the sample window time and the conversion time for each bit. This register programs the speed at which the A/D can run — not the speed at which it can convert correctly. Consult the data sheet for recommended values. Initialize the AD_TIME register before initializing the AD_COMMAND register. Do not write to this register while a conversion is in progress; the results are unpredictable.

7

SAM2

SAM1

SAM0

CONV4

 

 

 

 

0

CONV3

CONV2

CONV1

CONV0

 

 

 

 

Bit

Bit

 

 

 

Function

Number

Mnemonic

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7:5

SAM2:0

A/D Sample Time

 

 

These bits specify the sample time. Use the following formula to

 

 

compute the sample time.

 

 

SAM =

TSAM × FXTAL1 2

 

 

------------------------------------------------

 

8

 

 

 

 

 

 

 

 

 

 

 

where:

 

 

 

 

 

 

 

SAM

=

1 to 7

 

 

TSAM

=

the sample time, in μsec, from the data sheet

 

 

FXTAL1 = the input frequency on XTAL1, in MHz

4:0

CONV4:0

A/D Convert Time

 

 

These bits specify the conversion time for each bit. Use the following

 

 

formula to compute the conversion time.

 

 

CONV =

 

TCO NV × FXTAL1 3

 

1

 

 

 

 

 

 

 

----------------------------------------------------

 

 

 

where:

 

 

2 × B

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CONV=

2 to 31

 

 

TCONV

=

the conversion time, in μsec, from the data sheet

 

 

FXTAL1 = the input frequency on XTAL1, in MHz

 

 

B

=

the number of bits to be converted (8 or 10)

 

 

 

 

 

 

 

 

Figure 12-4. A/D Time (AD_TIME) Register

12.4.4 Programming the A/D Command Register

The A/D command register controls the operating mode, the analog input channel, and the con- version trigger.

12-7

Page 272
Image 272
Intel 8XC196MC, 8XC196MD, 8XC196MH manual Programming the A/D Command Register, Adtime