MB95630H Series
MN702-00009-1v0-E
FUJITSU SEMICONDUCTOR LIMITED
597
CHAPTER 27 COMPARATOR
27.6 Register
27.6.1
Comparator Control Register (CMR0C)
The comparator control register has the following functions:
• To power up or power down the comparator (CMR0C:PD)
• To enable or disable comparator output (CMR0C:VCOE)
• To enable and disable comparator analog input (CMR0C:VCID)
Except in stop mode, watch mode or time-base timer mode, if CMR0C:IE has
been set to "1", upon detection of a rising edge or falling edge of comparator
output, the comparator generates an interrupt request and the interrupt flag bit
(CMR0C:IF) is automatically set to "1" at the same time.
The output status of the comparator can be read through the OS bit in the
comparator control register (CMR0C).
■
Register Configuration
■
Register Functions
[bit7:6] Undefined bits
Their read values are always "0". Writing values to these bits has no effect on operation.
[bit5] OS: Output status bit
This bit indicates the output status of the comparator.
Note: This bit is not updated in stop mode, watch mode or time-base timer mode. When the PD bit is set to
"1" (to power down the comparator), the OS bit becomes "0".
[bit4] IF: Output edge detection interrupt flag bit
This bit detects the output rising edge and the output falling edge of the comparator.
With the comparator in operation, this bit is set to "1" if an output rising edge or an output falling edge
occurs.
When read by the read-modify-write (RMW) type of instruction, this bit always returns "1".
Note: This bit is not be updated in stop mode, watch mode or time-base timer mode.
bit
7
6
5
4
3
2
1
0
Field
—
—
OS
IF
IE
VCID
VCOE
PD
Attribute
—
—
R
R/W
R/W
R/W
R/W
R/W
Initial value
0
0
0
0
0
1
0
1
bit5
Details
Reading "0"
Indicates that the comparator outputs "L".
Reading "1"
Indicates that the comparator outputs "H".
bit4
Details
Reading "0"
Indicates that no output rising edge/falling edge has occurred.
Reading "1"
Indicates that an output rising edge/falling edge has occurred.
Writing "0"
Clears this bit.
Writing "1"
Has no effect on operation.