318
CHAPTER 13 A/D CONVERTER
13.4.4 A/D Conversion Operation Start by Software
An A/D conversion operation start by software is performed by writing a value to the A/D converter mode register (ADM)
that sets the TRG bit of the ADM register to 0 and the AM0 bit or AM1 bit to 1.
If a value is written to the ADM during an A/D conversion operation (AM0 bit or AM1 bit = 1) such that the TRG bit is
set to 0 and the AM0 bit or AM1 bit to 1 again, the A/D conversion operation being performed at that time is suspended,
and A/D conversion is started immediately in accordance with the written value.
Once A/D conversion operation is started, as soon as one A/D conversion operation ends the next A/D conversion
operation is started in accordance with the operating mode set by the ADM, and conversion operations continue repeatedly
until an instruction that writes to the ADM is executed.
When A/D conversion operation is started by software (TRG bit = 0), INTP4 pin (P25 pin) input does not affect the A/
D conversion operation.
(1) A/D conversion in select mode (1-buffer mode)
A/D conversion of the analog input set by the A/D converter mode register (ADM) is started. When conversion has
been completed, the same analog input is converted again. Each time A/D conversion has been completed, the
A/D conversion end interrupt request (INTAD) is generated.
Figure 13-11. A/D Conversion in Select Mode (1-buffer mode) Started by Software
(2) A/D conversion in select mode (4- buffer mode)
The analog input set by the A/D converter mode register (ADM) is converted. One analog input is converted four
times. When A/D conversion has been executed four times, the same analog input is converted four times again.
Each time conversion has been executed four times, the A/D conversion end interrupt request (INTAD) is generated.
ADM Written
TRG
←
0
AM1, AM0
←
10
PS
←
0
ANIS2-ANIS0
←
001
ADM Rewritten
TRG
←
0
AM1, AM0
←
10
PS
←
0
ANIS2-ANIS0
←
101
ANI1
INTAD
A/D Conversion
ADCR1,
ADCR5
ANI1
(ADCR1)
ANI1
ANI1
ANI1
ANI1
ANI1
ANI5
ANI5
ANI5
ANI1
(ADCR1)
ANI1
(ADCR1)
ANI1
(ADCR1)
ANI1
(ADCR1)
ANI5
(ADCR5)