
VII PERIPHERAL MODULES 5 (ANALOG): A/D CONVERTER (ADC)
VII-1-4
EPSON
S1C33E07 TECHNICAL MANUAL
VII.1.4 Setting A/D Converter
When the A/D converter is used, the following settings must be made before an A/D conversion can be performed:
1. Setting analog input pins ... See Sections VII.1.2 and I.3.3.
2. Setting the operating mode (standard mode/advanced mode)
3. Setting the input clock
4. Selecting the analog-conversion start and end channels
5. Setting the A/D conversion mode
6. Selecting a trigger
7. Setting the sampling time
8. Setting the upper-limit and lower-limit values (advanced mode)
9. Setting the interrupt mode (advanced mode)
10. Setting interrupt/IDMA/HSDMA ... See Section VII.1.6.
Note: Before making these settings, make sure the A/D converter is disabled (ADE (D2/0x300544) = 0).
Changing the settings while the A/D converter is enabled could cause a malfunction.
ADE: A/D Enable Bit in the A/D Control/Status Register (D2/0x300544)
Setting the operating mode (standard mode / advanced mode)
The A/D converter of the S1C33E07 has two operating modes, standard mode of which functions are
compatible with the C33 STD analog block for the existing models and an advanced mode allowing use of the
extended functions. Table VII.1.4.1 shows differences between the standard mode and the advanced mode.
Table VII.1.4.1 Differences Between Standard Mode and Advanced Mode
Function
Reading conversion
results
Conversion-complete flag,
overwrite error flag
Comparison with
upper/lower-limit values
Interrupts
Standard mode
The conversion results are read from the
A/D conversion result register common to
all channels. When converting for multiple
channels, the A/D conversion result register
must be read before conversion for the next
channel has completed.
One bit is assigned for the flag and is
commonly used in all channels.
Not supported.
Conversion-complete interrupt only can be
generated.
The interrupts cannot be masked in channel
units.
Advanced mode
The conversion results can be read from
the conversion result buffer provided for
each channel. Thus the conversion result
for the current channel will not be lost even
when the conversion for the next channel is
completed during a multiple channel
conversion.
Different flags are provided for each
channel.
An upper-limit value and a lower-limit value
can be set and conversion results of the
specified channel can be checked whether
they are within the specified range or not.
Conversion-complete interrupts and out-of-
range interrupts can be generated.
Conversion complete interrupts for the
specified channels can be masked.
To configure the A/D converter in the advanced mode, set ADCADV (D8/0x30055E) to 1. The control bits
for the extended functions can be accessed after this setting. At initial reset, ADCADV is set to 0 and the A/D
converter enters the standard mode.
ADCADV: Standard/Advanced Mode Select Bit in the A/D Converter Mode Select/Internal Status Register
(D8/0x30055E)
The following descriptions unless otherwise specified are common contents for both modes.
The extended functions in the advanced mode are explained assuming that ADCADV (D8/0x30055E) has been
set to 1.