25 A/D CONVERTER (ADC10)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
25-5
3.5.1 Sampling Time Settings
Table 25.
ADST[2:0]
Sampling time
(in conversion clock cycles)
0x7
9 cycles
0x6
8 cycles
0x5
7 cycles
0x4
6 cycles
0x3
5 cycles
0x2
4 cycles
0x1
3 cycles
0x0
2 cycles
(Default: 0x7)
Setting Conversion Result Storing Mode
25.3.6
The A/D converter loads the 10-bit conversion results into ADD[15:0]/ADC10_ADD register (16-bit register) after
an A/D conversion has completed. At this time, the 10-bit conversion results are aligned in the 16-bit register ac-
cording to the conversion result storing mode set with STMD/ADC10_TRG register either as the high-order 10 bits
(left justify mode) or the low-order 10 bits (right justify mode). The remaining six bits are all set to 0.
ADD bit
15
...
10
9
...
6
5
...
0
Left justify mode (STMD = 1) (MSB)
10-bit conversion results
(LSB)
0
...
0
Right justify mode (STMD = 0)
0
...
0
(MSB)
10-bit conversion results
(LSB)
3.6.1 Conversion Data Alignment
Figure 25.
A/D Conversion Control and Operations
25.4
The A/D converter should be controlled in the sequence shown below.
1. Activate the A/D converter.
2. Start A/D conversion.
3. Read the A/D conversion results.
4. Terminate A/D conversion.
Activating A/D Converter
25.4.1
After the settings described in Section 25.3 have been completed, write 1 to ADEN/ADC10_CTL register to enable
the A/D converter. The A/D converter is thereby ready to accept a trigger to start A/D conversion. To set up the A/D
converter again, or when the A/D converter is not used, ADEN must be set to 0.
Starting A/D Conversion
25.4.2
The A/D converter starts A/D conversion when a trigger is input while ADEN is 1. When software trigger is select-
ed, an A/D conversion starts by writing 1 to ADCTL/ADC10_CTL register.
The A/D converter accepts triggers from only the trigger source selected by ADTS[1:0]/ADC10_TRG register.
Once a trigger is input, the A/D converter starts sampling of the analog input signal and A/D conversion beginning
with the conversion start channel selected by ADCS[2:0]/ADC10_TRG register.
The software trigger bit ADCTL functions as an A/D conversion status bit that goes 1 while A/D conversion is un-
derway even if it has started by another trigger source. The channel in which conversion is underway can be identi-
fied by reading ADICH[2:0]/ADC10_CTL register.
Reading A/D Conversion Results
25.4.3
Upon completion of the A/D conversion in the start channel, the A/D converter loads the conversion results into
ADD[15:0]/ADC10_ADD register and sets the conversion completion flag ADCF/ADC10_CTL register. If mul-
tiple channels are specified using ADCS[2:0]/ADC10_TRG register and ADCE[2:0]/ADC10_TRG register, the A/
D converter continues A/D conversions in the subsequent channels.