Datasheet

PIC16F526
DS41326E-page 64 2010 Microchip Technology Inc.
REGISTER 10-2: CM2CON0: COMPARATOR C2 CONTROL REGISTER
R-1 R/W-1 R/W-1 R/W-1 R/W-1 R/W-1 R/W-1 R/W-1
C2OUT C2OUTEN
C2POL C2PREF2 C2ON C2NREF C2PREF1 C2WU
bit 7 bit 0
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
bit 7 C2OUT: Comparator Output bit
1 = V
IN+ > VIN-
0 = V
IN+ < VIN-
bit 6 C2OUTEN
: Comparator Output Enable bit
(1), (2)
1 = Output of comparator is NOT placed on the C2OUT pin
0 = Output of comparator is placed in the C2OUT pin
bit 5 C2POL: Comparator Output Polarity bit
(2)
1 = Output of comparator not inverted
0 = Output of comparator inverted
bit 4 C2PREF2: Comparator Positive Reference Select bit
(2)
1 = C1IN+ pin
0 = C2IN- pin
bit 3 C2ON: Comparator Enable bit
1 = Comparator is on
0 = Comparator is off
bit 2 C2NREF: Comparator Negative Reference Select bit
(2)
1 = C2IN- pin
0 = CV
REF
bit 1 C2PREF1: Comparator Positive Reference Select bit
(2)
1 = C2IN+ pin
0 = C2PREF2 controls analog input selection
bit 0 C2WU
: Comparator Wake-up on Change Enable bit
(2)
1 = Wake-up on Comparator change is disabled
0 = Wake-up on Comparator change is enabled.
Note 1: Overrides TOCS bit for TRIS control of RC4.
2: When comparator is turned on, these control bits assert themselves. Otherwise, the other registers have
precedence.