
Page 114
DS007-0.4-NOV02
AdvancedInformation
C8051F060/1/2/3
A
DVANCD
NORMAION
Figure 11.3. CPTnCN: Comparator 0, 1, and 2 Control Register
Bit7:
CPnEN: Comparator Enable Bit.
(Please see note below.)
0: Comparator Disabled.
1: Comparator Enabled.
CPnOUT: Comparator Output State Flag.
0: Voltage on CPn+ < CPn-.
1: Voltage on CPn+ > CPn-.
CPnRIF: Comparator Rising-Edge Interrupt Flag.
0: No Comparator Rising Edge Interrupt has occurred since this flag was last cleared.
1: Comparator Rising Edge Interrupt has occurred. Must be cleared by software.
CPnFIF: Comparator Falling-Edge Interrupt Flag.
0: No Comparator Falling-Edge Interrupt has occurred since this flag was last cleared.
1: Comparator Falling-Edge Interrupt has occurred. Must be cleared by software.
CPnHYP1-0: Comparator Positive Hysteresis Control Bits.
00: Positive Hysteresis Disabled.
01: Positive Hysteresis = 5 mV.
10: Positive Hysteresis = 10 mV.
11: Positive Hysteresis = 20 mV.
CPnHYN1-0: Comparator Negative Hysteresis Control Bits.
00: Negative Hysteresis Disabled.
01: Negative Hysteresis = 5 mV.
10: Negative Hysteresis = 10 mV.
11: Negative Hysteresis = 20 mV.
Upon enabling a comparator, the output of the comparator is not immediately valid. Before using a
comparator as an interrupt or reset source, software should wait for a minimum of the specified
“Power-up time” as specified in Table 11.1, “Comparator Electrical Characteristics,” on page 116.
Bit6:
Bit5:
Bit4:
Bits3-2:
Bits1-0:
NOTE:
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset Value
CPnEN
CPnOUT
CPnRIF
CPnFIF
CPnHYP1 CPnHYP0 CPnHYN1 CPnHYN0 00000000
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
Bit
Addressable
SFR Address: CPT0CN: 0x88; CPT1CN: 0x88; CPT2CN: 0x88
SFR Pages: CPT0CN: page 1; CPT1CN: page 2; CPT2CN: page 3