Datasheet

78K0/Ix2 CHAPTER 13 COMPARATORS
R01UH0010EJ0500 Rev.5.00 414
Feb 28, 2012
Figure 13-4. Format of Comparator 2 Control Register (C2CTL)
Address: FF66H After reset: 00H R/W
Symbol <7> <6> <5> <4> <3> 2 <1> <0>
C2CTL CMP2EN C2DFS1 C2DFS0 C2MODSEL1 C2MODSEL0 0 C2OE C2INV
CMP2EN Comparator 2 operation control
0 Stops operation
1 Enables operation
Enables input to the external pins (CMP2+) on the positive and negative sides of comparator 2
C2DFS1 C2DFS0 Noise elimination width setting
0 0 Noise filter unused
0 1 2/fPRS
1 0 2
2
/fPRS
1 1 2
4
/fPRS
C2MODSEL1 C2MODSEL0 Reference voltage selection
0 0 Internal reference voltage: DA0
0 1 Internal reference voltage: DA1
1 0 Internal reference voltage: DA2
1 1 Internal reference voltage: CMPCOM
Note
C2OE Enabling or disabling of comparator output
0 Disables output (output signal = fixed to low level)
1 Enables output
C2INV Output reversal setting
0 Forward
1 Reverse
Note Setting prohibited in the 78K0/IY1 and 78K0/IA2.
Cautions 1. Rewrite C2DFS1, C2DFS0, C2MODSEL1, C2MODSEL0, C2INV after setting the comparator 2
operation to the disabled state (CMP2EN = 0).
2. With the noise elimination width, an extra peripheral hardware clock frequency (f
PRS) may be
eliminated from the setting value.
3. If the comparator output noise interval is within “set noise elimination width + 1 clock”, an
illegal waveform may be output.
4. To use the internal reference voltage, enable (CVRE = 1) operation of the internal reference
voltage before enabling (CMP2EN = 1) the comparator operation.
Remark f
PRS: peripheral hardware clock frequency