Datasheet

© 2008 Microchip Technology Inc. DS41249E-page 65
PIC16F785/HV785
REGISTER 9-1: CM1CON0: COMPARATOR C1 CONTROL REGISTER 0
R/W-0 R-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
C1ON C1OUT C1OE C1POL C1SP C1R C1CH1 C1CH0
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 C1ON: Comparator C1 Enable bit
1 = C1 Comparator is enabled
0 = C1 Comparator is disabled
bit 6 C1OUT: Comparator C1 Output bit
If C1POL =
1 (inverted polarity):
C1OUT = 1, C1VP < C1VN
C1OUT = 0, C1VP > C1VN
If C1POL =
0 (non-inverted polarity):
C1OUT = 1, C1VP > C1VN
C1OUT = 0, C1VP < C1VN
bit 5 C1OE: Comparator C1 Output Enable bit
1 = C1OUT is present on the RA2/AN2/T0CKI/INT/C1OUT pin
(1)
0 = C1OUT is internal only
bit 4 C1POL: Comparator C1 Output Polarity Select bit
1 = C1OUT logic is inverted
0 = C1OUT logic is not inverted
bit 3 C1SP: Comparator C1 Speed Select bit
1 = C1 operates in normal speed mode
0 = C1 operates in low-power, slow speed mode
bit 2 C1R: Comparator C1 Reference Select bit (non-inverting input)
1 = C1VP connects to C1V
REF output
0 = C1VP connects to RA0/AN0/C1IN+/ICSPDAT
bit 1-0 C1CH<1:0>: Comparator C1 Channel Select bits
00 = C1VN of C1 connects to RA1/AN1/C12IN0-/V
REF/ICSPCLK
01 = C1VN of C1 connects to RC1/AN5/C12IN1-/PH1
10 = C1VN of C1 connects to RC2/AN6/C12IN2-/OP2
11 = C1VN of C1 connects to RC3/AN7/C12IN3-/OP1
Note 1: C1OUT will only drive RA2/AN2/T0CKI/INT/C1OUT if: (C1OE = 1) and (C1ON = 1) and (TRISA<2> = 0).