Datasheet
2011-2013 Microchip Technology Inc. DS30001037C-page 167
PIC24F16KL402 FAMILY
20.0 COMPARATOR MODULE
Depending on the particular device, the comparator
module provides one or two analog comparators. The
inputs to the comparator can be configured to use any
one of up to four external analog inputs, as well as a
voltage reference input from either the internal band
gap reference, divided by 2 (V
BG/2), or the comparator
voltage reference generator.
The comparator outputs may be directly connected to
the CxOUT pins. When the respective COE equals ‘1’,
the I/O pad logic makes the unsynchronized output of
the comparator available on the pin.
A simplified block diagram of the module is displayed in
Figure 20-1. Diagrams of the possible individual
comparator configurations are displayed in
Figure 20-2.
Each comparator has its own control register,
CMxCON (Register 20-1), for enabling and configuring
its operation. The output and event status of all three
comparators is provided in the CMSTAT register
(Register 20-2).
FIGURE 20-1: COMPARATOR MODULE BLOCK DIAGRAM
Note: This data sheet summarizes the features of
this group of PIC24F devices. It is not
intended to be a comprehensive reference
source. For more information on the
Comparator module, refer to the
“dsPIC33/PIC24 Family Reference
Manual”, “Dual Comparator Module”
(DS39710).
C1
V
IN-
V
IN+
C
XINB
C
XINC
(1)
CXINA
C
XIND
(1)
CVREF
VBG/2
C2
V
IN-
V
IN+
COE
C1OUT
Pin
CPOL
Trigger/Interrupt
Logic
CEVT
EVPOL<1:0>
COUT
CCH<1:0>
CREF
COE
C2OUT
Pin
CPOL
CEVT
EVPOL<1:0>
COUT
Note 1: These inputs are unavailable on 14-pin (PIC24FXXKL100/200) devices.
2: Comparator 2 is unimplemented on PIC24FXXKL10X/20X devices.
(Note 2)
Input
Select
Logic
Trigger/Interrupt
Logic