
576
16.4
Operation
The mid-speed converter operates using the continuous comparison method and is equipped with
10-bit resolution. Operations for the single and scan modes are explained below.
16.4.1
Single Mode (SCAN=0)
The single mode is selected when executing A/D conversion for one channel only. A/D conversion
is initiated when the ADST bit of the A/D control/status register is set to 1 by the software or
external trigger input. The ADST bit is held to 1 during the A/D conversion and is automatically
cleared to 0 upon completion.
When conversion is complete, the ADF bit of ADCSR is set to 1. At this time, if the ADIE bit of
ADCSR is 1, ADI interrupt request occurs.
The ADF bit can be cleared by writing 0 after reading ADF=1.
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 the ADST bit to 1 to restart A/D conversion.
An example of operation when channel 1 (AN1) is selected in the single mode is shown in figure
16.3 (the bit specification in the example is the ADCSR0 register).
1. Set operation mode to single mode (SCAN=0), input channel to AN1 (CH1=0, CH0=1) and
A/D interrupt request to enable (ADIE) then start A/D conversion (ADST=1).
2. When A/D conversion is complete, A/D conversion result is transferred to ADDRB0. At the
same time, ADF=1 will become ADF=0 and the mid-speed converter will standby for
conversion.
3. Since ADF=1 and ADIE=1, ADI interrupt request will occur.
4. The A/D interrupt process routine will start.
5. After reading ADF=1, write 0 to ADF.
6. Read the A/D conversion result (ADDRB0) and process.
7. End A/D interrupt process routine execution. When ADST bit is set to 1, A/D conversion
starts, following steps (2) to (7) above.
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 ...