Datasheet
dsPIC33EPXXXGM3XX/6XX/7XX
DS70000689D-page 372 2013-2014 Microchip Technology Inc.
bit 7-6 EVPOL<1:0>: Trigger/Event/Interrupt Polarity Select bits
(3)
11 = Trigger/event/interrupt generated on any change of the comparator output (while CEVT = 0)
10 = Trigger/event/interrupt generated only on high-to-low transition of the polarity selected comparator
output (while CEVT = 0)
If CPOL =
1 (inverted polarity):
Low-to-high transition of the comparator output.
If CPOL =
0 (non-inverted polarity):
High-to-low transition of the comparator output.
01 = Trigger/event/interrupt generated only on low-to-high transition of the polarity selected comparator
output (while CEVT = 0)
If CPOL =
1 (inverted polarity):
High-to-low transition of the comparator output.
If CPOL =
0 (non-inverted polarity):
Low-to-high transition of the comparator output.
00 = Trigger/event/interrupt generation is disabled.
bit 5 Unimplemented: Read as ‘0’
bit 4 CREF: Comparator Reference Select bit (V
IN+ input)
(1)
1 = VIN+ input connects to internal CVREFIN voltage
0 = V
IN+ input connects to CxIN1+ pin
bit 3-2 Unimplemented: Read as ‘0’
bit 1-0 CCH<1:0>: Op Amp/Comparator Channel Select bits
(1)
11 = Inverting input of op amp/comparator connects to CxIN4- pin
10 = Inverting input of op amp/comparator connects to CxIN3- pin
01 = Inverting input of op amp/comparator connects to CxIN2- pin
00 = Inverting input of op amp/comparator connects to CxIN1- pin
REGISTER 26-2: CMxCON: OP AMP/COMPARATOR x CONTROL
REGISTER (x = 1, 2, 3 OR 5) (CONTINUED)
Note 1: Inputs that are selected and not available will be tied to VSS. See the “Pin Diagrams” section for available
inputs for each package.
2: The op amp and the comparator can be used simultaneously in these devices. The OPMODE bit only
enables the op amp while the comparator is still functional.
3: After configuring the comparator, either for a high-to-low or low-to-high COUT transition
(EVPOL<1:0> (CMxCON<7:6>) = 10 or 01), the Comparator Event bit, CEVT (CMxCON<9>), and the
Comparator Combined Interrupt Flag, CMPIF (IFS1<2>), must be cleared before enabling the
Comparator Interrupt Enable bit, CMPIE (IEC1<2>).