261
CHAPTER 13 10-BIT A/D CONVERTER (
µ
PD780354, 780354Y SUBSERIES)
User’s Manual U15798EJ2V0UD
(8) Interrupt request flag (ADIF0)
The interrupt request flag (ADIF0) is not cleared even if analog input channel specification register 0 (ADS0) is
changed.
Therefore, if an analog input pin is changed 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 ADS0 rewrite. Caution is
therefore required since, at this time, when ADIF0 is read immediately just after the ADS0 rewrite, ADIF0 is set
despite the fact that the A/D conversion for the post-change analog input has not ended.
When A/D conversion is restarted after it is stopped, clear ADIF0 before restart.
Figure 13-17. A/D Conversion End Interrupt Request Generation Timing
Remarks 1.
n = 0, 1, ......, 7
2.
m = 0, 1, ......, 7
(9) Conversion results just after A/D conversion start
If bit 7 (ADCS0) of A/D converter mode register 0 (ADM0) is set to 1 without setting bit 0 (ADCE0) to 1, the first
value converted immediately after A/D conversion has been started may not satisfy the rated value. Discard the
first conversion result and use the second and subsequent results by polling the A/D conversion end interrupt
request (INTAD0).
The same may apply if ADCS0 is set to 1 without the lapse of the wait time of 14
µ
s (MIN.) after ADCE0 has
been set to 1. Make sure that the specified wait time elapses.
(10) A/D conversion result register 0 (ADCR0) read operation
When writing is performed to A/D converter mode register 0 (ADM0) and analog input channel specification
register 0 (ADS0), the contents of ADCR0 may become undefined. Read the conversion result following
conversion completion before writing to ADM0, ADS0. Using a timing other than the above may cause an incorrect
conversion result to be read.
ADM0 rewrite
(start of ANIn conversion)
ADIF is set but ANIm
conversion has not ended.
A/D conversion
ADCR0
INTAD0
ANIn
ANIn
ANIm
ANIm
ANIn
ANIn
ANIm
ANIm
ADS0 rewrite
(start of ANIm conversion)