Holtek HT66F488 Manual page 111

A/d flash mcu with eeprom
Table of Contents

Advertisement

HT66F488/HT66F489
A/D Flash MCU with EEPROM
• Step 6
The analog to digital conversion process can now be initialised by setting the START bit in
the ADCR0 register from low to high and then low again. Note that this bit should have been
originally cleared to zero.
• Step 7
To check when the analog to digital conversion process is complete, the EOCB bit in the ADCR0
register can be polled. The conversion process is complete when this bit goes low. When this
occurs the A/D data registers ADRL and ADRH can be read to obtain the conversion value. As an
alternative method, if the interrupts are enabled and the stack is not full, the program can wait for
an A/D interrupt to occur.
Note: When checking for the end of the conversion process, if the method of polling the EOCB
bit in the ADCR0 register is used, the interrupt enable step above can be omitted.
The accompanying diagram shows graphically the various stages involved in an analog to digital
conversion process and its associated timing. After an A/D conversion process has been initiated
by the application program, the microcontroller internal hardware will begin to carry out the
conversion, during which time the program can continue with other functions. The time taken for the
A/D conversion is 16tAD where tAD is equal to the A/D clock period.
ADOFF
t
ON2ST
off
on
ADC module ON
START
EOCB
ACS[4, 2:0]
0011B
Power-on
Reset
Reset A/D
conversion
Note: A/D clock must be f
, f
SYS
SYS
t
=4t
ADCS
AD
t
=t
+n*t
; n=bit count of ADC resolution
ADC
ADCS
AD
t
: at least one instruction cycle (f
ON2ST
Rev. 1.21
A/D sampling time
A/D sampling time
t
ADCS
0010B
Reset A/D
conversion
Start of A/D
End of A/D
Start of A/D
conversion
conversion
conversion
t
ADC
A/D conversion time
A/D conversion time
/2, f
/4, f
/8, f
/16, f
/32, f
SYS
SYS
SYS
SYS
SYS
= 12MHz)
SYS
A/D Conversion Timing
111
t
ADCS
0000B
Start of A/D conversion
Reset A/D
conversion
End of A/D
conversion
t
ADC
/64,
�ove��e� ��� 2�1�
off
on
0001B

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the HT66F488 and is the answer not in the manual?

This manual is also suitable for:

Ht66f489

Table of Contents