CHAPTER 11 A/D CONVERTER
517
User’s Manual U15195EJ5V0UD
11.4 Control Registers
(1) A/D scan mode registers 00 and 10 (ADSCM00, ADSCM10)
The ADSCMn0 registers are 16-bit registers that select analog input pins, specify operation modes, and
control conversion operations.
They can be read or written in 16-bit units.
When the higher 8 bits of the ADSCMn0 register are used as the ADSCMn0H register and the lower 8 bits
are used as the ADSCMn0L register, they can be read/written in 8-bit or 1-bit units.
However, writing to the ADSCMn0 register during A/D conversion initializes conversion and starts the
conversion operation from the beginning.
Caution Clear (0) the ADCEn bit before changing the trigger mode using the ADPLMn and TRG2 to
TRG0 bits (n = 0, 1). If the changing of the trigger mode and clearing of the ADCEn bits are
performed simultaneously (same instruction), operation is not guaranteed. Be sure to
perform register access twice.
(1/2)
<14>
AD
CS0
13
0
<12>
AD
MS0
2
ANIS2
3
ANIS3
4
SANI0
5
SANI1
6
SANI2
7
SANI3
8
TRG0
9
TRG1
10
TRG2
<11>
AD
PLM0
<15>
AD
CE0
1
ANIS1
0
ANIS0
<14>
AD
CS1
13
0
<12>
AD
MS1
2
ANIS2
3
ANIS3
4
SANI0
5
SANI1
6
SANI2
7
SANI3
8
TRG0
9
TRG1
10
TRG2
<11>
AD
PLM1
<15>
AD
CE1
1
ANIS1
0
ANIS0
ADSCM00
Address
FFFFF200H
After reset
0000H
ADSCM10
Address
FFFFF240H
After reset
0000H
Bit position
Bit name
Function
15
ADCEn
Specifies enabling or disabling A/D conversion.
0:
Disable
1:
Enable
14
ADCSn
Shows status of A/D converter 0 or 1. This bit is read-only.
0:
Stopped
1:
Operating
ADCSn bit is 0 during the period of 6
×
f
XX
/2 immediately after the start of A/D conversion,
and then set to 1. This operation is performed each time an analog input pin has been
switched for A/D conversion in the scan mode.
12
ADMSn
Specifies operation mode of A/D converter 0 or 1.
0: Scan mode
1: Select mode
ADPLMn: Specifies polling mode.
TRG2 to TRG0: Specifies trigger mode.
ADPLMn
TRG2 TRG1 TRG0
Trigger
mode
0 0 0 0
A/D
trigger
mode
0 0 0 1
Timer
trigger
mode
0 1 1 1
External
trigger
mode
1
0
0
0
A/D trigger polling mode
Other than above
Setting prohibited
11 to 8
ADPLMn,
TRG2 to
TRG0
Remark
n = 0, 1