English
Language : 

PIC24FJ16MC101_12 Datasheet, PDF (210/350 Pages) Microchip Technology – 16-bit Microcontrollers (up to 32 KB Flash and 2 KB SRAM)
PIC24FJ16MC101/102 AND PIC24FJ32MC101/102/104
REGISTER 20-2: CMxCON: COMPARATOR CONTROL REGISTER
R/W-0
R/W-0
R/W-0
U-0
U-0
U-0
CON
COE
CPOL
—
—
—
bit 15
R/W-0
CEVT
R/W-0
COUT
bit 8
R/W-0
R/W-0
EVPOL<1:0>
bit 7
U-0
R/W-0
U-0
—
CREF
—
U-0
R/W-0
R/W-0
—
CCH<1:0>
bit 0
Legend:
R = Readable bit
-n = Value at POR
W = Writable bit
‘1’ = Bit is set
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared
x = Bit is unknown
bit 15
bit 14
bit 13
bit 12-10
bit 9
bit 8
bit 7-6
CON: Comparator Enable bit
1 = Comparator is enabled
0 = Comparator is disabled
COE: Comparator Output Enable bit
1 = Comparator output is present on the CxOUT pin
0 = Comparator output is internal only
CPOL: Comparator Output Polarity Select bit
1 = Comparator output is inverted
0 = Comparator output is not inverted
Unimplemented: Read as ‘0’
CEVT: Comparator Event bit
1 = Comparator event according to EVPOL<1:0> settings occurred; disables future triggers and
interrupts until the bit is cleared
0 = Comparator event did not occur
COUT: Comparator Output bit
When CPOL = 0 (non-inverted polarity):
1 = VIN+ > VIN-
0 = VIN+ < VIN-
When CPOL = 1 (inverted polarity):
1 = VIN+ < VIN-
0 = VIN+ > VIN-
EVPOL<1:0>: Trigger/Event/Interrupt Polarity Select bits
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
DS39997C-page 210
Preliminary
© 2011-2012 Microchip Technology Inc.