English
Language : 

PIC32MX440F256H-80I Datasheet, PDF (547/646 Pages) Microchip Technology – 64/100-Pin General Purpose and USB 32-Bit Flash Microcontrollers
24.2 Comparator Operation
24.2.1 COMPARATOR CONFIGURATION
The Comparator module has a flexible input and output
configuration to allow the module to be tailored to the
needs of the application. The PIC32MX3XX/4XX com-
parator module has individual control over the enables,
output inversion, output on I/O pin and input selections.
The VIN+ pin of each comparator can select from an
input pin or the CVREF. The VIN- input of the compara-
tor can select from one of 3 input pins or the IVREF. In
addition, the module has two individual comparator
event generation control bits. These control bits can be
used for detecting when the output of an individual
comparator changes to a desired state or changes
states.
If the Comparator mode is changed, the comparator
output level may not be valid for the specified mode
change delay (refer to the device data sheet for more
information).
Note:
Comparator interrupts should be disabled
during a Comparator mode change;
otherwise, a false interrupt may be gener-
ated.
A single comparator is shown in the upper portion of
Figure 24-2. The lower portion represents the relation-
ship between the analog input levels and the digital out-
put. When the analog input at VIN+ is less than the
analog input at 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 the lower portion of
Figure 24-2 demonstrate the uncertainty that is due to
input offsets and the response time of the comparator.
PIC32MX3XX/4XX
24.3 Comparator Inputs
Depending on the Comparator Operating mode, the
inputs to the comparators may be from two input pins
or a combination of an input pin and one of two internal
voltage references. The analog signal present at VIN- is
compared to the signal at VIN+ and the digital output of
the comparator is set or cleared according to the result
of the comparison (see Figure 24-2).
FIGURE 24-2:
SINGLE COMPARATOR
VIN+
+
VIN-
–
Output
VIN-
VIN+
Output
24.3.0.1
External Reference Signal
An external voltage reference may be used with the
comparator by using the output of the reference as an
input to the comparator. Refer to the device data sheet
for input voltage limits.
24.3.0.2 Internal Reference Signals
The CVREF module and the IVREF can be used as
inputs to the comparator (see Figure 24-1). The CVREF
provides a user-selectable voltage for use as a compar-
ator reference. Refer to 25.0 “Comparator Refer-
ence” of this manual for more information on this
module. The IVREF has a fixed, 1.2V output that does
not change with the device supply voltage. Refer to the
device data sheet for specific details and accuracy of
this reference.
© 2008 Microchip Technology Inc.
Preliminary
DS61143E-page 545