
Rev. 1.21
11�
�ove��e� ��� 2�1�
Rev. 1.21
111
�ove��e� ��� 2�1�
HT66F488/HT66F489
A/D Flash MCU with EEPROM
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.
ADC module ON
START
EOCB
ACS[4, 2:0]
off
on
off
on
t
ON2ST
t
ADCS
A/D sampling time
t
ADCS
A/D sampling time
Start of A/D
conversion
Reset A/D
conversion
Start of A/D conversion
t
ADC
A/D conversion time
t
ADC
A/D conversion time
0011B
0010B
0000B
0001B
ADOFF
End of A/D
conversion
Reset A/D
conversion
End of A/D
conversion
Start of A/D
conversion
Reset A/D
conversion
Power-on
Reset
Note: A/D clock must be f
SYS
, f
SYS
/2, f
SYS
/4, f
SYS
/8, f
SYS
/16, f
SYS
/32, f
SYS
/64,
t
ADCS
=4t
AD
t
ADC
=t
ADCS
+n*t
AD
; n=bit count of ADC resolution
t
ON2ST
: at least one instruction cycle (f
SYS
= 12MHz)
A/D Conversion Timing