Datasheet

Section 20 A/D Converter
Rev. 3.00 Sep. 28, 2009 Page 664 of 910
REJ09B0350-0300
20.4.2 Scan Mode
In scan mode, A/D conversion is performed sequentially on the specified channels (max. four
channels or eight channels). Operations are as follows.
1. When the ADST bit in ADCSR is set to 1 by software, the TPU, or the TMR, A/D conversion
starts on the first channel in the selected channel set.
2. Continuous A/D conversion on up to four channels (SCANE = 1 and SCANS = 0) or
continuous A/D conversion on up to eight channels (SCANE = 1 and SCANS = 1) can be
selected. When continuous A/D conversion on four channels is selected, A/D conversion starts
from the following channels: AN0 when CH3 = 0 and CH2 = 0, AN4 when CH3 = 0 and CH2
= 1, AN8 when CH3 = 1 and CH2 = 0, and AN12 when CH3 = 1 and CH2 = 1.
When continuous A/D conversion on eight channels is selected, A/D conversion starts from
the following channels: AN0 when CH3 = 0 and CH2 = 0 and AN8 when CH3 = 1 and CH2 =
0.
3. When A/D conversion for each channel is completed, the result is sequentially transferred to
the A/D data register corresponding to each channel.
4. When conversion of all the selected channels is completed, the ADF bit in ADCSR is set to 1.
If the ADIE bit is set to 1 at this time, an ADI interrupt is requested. Conversion from the first
channel in the channel set starts again.
5. The ADST bit is not automatically cleared to 0 so steps [2] and [3] are repeated as long as the
ADST bit remains set to 1. When the ADST bit is cleared to 0, A/D conversion stops and the
A/D converter enters wait state. After this, setting the ADST bit to 1 starts A/D conversion
from the first channel again.
6. When the ADST bit is automatically cleared on completion of the A/D conversion of all of the
selected channels with the ADSTCLR bit in ADCR set to 1, A/D conversion stops and enters
the wait state.