239
CHAPTER 13 A/D CONVERTER
User’s Manual U12697EJ3V0UM
13.4.3 Operations mode of A/D converter
Select one channel for analog input from between ANI0 to ANI7 with the A/D converter input selection register
(ADIS) and commence A/D conversion.
A/D conversion can be started in the following two ways.
• Hardware start: Conversion start by trigger input (P03)
• Software start:
Conversion start by setting A/D converter mode register (ADM)
In addition to this, the result of A/D conversion will be stored in the A/D conversion result register (ADCR), and
at the same time, an interrupt request signal (INTAD) will be issued.
(1) A/D conversion operation by hardware start
The A/D conversion operation can be made to enter the standby status by setting “1” to bit 6 (TRG) and bit 7
(ADCS) of the A/D converter mode register (ADM). When an external trigger signal (P03) is input, conversion
of the voltage applied to the analog input pin set with ADIS begins.
The result of conversion will be stored in the A/D conversion result register (ADCR) when A/D conversion operation
have finished, and an interrupt request signal (INTAD) will be issued. When the A/D conversion operation that
was started completes the first A/D conversion, no other A/D conversion operation is started unless an external
trigger signal is input.
The A/D conversion process will be suspended if ADCS is overwritten during A/D conversion operations, and
it will enter a standby mode until a new external trigger signal is input. The A/D conversion process will be restarted
from the beginning when an external trigger signal is input once again. The A/D conversion process will be started
when the next external trigger signal is received when ADCS is overwritten with A/D conversion in the standby
mode.
If, during A/D conversion, data whose ADCS is 0 is written to ADM, A/D conversion is immediately stopped.
Caution
When P03/INTP3 is used as the external trigger input (P03), specify a valid edge with bits
1 and 2 (EGA0 and EGA1) of the A/D converter mode register (ADM) and set 1 to the interrupt
mask flag (PMK3).