789
A/D Converter (ADC)
Chapter 20
Preliminary User’s Manual U17566EE1V2UM00
(5)
Interrupt request flag (ADIF)
The interrupt request flag (ADIF) is not cleared even if the contents of the
ADA0S 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 ADA0S register is rewritten. If the ADIF flag is
read immediately after the ADA0S 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 20-9
Generation timing of A/D conversion end interrupt request
(6)
Reading ADCR0n register
When the ADA0M0 to ADA0M2 or ADA0S register is written, the contents of
the ADCR0n register may be undefined. Read the conversion result after
completion of conversion and before writing to the ADA0M0 to ADA0M2 and
ADA0S registers. The correct conversion result may not be read at a timing
different from the above.
ADA0S
rewriting
(ANIn conversion start)
ADA0S
rewriting
(ANIm conversion start)
ADIF is set, but ANIm
conversion does not end
A/D
conversion
ADCR0n
INTAD
ANIn
ANIn
ANIm
ANIm
ANIm
ANIn
ANIn
ANIm
electronic components distributor