RL78/G15 CHAPTER 11 COMPARATOR
R01UH0959EJ0110 Rev.1.10 Page 351 of 765
Mar 7, 2023
11.3.2 Comparator Mode Setting Register (COMPMDR)
This register selects the comparator reference voltage, starts/stops the comparison operation, and indicates the
comparison result state.
The COMPMDR register can be set by a 1-bit or 8-bit memory manipulation instruction. Note that the CnMON bit (n = 1,
0) can only be read.
Reset signal generation clears this register to 00H.
Figure 11-3. Format of Comparator Mode Setting Register (COMPMDR)
Address: FFF60H After reset: 00H R/W
Note 1
Symbol
□
7 6 5
□
4
□
3 2 1
□
0
COMPMDR C1MON C1VRF 0 C1ENB C0MON C0VRF 0 C0ENB
C1MON
Note 2
Comparator 1 monitor flag
0 IVCMP1 < comparator 1 reference voltage
1 IVCMP1 > comparator 1 reference voltage
C1VRF Comparator 1 reference voltage selection
0 Supplied from the IVREF1 pin
1 Supplied from the internal reference voltage (0.815 V (typ.))
Note 3
C1ENB Comparator 1 operation control
0 Comparator 1 operation disabled
1 Comparator 1 operation enabled
C0MON
Note 4
Comparator 0 monitor flag
0 IVCMP0 < comparator 0 reference voltage
1 IVCMP0 > comparator 0 reference voltage
C0VRF Comparator 0 reference voltage selection
0 Supplied from the IVREF0 pin
1 Supplied from the internal reference voltage (0.815 V (typ.))
Note 5
C0ENB Comparator 0 operation control
0 Comparator 0 operation disabled
1 Comparator 0 operation enabled
Note 1. Bits 3 and 7 are read-only bits.
Note 2. After the comparator 1 operation is enabled (C1ENB = 1), the IVREF1 pin state can be read from the C1MON
bit setting. When the comparator 1 operation is then disabled (C1ENB = 0), the C1MON bit value is
undefined.
Note 3. When the internal reference voltage (0.815 V (typ.)) is selected as the comparator 1 reference voltage, the
internal reference voltage cannot be selected for the A/D converter.