![](http://datasheet.mmic.net.cn/380000/-PD784214Y_datasheet_16744924/-PD784214Y_272.png)
272
CHAPTER 14 A/D CONVERTER
14.4.3 Operations mode of A/D converter
One channel is selected from ANI0 to ANI7 by the A/D converter input selection register (ADIS) and start the
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 ADM
The A/D conversion result is saved in the A/D conversion result register (ADCR), and an interrupt request signal
(INTAD) is issued at the same time.
(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.
When the 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 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.
When ADCS is rewritten during the operation of A/D conversion, that operation is interrupted and waits until an
external trigger signal is input. When the external trigger signal is input again, the A/D conversion is performed
from the begining. When ADCS is rewritten during the stand-by for A/D conversion, the operation of A/D
conversion starts at the time when the next external trigger input signal is input.
If, during A/D conversion, data that 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).
Figure 14-6. A/D Conversion Operation by Hardware Start (When Falling Edge is Specified)
Remark
n = 0, 1, ...... , 7
m = 0, 1, ...... , 7
ADM write
ADCS=1, TRG=1
Standby
Status
ANIn
P03
A/D conversion
ADCR
INTAD
ANIn
ANIn
ANIn
ANIm
ANIm
ANIn
ANIn
Standby
Status
Standby
Status
ADM write
ADCS=1, TRG=1
ANIm
ANIm
ANIm