Microchip Technology MA330031-2 Data Sheet

Page of 530
 2011-2013 Microchip Technology Inc.
DS70000657H-page 355
dsPIC33EPXXXGP50X, dsPIC33EPXXXMC20X/50X AND PIC24EPXXXGP/MC20X
25.0
OP AMP/COMPARATOR 
MODULE
The dsPIC33EPXXXGP50X, dsPIC33EPXXXMC20X/
50X and PIC24EPXXXGP/MC20X devices contain up
to four comparators, which can be configured in various
ways. Comparators, CMP1, CMP2 and CMP3, also
have the option to be configured as op amps, with the
output being brought to an external pin for gain/filtering
connections. As shown in 
, individual
comparator options are specified by the comparator
module’s Special Function Register (SFR) control bits.
These options allow users to:
• Select the edge for trigger and interrupt generation
• Configure the comparator voltage reference
• Configure output blanking and masking
• Configure as a comparator or op amp 
(CMP1, CMP2 and CMP3 only)
FIGURE 25-1:
OP AMP/COMPARATOR x MODULE BLOCK DIAGRAM (MODULES 1, 2 AND 3)   
Note 1:
This data sheet summarizes the
features of the dsPIC33EPXXXGP50X,
dsPIC33EPXXXMC20X/50X and
PIC24EPXXXGP/MC20X families of
devices. It is not intended to be a compre-
hensive reference source. To complement
the information in this data sheet, refer to
“Op Amp/Comparator”
 (DS70357) in the
dsPIC33/PIC24 Family Reference Man-
ual
”, which is available from the Microchip
www.microchip.com
).
2:
Some registers and associated bits
described in this section may not be
available on all devices. Refer to
 in
this data sheet for device-specific register
and bit information.
Note:
Op Amp/Comparator 3 is not available on
the dsPIC33EPXXXGP502/MC502/MC202
and PIC24EP256GP/MC202 (28-pin)
devices.
Note:
Not all op amp/comparator input/output
connections are available on all devices.
See the 
 section for
available connections. 
Blanking
Function
Digital
Filter
CxOUT
(1)
(see 
(see 
PTG Trigger
Input
0
1
00
01
CxIN1+
CV
REFIN(1)
CxIN1-
C
X
IN2-
(1)
Note
1:
This input/output is not available as a selection when configured as an op amp (OPMODE (CMxCON<10>) = 1).
2:
This module can be configured either as an op amp or a comparator using the OPMODE bit.
3:
When configured as an op amp (OPMODE = 1), the ADC samples the op amp output; otherwise, the ADC 
samples the ANx pin.
CMPx
+
V
IN
-
V
IN
+
CCH<1:0> (CMxCON<1:0>)
CREF (CMxCON<4>)
Op Amp/Comparator
(2)
Op Ampx
+
OAx/ANx
(3)
OAxOUT/ANx
OPMODE (CMxCON<10>)
(to ADC)
R
INT
1