Datasheet
2011-2012 Microchip Technology Inc. Preliminary DS41579D-page 173
PIC16(L)F1782/3
20.0 COMPARATOR MODULE
Comparators are used to interface analog circuits to a
digital circuit by comparing two analog voltages and
providing a digital indication of their relative magnitudes.
Comparators are very useful mixed signal building
blocks because they provide analog functionality
independent of program execution. The analog
comparator module includes the following features:
• Independent comparator control
• Programmable input selection
• Comparator output is available internally/externally
• Programmable output polarity
• Interrupt-on-change
• Wake-up from Sleep
• Programmable Speed/Power optimization
•PWM shutdown
• Programmable and fixed voltage reference
20.1 Comparator Overview
A single comparator is shown in Figure 20-1 along with
the relationship between the analog input levels and
the digital output. When the analog voltage at V
IN+ is
less than the analog voltage at V
IN-, the output of the
comparator is a digital low level. When the analog
voltage at V
IN+ is greater than the analog voltage at
V
IN-, the output of the comparator is a digital high level.
The comparators available for this device are located in
Table 20-1.
FIGURE 20-1: SINGLE COMPARATOR
TABLE 20-1: COMPARATOR AVAILABILITY
PER DEVICE
Device C1 C2 C3
PIC16(L)F1782 ●●●
PIC16(L)F1783 ●●●
–
+
VIN+
V
IN-
Output
Output
VIN+
VIN-
Note: The black areas of the output of the
comparator represents the uncertainty
due to input offsets and response time.