
578
16.4.2
Scan Mode (SCAN=1)
The scan mode is optimal for monitoring analog input of multiple channels (including channel 1).
A/D conversion is started from channel 1 (AN0 for A/D0 and AN4 for A/D1) of the group when
the ADST bit of the A/D control/status register (ADCSR) is set to 1 by the software or external
trigger input.
When multiple channels are selected, A/D conversion of channel 2 (AN1 or AN5) is initiated
immediately after completion of the channel 1 conversion.
To switch modes or analog input channels during A/D conversion, clear the ADST bit to 0 and
stop A/D conversion to avoid malfunction. After switching (mode/channel change and ADST bit
setting can be made at the same time), set ADST bit to 1 to restart A/D conversion from channel 1.
An example of operation when three channels of A/D0 (AN0–2) are selected for A/D conversion
is shown in figure 16.4 (the bit specification in the example is the ADCSR0 register).
1. Set operation mode to scan mode (SCAN=1), set analog channels to AN0–2 (CH1=1, CH0=0)
then start A/D conversion (ADST=1).
2. When A/D conversion for channel 1 is complete, A/D conversion result is transferred to
ADDRA0.
Next, channel 2 (AN1) will automatically be selected and conversion will begin.
3. In the same manner, channel 3 will be converted (AN2).
4. When conversion of all of the selected channels (AN0–AN2) are complete, ADF will become
1 and channel 1 (AN0) will again be selected and conversion will begin.
At this time, if the ADIE bit is set to 1, ADI interrupt request will occur after completing A/D
conversion.
5. Steps (2) to (4) will be repeated while ADST bit is set to 1.
A/D conversion will stop when setting the ADST bit to 0. When setting the ADST bit to 1,
A/D conversion will start again from channel 1 (AN0).
Summary of Contents for SH7041 Series
Page 2: ......
Page 6: ......
Page 38: ...xvi ...
Page 44: ...6 ...
Page 46: ...8 ...
Page 48: ...10 ...
Page 82: ...44 ...
Page 114: ...76 ...
Page 118: ...80 ...
Page 124: ...86 ...
Page 170: ...132 ...
Page 250: ...212 ...
Page 492: ...454 ...
Page 506: ...468 ...
Page 604: ...566 ...
Page 684: ...646 ...
Page 706: ...668 ...
Page 778: ...740 ...
Page 780: ...742 ...
Page 818: ...780 ...
Page 850: ...812 ...
Page 923: ...SH7040 SH7041 SH7042 SH7043 SH7044 SH7045 Group Hardware Manual REJ09B0044 0600O ...