Datasheet

2011-2012 Microchip Technology Inc. DS41441C-page 147
PIC12(L)F1840
19.11 Register Definitions: Comparator Control
REGISTER 19-1: CM1CON0: COMPARATOR C1 CONTROL REGISTER 0
R/W-0/0 R-0/0 R/W-0/0 R/W-0/0 U-0 R/W-1/1 R/W-0/0 R/W-0/0
C1ON C1OUT C1OE C1POL
C1SP C1HYS C1SYNC
bit 7 bit 0
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
u = Bit is unchanged x = Bit is unknown -n/n = Value at POR and BOR/Value at all other Resets
‘1’ = Bit is set ‘0’ = Bit is cleared
bit 7
C1ON: Comparator Enable bit
1 = Comparator is enabled
0 = Comparator is disabled and consumes no active power
bit 6
C1OUT: Comparator Output bit
If C1POL =
1 (inverted polarity):
1 = C1VP < C1VN
0 = C1VP > C1VN
If C1POL =
0 (non-inverted polarity):
1 = C1VP > C1VN
0 = C1VP < C1VN
bit 5 C1OE: Comparator Output Enable bit
1 = C1OUT is present on the C1OUT pin. Requires that the associated TRIS bit be cleared to actually
drive the pin. Not affected by C1ON.
0 = C1OUT is internal only
bit 4
C1POL: Comparator Output Polarity Select bit
1 = Comparator output is inverted
0 = Comparator output is not inverted
bit 3
Unimplemented: Read as ‘0
bit 2
C1SP: Comparator Speed/Power Select bit
1 = Comparator operates in normal power, higher speed mode
0 = Comparator operates in low-power, low-speed mode
bit 1
C1HYS: Comparator Hysteresis Enable bit
1 = Comparator hysteresis enabled
0 = Comparator hysteresis disabled
bit 0
C1SYNC: Comparator Output Synchronous Mode bit
1 = Comparator output to Timer1 and I/O pin is synchronous to changes on Timer1 clock source.
Output updated on the falling edge of Timer1 clock source.
0 = Comparator output to Timer1 and I/O pin is asynchronous.