Datasheet
2010 Microchip Technology Inc. DS41326E-page 63
PIC16F526
10.0 COMPARATOR(S)
This device contains two comparators and a
comparator voltage reference.
REGISTER 10-1: CM1CON0: COMPARATOR C1 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
C1OUT C1OUTEN
C1POL C1T0CS C1ON C1NREF C1PREF C1WU
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 C1OUT: Comparator Output bit
1 = V
IN+ > VIN-
0 = V
IN+ < VIN-
bit 6 C1OUTEN
: Comparator Output Enable bit
(1), (2)
1 = Output of comparator is NOT placed on the C1OUT pin
0 = Output of comparator is placed in the C1OUT pin
bit 5 C1POL: Comparator Output Polarity bit
(2)
1 = Output of comparator is not inverted
0 = Output of comparator is inverted
bit 4 C1T0CS
: Comparator TMR0 Clock Source bit
(2)
1 = TMR0 clock source selected by T0CS control bit
0 = Comparator output used as TMR0 clock source
bit 3 C1ON: Comparator Enable bit
1 = Comparator is on
0 = Comparator is off
bit 2 C1NREF: Comparator Negative Reference Select bit
(2)
1 = C1IN- pin
0 = 0.6V V
REF
bit 1 C1PREF: Comparator Positive Reference Select bit
(2)
1 = C1IN+ pin
0 = C1IN- pin
bit 0 C1WU
: 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 T0CS bit for TRIS control of RB2.
2: When comparator is turned on, these control bits assert themselves. Otherwise, the other registers have
precedence.