English
Language : 

HD64F2357F20V Datasheet, PDF (577/1049 Pages) Renesas Technology Corp – Hardware Manual Renesas 16-Bit Single-chip Microcomputer H8S Family / H8S/2300 Series
On completion of conversion, the ADF flag is set to 1. If the ADIE bit is set to 1 at this time, an ADI interrupt request is
generated. The ADF flag is cleared by writing 0 after reading ADCSR.
When the operating mode or analog input channel must be changed during analog conversion, to prevent incorrect
operation, first clear the ADST bit to 0 in ADCSR to halt A/D conversion. After making the necessary changes, set the
ADST bit to 1 to start A/D conversion again. The ADST bit can be set at the same time as the operating mode or input
channel is changed.
Typical operations when channel 1 (AN1) is selected in single mode are described next. Figure 16-3 shows a timing
diagram for this example.
[1] Single mode is selected (SCAN = 0), input channel AN1 is selected (CH2 = 0, CH1 = 0, CH0 = 1), the A/D interrupt is
enabled (ADIE = 1), and A/D conversion is started (ADST = 1).
[2] When A/D conversion is completed, the result is transferred to ADDRB. At the same time the ADF flag is set to 1, the
ADST bit is cleared to 0, and the A/D converter becomes idle.
[3] Since ADF = 1 and ADIE = 1, an ADI interrupt is requested.
[4] The A/D interrupt handling routine starts.
[5] The routine reads ADCSR, then writes 0 to the ADF flag.
[6] The routine reads and processes the connection result (ADDRB).
[7] Execution of the A/D interrupt handling routine ends. After that, if the ADST bit is set to 1, A/D conversion starts
again and steps [2] to [7] are repeated.
ADIE
ADST
Set*
A/D
conversion
starts
Set*
ADF
State of channel 0 (AN0)
Idle
State of channel 1 (AN1)
Idle
A/D conversion 1
State of channel 2 (AN2)
Idle
State of channel 3 (AN3)
Idle
ADDRA
ADDRB
ADDRC
ADDRD
Clear*
Set*
Idle
A/D conversion 2
Read conversion result
A/D conversion result 1
Clear*
Idle
Read conversion result
A/D conversion result 2
Note: * Vertical arrows ( ) indicate instructions executed by software.
Figure 16-3 Example of A/D Converter Operation (Single Mode, Channel 1 Selected)
Rev.6.00 Oct.28.2004 page 547 of 1016
REJ09B0138-0600H