(8) Interrupt request flag (ADIF)
The interrupt request flag (ADIF) is not cleared even if the analog input channel specification register (ADS1)
is changed.
Caution is therefore required since, if a change of analog input pin is performed during A/D conversion, the
A/D conversion result and conversion end interrupt request flag for the pre-change analog input may be set just
before the ADS1 rewrite, and when ADIF is read immediately after the ADS1 rewrite, ADIF may be set despite
the fact that the A/D conversion for the post-change analog input has not ended.
When the A/D conversion is stopped and then resumed, clear ADIF before the A/D conversion operation is
resumed.
Figure 12-12. A/D Conversion End Interrupt Request Generation Timing
ADS1 rewrite
(start of ANIn conversion)
A/D conversion
ADCR1
INTAD
Remarks 1. n = 0, 1, ..., 4
2. m = 0, 1, ..., 4
(9) Read of A/D conversion result register (ADCR1)
When write operation is executed to A/D converter mode register (ADM1) and analog input channel specification
register (ADS1), the contents of ADCR1 are undefined. Read the conversion result before write operation is
executed to ADM1, ADS1. If a timing other than the above is used, the correct conversion result may not be
read.
CHAPTER 12 A/D CONVERTER
ADS1 rewrite
(start of ANIm conversion)
ANIn
ANIn
ANIn
Preliminary User's Manual U14581EJ3V0UM00
ADIF is set but ANIm conversion
has not ended.
ANIm
ANIm
ANIn
ANIm
ANIm
167