English
Language : 

PIC16F631_08 Datasheet, PDF (100/306 Pages) Microchip Technology – 20-Pin Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology
PIC16F631/677/685/687/689/690
REGISTER 8-1: CM1CON0: COMPARATOR C1 CONTROL REGISTER 0
R/W-0
R-0
R/W-0
R/W-0
U-0
C1ON
C1OUT
C1OE
C1POL
—
bit 7
R/W-0
C1R
R/W-0
C1CH1
R/W-0
C1CH0
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 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1-0
C1ON: Comparator C1 Enable bit
1 = Comparator C1 is enabled
0 = Comparator C1 is disabled
C1OUT: Comparator C1 Output bit
If C1POL = 1 (inverted polarity):
C1OUT = 0 when C1VIN+ > C1VIN-
C1OUT = 1 when C1VIN+ < C1VIN-
If C1POL = 0 (non-inverted polarity):
C1OUT = 1 when C1VIN+ > C1VIN-
C1OUT = 0 when C1VIN+ < C1VIN-
C1OE: Comparator C1 Output Enable bit
1 = C1OUT is present on the C1OUT pin(1)
0 = C1OUT is internal only
C1POL: Comparator C1 Output Polarity Select bit
1 = C1OUT logic is inverted
0 = C1OUT logic is not inverted
Unimplemented: Read as ‘0’
C1R: Comparator C1 Reference Select bit (non-inverting input)
1 = C1VIN+ connects to C1VREF output
0 = C1VIN+ connects to C1IN+ pin
C1CH<1:0>: Comparator C1 Channel Select bit
00 = C1VIN- of C1 connects to C12IN0- pin
01 = C1VIN- of C1 connects to C12IN1- pin
10 = C1VIN- of C1 connects to C12IN2- pin
11 = C1VIN- of C1 connects to C12IN3- pin
Note 1: Comparator output requires the following three conditions: C1OE = 1, C1ON = 1 and corresponding
PORT TRIS bit = 0.
DS41262E-page 98
© 2008 Microchip Technology Inc.