R01UH0823EJ0100 Rev.1.00
Page 1575 of 1823
Jul 31, 2019
RX23W Group
44. 12-Bit A/D Converter (S12ADE)
[Clearing conditions]
The A/D-converted value does not meet the condition set by ADCMPBNSR.CMPLB bit when ADCMPCR.CMPBE =1.
ADCMPCR.CMPBE = 0 (Automatically cleared when the ADCMPCR.CMPBE bit value changes from 1 to 0.)
44.2.32
A/D Compare Function Window B Channel Select Register (ADCMPBNSR)
The ADCMPBNSR register is used to set the compare window B function.
CMPCHB[5:0] Bits (Compare Window B Channel Select)
These bits are used to select channels to be compared from among AN000 to AN007, AN016 to AN020, AN027,
temperature sensor, and internal reference voltage against the conditions of comparison window B.
The compare window B function is enabled by specifying the hexadecimal number of the A/D conversion channel
selected by the ADANSA0, ADANSA1, ADANSB0, and ADANSB1 registers.
The CMPCHB[5:0] bits should be set while the ADCSR.ADST bit is 0.
CMPLB Bit (Compare Window B Comparison Condition Setting)
This bit is used to set comparison conditions of channels for window B. When the comparison result of each analog input
meets the set condition, the ADCMPBSR.CMPSTB flag is set to 1.
shows the comparison conditions.
Address(es): S12AD.ADCMPBNSR 0008 90A6h
b7
b6
b5
b4
b3
b2
b1
b0
CMPLB
—
CMPCHB[5:0]
Value after reset:
0
0
0
0
0
0
0
0
Bit
Symbol
Bit Name
Description
R/W
b5 to b0
Compare Window B
Channel Select
These bits select channels to be compared with the compare
window B conditions.
b5
b0
0 0 0 0 0 0: AN000
0 0 0 0 0 1: AN001
0 0 0 0 1 0: AN002
:
:
0 0 0 1 1 0: AN006
0 0 0 1 1 1: AN007
0 1 0 0 0 0: AN016
0 1 0 0 0 1: AN017
:
:
0 1 0 1 0 0: AN020
0 1 1 0 1 1: AN027
1 0 0 0 0 0: Temperature sensor
1 0 0 0 0 1: Internal reference voltage
Settings other than above are prohibited.
R/W
b6
—
Reserved
This bit is read as 0. The write value should be 0.
R/W
b7
Compare Window B
Comparison Condition
Setting
When the window function is disabled (ADCMPCR.WCMPE bit = 0)
0: ADWINLLB register value > A/D-converted value
1: ADWINLLB register value < A/D-converted value
When the window function is enabled (ADCMPCR.WCMPE bit = 1)
0: A/D-converted value < ADWINLLB register value or ADWINULB
register value < A/D-converted value
1: ADWINLLB register value < A/D-converted value < ADWINULB
register value
R/W