PIC12F629/675
TABLE 6-1:
OUTPUT STATE VS. INPUT
CONDITIONS
6.1
Comparator Operation
A single comparator is shown in Figure 6-±, along with
the relationship between the analog input levels and
the digital output. When the analog input at VIN+ is less
than the analog input VIN-, the output of the comparator
is a digital low level. When the analog input at VIN+ is
greater than the analog input VIN-, the output of the
comparator is a digital high level. The shaded areas of
the output of the comparator in Figure 6-± represent
the uncertainty due to input offsets and response time.
Input Conditions
CINV
COUT
VIN- > VIN+
VIN- < VIN+
VIN- > VIN+
VIN- < VIN+
0
0
1
1
0
1
1
0
FIGURE 6-1:
SINGLE COMPARATOR
Note: To use CIN+ and CIN- pins as analog
inputs, the appropriate bits must be
programmed in the CMCON (±9h) register.
VIN+
VIN-
+
Output
–
The polarity of the comparator output can be inverted
by setting the CINV bit (CMCON<4>). Clearing CINV
results in a non-inverted output. A complete table
showing the output state versus input conditions and
the polarity bit is shown in Table 6-±.
VIN-
VIN+
Output
Note:
CINV bit (CMCON<4>) is clear.
DS41190C-page 36
2003 Microchip Technology Inc.