English
Language : 

C8051F352 Datasheet, PDF (79/234 Pages) Silicon Laboratories – 8 k ISP Flash MCU Family
C8051F350/1/2/3
9. Comparator0
C8051F350/1/2/3 devices include an on-chip programmable voltage comparator, Comparator0, shown in
Figure 9.1.
The Comparator offers programmable response time and hysteresis and two outputs that are optionally
available at the Port pins: a synchronous “latched” output (CP0), or an asynchronous “raw” output (CP0A).
The asynchronous CP0A signal is available even when the system clock is not active. This allows the
Comparator to operate and generate an output with the device in STOP mode. When assigned to a Port
pin, the Comparator output may be configured as open drain or push-pull (see Section “18.2. Port I/O Ini-
tialization’ on page 141). Comparator0 may also be used as a reset source (see Section
“14.5. Comparator0 Reset’ on page 118).
VDD
CP0EN
CP0OUT
CP0RIF
CP0FIF
CP0HYP1
CP0HYP0
CP0HYN1
CP0HYN0
CP0 +
+
CP0 -
-
D SET Q
Q
CLR
D SET Q
Q
CLR
CP0
(synchronous output)
CP0RIE
CP0FIE
CP0MD1
CP0MD0
GND
(SYNCHRONIZER)
Reset
Decision
Tree
CP0A
(asynchronous output)
0
CP0RIF
1
0
CP0FIF
1
CP0EN
EA
0
1
CP0
0 Interrupt
1
Figure 9.1. Comparator0 Functional Block Diagram
The Comparator output can be polled in software, used as an interrupt source, and/or routed to a Port pin.
When routed to a Port pin, the Comparator output is available asynchronous or synchronous to the system
clock; the asynchronous output is available even in STOP mode (with no system clock active). When dis-
abled, the Comparator output (if assigned to a Port I/O pin) defaults to the logic low state, and its supply
current falls to less than 100 nA. Comparator inputs can be externally driven from –0.25 V to
(VDD) + 0.25 V without damage or upset. The complete Comparator electrical specifications are given in
Table 9.1.
The Comparator response time may be configured in software via the CPT0MD register (see SFR Defini-
tion 9.2). Selecting a longer response time reduces the Comparator supply current. See Table 9.1 for com-
plete timing and power consumption specifications.
Rev. 1.1
79