
Vii PeRiPheRaL MoDuLes 5 (anaLoG): a/D ConVeRteR (aDC)
Vii-1-20
ePson
s1C33L17 teChniCaL ManuaL
0x300544: a/D Control/status Register (paD_en_sMPL_stat)
name
address
Register name
Bit
Function
setting
init. R/W
Remarks
aDCMPe
aDCMP2
aDCMP1
aDCMP0
aDuPRst
aDLWRst
st1
st0
–
intMoDe
CMPinten
CnVinten
aDF
aDe
aDst
oWe
D15
D14
D13
D12
D11
D10
D9
D8
D7
D6
D5
D4
D3
D2
D1
D0
Upper/lower-limitcomparisonenable
Upper/lower-limitcomparison
channelselection
Upper-limitcomparisonstatus
Lower-limitcomparisonstatus
Inputsignalsamplingtimesetup
reserved
Interruptsignalmode
Out-of-rangeint.enable
Conversion-completeint.enable
Conversion-completeflag
A/Denable
A/Dconversioncontrol/status
Overwriteerrorflag
0to4
11
10
01
00
ST[1:0]
Samplingtime
9clocks
7clocks
5clocks
3clocks
0
1
–
0
1
0
R/W
R
R/W
–
R/W
R
R/W
Canbeusedwhen
ADCADV="1".
Usewith9clocks.
0whenbeingread.
Canbeusedwhen
ADCADV="1".
ResetwhenADDisread.
Resetbywriting0.
00300544
(hW)
a/D control/
status register
(pAD_EN_SMPL
_STAT)
1 Outofrange 0 Withinrange
1 Enabled
0 Disabled
1 Outofrange 0 Withinrange
–
1 Enabled
0 Disabled
1 Enabled
0 Disabled
1 Enabled
0 Disabled
1 Completeonly 0 OR
1 Completed 0 Run/Standby
1 Start/Run
0 Stop
1 Error
0 Normal
D15
aDCMPe: a/D upper/Lower-limit Comparison enable Bit (for advanced mode)
Enables/disables comparison between converted data and upper-/lower-limit values.
1 (R/W): Enabled
0 (R/W): Disabled (default)
ADCMPE selects whether the converted data is compared with the upper-/lower-limit values after A/D
conversion of the channel specified using ADCMP[2:0] (D[14:12]). Set ADCMPE to 1 when using the
comparison function or set to 0 when not used.
D[14:12] aDCMP[2:0]: a/D upper/Lower-limit Comparison Channel select Bits (for advanced mode)
Set the channel number (0–4) to compare its converted data with the upper-/ lower-limit values. (Default:
0b000 = AIN0)
D11
aDuPRst: a/D upper-limit Comparison status Bit (for advanced mode)
Indicates the results of comparison between the A/D converted data and the upper-limit value.
1 (R):
Exceeded the upper limit
0 (R):
Within the range (default)
When the upper-/lower-limit comparison function is enabled (ADCMPE (D15) = 1), the converted
data is compared with the upper-/lower-limit values after A/D conversion of the channel specified us-
ing ADCMP[2:0] (D[14:12]) has completed. If the converted data exceeds the upper-limit value set in
ADUPR[9:0] (D[9:0]/0x300558), ADUPRST is set to 1. If the converted data is equal to or less than the
upper-limit value, ADUPRST is set to 0. An interrupt occurs when ADUPRST is set to 1 if the out-of-
range interrupt is enabled.
D10
aDLWRst: a/D Lower-limit Comparison status Bit (for advanced mode)
Indicates the results of comparison between the A/D converted data and the lower-limit value.
1 (R):
Under the lower limit
0 (R):
Within the range (default)
When the upper-/lower-limit comparison function is enabled (ADCMPE (D15) = 1), the converted data
is compared with the upper-/lower-limit values after A/D conversion of the channel specified using
ADCMP[2:0] (D[14:12]) has completed. If the converted data is less than the lower-limit value set in
ADLWR[9:0] (D[9:0]/0x30055A), ADLWRST is set to 1. If the converted data is equal to or more than
the lower-limit value, ADLWRST is set to 0. An interrupt occurs when ADLWRST is set to 1 if the out-
of-range interrupt is enabled.