English
Language : 

SH7032 Datasheet, PDF (448/687 Pages) Renesas Technology Corp – 32-Bit RISC Microcomputer
Section 14 A/D Converter
14.4.2 Scan Mode (SCAN = 1)
Scan mode can be used to monitor analog inputs on one or more channels. When the ADST bit in
ADCSR is set to 1 by software or an external trigger input, A/D conversion starts with the first
channel (AN0 when CH2 = 0, AN4 when CH2 = 1) in the group.
If the scan group includes more than one channel, conversion of the second channel (AN1 or
AN5) begins as soon as conversion of the first channel ends.
Conversion of the selected channels continues cyclically until the ADST bit is cleared to 0. The
conversion results are stored in the data registers corresponding to the selected channels.
Before changing a mode or analog input channels, clear the ADST bit in ADCSR to 0 to stop A/D
conversion in order to prevent malfunctions. Setting the ADST bit to 1 after changing the mode or
channel selects the first channel and starts A/D conversion again (changing the mode or channel
and setting the ADST bit can be performed simultaneously).
The following is an example of the A/D conversion process in scan mode when three channels in
group 0 are selected (AN0, AN1, and AN2). See figure 14.4 for the timing.
1. The program selects scan mode (SCAN = 1), scan group 0 (CH2 = 0), and analog input
channels AN0–AN2 (CH1 = 1, CH2 = CH0 = 0), then sets the ADST bit to 1 to start A/D
conversion.
2. The A/D converter samples the input at the first channel (AN0), converts the voltage level to a
digital value, and transfers the result to register ADDRA. Next, the second channel (AN1) is
automatically selected and conversion begins.
3. Then it does the same for the third channel (AN2).
4. After all selected channels (AN0–AN2) have been converted, the A/D converter sets the ADF
bit to 1 and begins conversion on channel AN0 again. If the ADIE bit is set to 1, an A/D
interrupt (ADI) is requested after the A/D conversion.
5. Steps 2–4 are repeated cyclically as long as the ADST bit remains set at 1.
To stop A/D conversion, clear the ADST bit to 0. The moment the ADST bit is set to 1 again,
A/D conversion begins with the first channel (AN0).
Rev. 7.00 Jan 31, 2006 page 422 of 658
REJ09B0272-0700