BAT32G1x9 user manual | Chapter 17 Comparator
539 / 1149
Rev.1.02
17.3.2
Comparator Mode Setting Register (COMPMDR).
The COMPMDR register is the register that sets the comparator action permission/disable and detects the
comparator output.
The CiENB bit is disabled to "0" when the comparator output is licensed (CiOE position "1" for compoCR
registers).
In the following cases, it is forbidden to place the CiENB position "1" (i=0,1):
The CMP negative input selects the built-in reference voltage and the built-in reference stops (the CVREi bit
of the CVRCTL register is "0").
When the input of CMP0 selects the output of the PGA and the PGA action stops (the CMPSEL0 bit
of the CVRCTL register is "1" and the PGAEN bit of the PGAEN register is "0").
Set the COMMDR register via the 8-bit memory operation instruction.
After generating a reset signal, the value of this register changes to "00H".
Figure 17-4 Comparator Mode Setting Register (COMPMDR) Format
Address: 400438after 40H
reset:
00H R/W
symbol
COMPMDR
C1MON
Monitor flags for
comparator
1, note 1,
2
0
VCIN1< comparator1of the reference voltage, or comparator1Stop running.
1
VCIN1> the reference voltage of comparator 1
C1ENB
Comparator 1
runs allowed
0
Disables the operation of comparator 1.
1
Enable comparator 1
to run.
C0MON
Monitor flags for
comparator 0,
notes
1,
2
0
VCIN0< comparator0of the reference voltage, or comparator0Stop running.
1
VCIN0> comparator 0 reference voltage
C0ENB
Comparator 0
is allowed to run
0
Disables
the operation of comparator 0.
1
Enable the
comparator 0 to run.
concentrate
1. Immediately after the reset is released, it becomes
"0"
(initial value), if the
C0ENB
bit and
the C1ENB
bit are set
to
"0"
after
allowing the
comparator to run, it is an indefinite value.
2.
Ignore the write value of this bit.
7
6 5
4
3
2 1
0
C1MON
0
0
C1ENB
C0MON
0
0
C0ENB