
VII PERIPHERAL MODULES 5 (ANALOG): A/D CONVERTER (ADC)
VII-1-20
EPSON
S1C33E07 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-limit comparison enable
Upper/lower-limit comparison
channel selection
Upper-limit comparison status
Lower-limit comparison status
Input signal sampling time setup
reserved
Interrupt signal mode
Out-of-range int. enable
Conversion-complete int. enable
Conversion-complete flag
A/D enable
A/D conversion control/status
Overwrite error flag
0 to 4
11
10
01
00
ST[1:0]
Sampling time
9 clocks
7 clocks
5 clocks
3 clocks
0
1
–
0
1
0
R/W
R
R/W
–
R/W
R
R/W
Can be used when
ADCADV = "1".
Use with 9 clocks.
0 when being read.
Can be used when
ADCADV = "1".
Reset when ADD is read.
Reset by writing 0.
00300544
(HW)
A/D control/
status register
(pAD_EN_SMPL
_STAT)
1 Out of range 0 Within range
1 Enabled
0 Disabled
1 Out of range 0 Within range
–
1 Enabled
0 Disabled
1 Enabled
0 Disabled
1 Enabled
0 Disabled
1 Complete only 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.