241
CHAPTER 13 A/D CONVERTER
User’s Manual U12697EJ3V0UM
(2) A/D conversion operation by software start
A/D conversion of the voltage applied to the analog input pin specified with A/D converter input selected register
(ADIS) is started by setting “0” to bit 6 (TRG) and “1” to bit 7 (ADCS) of the A/D converter mode register (ADM).
When A/D conversion ends, the conversion result is saved in the A/D conversion result register (ADCR), and an
interrupt request signal (INTAD) is issued. When an A/D conversion operation that was started completes the
first A/D conversion, the next A/D conversion starts immediately. A/D conversion operations are performed
continuously until new data is written to ADM.
The A/D conversion process will be suspended if ADCS is overwritten during A/D conversion operations, and
A/D conversion operations for the newly selected analog input channel will be started.
If, during A/D conversion, data where ADCS is 0 is written to ADM, the A/D conversion operation is immediately
stopped.
Figure 13-7. A/D Conversion Operation by Software Start
ADM setting
ADCS = 1, TRG = 0
A /D conversion
ADCR
INTAD
ANIn
Note
ANIn
ANIm
Note
ANIn
ANIm
ANIm
ANIn
ANIn
ADIS write
ADCS = 0
Conversion operation
interrupted and
conversion result not left over
Stop
Remark
n = 0, 1, ...... , 7
m = 0, 1, ...... , 7
Note
If bit 0 (ADCE) of the A/D converter mode register is not set to 1, the value of the first A/D conversion
is undefined immediately after A/D conversion starts. Poll the A/D conversion end interrupt request
(INTAD) and take measures such as discarding the first A/D conversion result.