
Vii PeRiPheRaL MoDuLes 5 (anaLoG): a/D ConVeRteR (aDC)
Vii-1-6
ePson
s1C33L17 teChniCaL ManuaL
setting the a/D conversion mode
The A/D converter can operate in one of the following two modes. This operation mode is selected using MS
(D5/0x300542).
Ms:A/DConversionModeSelectBitintheA/DTrigger/ChannelSelectRegister(D5/0x300542)
1. normal mode (Ms = 0)
All inputs in the range of channels set using CS[2:0] (D[10:8]/0x300542) and CE[2:0] (D[13:11]/0x300542)
are A/D converted once and then stopped.
2. Continuous mode (Ms = 1)
A/D conversions in the range of channels set using CS[2:0] and CE[2:0] are executed successively until
stopped by the software.
At initial reset, the normal mode is selected.
selecting a trigger
Use TS[1:0] (D[4:3]/0x300542) to select a trigger to start A/D conversion from among the three types shown in
Table VII.1.4.4.
ts[1:0]:A/DConversionTriggerSelectBitsintheA/DTrigger/ChannelSelectRegister(D[4:3]/0x300542)
TableVII.1.4.4TriggerSelection
ts1
1
0
ts0
1
0
1
0
trigger
Externaltrigger(#ADTRG)
Reserved
16-bittimer0
Software
1. external trigger
The signal input to the #ADTRG pin is used as a trigger. When this trigger is used, the #ADTRG pin must
be set in advance using the port function select register. A/D conversion is started when a low level of the
#ADTRG signal is detected.
2. 16-bit timer
The comparison match B signal of the 16-bit timer 0 is used as a trigger. Since the cycle can be programmed
using the timer, this trigger is effective when cyclic A/D conversions are required.
For details on how to set the timer, refer to the explanation of the 16-bit timer in this manual.
3. software trigger
Writing 1 to ADST (D1/0x300544) in the software serves as a trigger to start A/D conversion.
aDst:A/DConversionControl/StatusBitintheA/DControl/StatusRegister(D1/0x300544)
setting the sampling time
The A/D converter contains ST[1:0] (D[9:8]/0x300544) that allows the analog-signal input sampling time to be
set in four steps (3, 5, 7, or 9 times the conversion clock period).
However, this register should be used as set by default (ST[1:0] = 11; x9 clock periods).
st[1:0]:InputSignalSamplingTimeSetupBitsintheA/DControl/StatusRegister(D[9:8]/0x300544)