254
CHAPTER 14 A/D CONVERTER
14.4.3 Operation mode of A/D converter
Select one analog input channel from ANI0-ANI7 by using the A/D converter input select register (ADIS) and A/
D converter mode register (ADM) and start A/D conversion.
The A/D conversion can be started in the following two ways:
Hardware start : Conversion is started by trigger input (INTP3).
Software start : Conversion is started by setting ADM.
The result of the A/D conversion is stored in the A/D conversion result register (ADCR), and at the same time,
an interrupt request signal (INTAD) is generated.
(1) A/D conversion operation by hardware start
The A/D conversion stands by when both bits 6 (TRG) and 7 (CS) of A/D converter mode register (ADM) are
set to 1. When an external trigger signal (INTP3) is input, the voltage applied to the analog input pin specified
by bits 1-3 (ADM1-ADM3) of ADM is converted into a digital value.
When the A/D conversion has been completed, the result of the conversion is stored in the A/D conversion
result register (ADCR), and an interrupt request signal (INTAD) is generated. Once the A/D conversion has
been started and when one A/D conversion has been completed, the next A/D conversion is not started unless
a new external trigger signal is input.
If data whose CS is 1 is written again to ADM during A/D conversion, the AD conversion under execution is
stopped, and stands by until a new external trigger signal is input. When the external trigger signal is input,
A/D conversion is performed again from the start.
When 0 is written to the CS bit of ADM during A/D conversion, the conversion is immediately stopped.
Figure 14-6. A/D Conversion by Hardware Start
Remark
n = 0, 1, ..., 7
m = 0, 1, ..., 7
ANIn
INTAD
ADCR
A/D conversion
INTP3
Standby
status
ANIn
ANIn
Standby
status
ANIn
Standby
status
ANIm
ANIm
ANIn
ANIn
ANIm
ANIm
Rewriting ADM
CS = 1, TRG = 1
Rewriting ADM
CS = 1, TRG = 1
ANIm