
Vii PeRiPheRaL MoDuLes 5 (anaLoG): a/D ConVeRteR (aDC)
Vii-1-4
ePson
s1C33L17 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: Beforemakingthesesettings,makesuretheA/Dconverterisdisabled(ADE(D2/0x300544)=0).
ChangingthesettingswhiletheA/Dconverterisenabledcouldcauseamalfunction.
aDe:A/DEnableBitintheA/DControl/StatusRegister(D2/0x300544)
setting the operating mode (standard mode / advanced mode)
The A/D converter of the S1C33L17 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.
TableVII.1.4.1DifferencesBetweenStandardModeandAdvancedMode
Function
Readingconversion
results
Conversion-completeflag,
overwriteerrorflag
Comparisonwith
upper/lower-limitvalues
Interrupts
standard mode
Theconversionresultsarereadfromthe
A/Dconversionresultregistercommonto
allchannels.Whenconvertingformultiple
channels,theA/Dconversionresultregister
mustbereadbeforeconversionforthenext
channelhascompleted.
Onebitisassignedfortheflagandis
commonlyusedinallchannels.
Notsupported.
Conversion-completeinterruptonlycanbe
generated.
Theinterruptscannotbemaskedinchannel
units.
advanced mode
Theconversionresultscanbereadfrom
theconversionresultbufferprovidedfor
eachchannel.Thustheconversionresult
forthecurrentchannelwillnotbelosteven
whentheconversionforthenextchannelis
completedduringamultiplechannel
conversion.
Differentflagsareprovidedforeach
channel.
Anupper-limitvalueandalower-limitvalue
canbesetandconversionresultsofthe
specifiedchannelcanbecheckedwhether
theyarewithinthespecifiedrangeornot.
Conversion-completeinterruptsandout-of-
rangeinterruptscanbegenerated.
Conversioncompleteinterruptsforthe
specifiedchannelscanbemasked.
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/AdvancedModeSelectBitintheA/DConverterModeSelect/InternalStatusRegister
(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.