R01UH0823EJ0100 Rev.1.00
Page 1642 of 1823
Jul 31, 2019
RX23W Group
47. Comparator B (CMPBa)
47.2.7
Comparator B1 Reference Input Voltage Select Register (CPB1REF)
Note 1. Enabled only when the window function is disabled. When the window function is enabled, the internal reference voltage of
comparator B is selected regardless of the setting of this bit.
Note 2. When the internal reference voltage is selected, the temperature sensor output cannot be selected for the A/D converter.
Note 3. When the internal reference voltage is selected, the voltage generation circuit operates and current increases by about 75 μA.
This circuit is not automatically turned off even if the MCU enters software standby mode with the internal reference voltage
selected.
Note 4. Do not rewrite the CPBnVRF bit when CPB1CNT2.CPBnWCP = 0.
[Notes on changing the reference input voltage]
♦
When changing the reference input voltage from CVREFBn (n = 2, 3) to the internal reference voltage, use the
following procedure.
1. Set the CPB1CNT1.CPBnINI bit to 1.
2. Set the CPB1CNT2.CPBnWCP bit to 1.
3. Set the CPB1REF.CPBnVRF bit to 1 to select the internal reference voltage.
4. Set the analog select bit (ASEL) in the pin function control register of the port that is used as the CVREFBn pin to 0.
5. Wait for the comparator stabilization time (min. 100 μs).
6. Set the CPB1CNT2.CPBnWCP bit to 0.
♦
When changing the reference input voltage from the internal reference voltage to CVREFBn (n = 2, 3), use the
following procedure.
1. Set the CPB1CNT1.CPBnINI bit to 1.
2. Set the CPB1CNT2.CPBnWCP bit to 1.
3. Set the CPB1REF.CPBnVRF bit to 0 to select the CVREFBn pin input.
4. Set the analog select bit (ASEL) in the pin function control register of the port that is used as the CVREFBn pin to 1.
5. Wait for the comparator stabilization time (min. 100 μs).
6. Set the CPB1CNT2.CPBnWCP bit to 0.
Address: 0008 C5A6h
b7
b6
b5
b4
b3
b2
b1
b0
—
—
—
CPB3V
RF
—
—
—
CPB2V
RF
Value after reset:
0
0
0
0
0
0
0
0
Bit
Symbol
Bit Name
Description
R/W
b0
Comparator B2 Reference Input
Voltage Select
0: Comparator B2 reference input voltage is CVREFB2 input
1: Comparator B2 reference input voltage is internal reference
voltage*
b3 to b1
—
Reserved
These bits are read as 0. The write value should be 0.
RW
b4
Comparator B3 Reference Input
Voltage Select
0: Comparator B3 reference input voltage is CVREFB3 input
1: Comparator B3 reference input voltage is internal reference
voltage*
b7 to b5
—
Reserved
These bits are read as 0. The write value should be 0.
RW