
396
Chapter 11
A/D Converter
User’s Manual U16702EE3V2UD00
(5)
Interrupt request flag (ADIF)
The interrupt request flag (ADIF) is not cleared even if the contents of the ADSCM0L register are
changed. If the analog input pin is changed during A/D conversion, therefore, the result of
converting the previously selected analog input signal may be stored and the conversion end
interrupt request flag may be set immediately before the ADSCM0L register is rewritten. If the
ADIF flag is read immediately after the ADSCM0L register is rewritten, the ADIF flag may be set
even though the A/D conversion of the newly selected analog input pin has not been completed.
When A/D conversion is stopped, clear the ADIF flag before resuming conversion.
Figure 11-17:
Generation Timing of A/D Conversion End Interrupt Request
Remark:
n = 0 to 15
m = 0 to 15
A/D conversion
ADA0CRn
INTAD
ANIn
ANIn
ANIn
ANIn
ANIm
ANIm
ANIm
ANIm
ADA0S rewriting
(ANIn conversion start)
ADA0S rewriting
(ANIm conversion start)
ADIF is set, but ANIm
conversion does not end
electronic components distributor