Datasheet

PIC12F609/615/617/12HV609/615
DS41302D-page 72 2010 Microchip Technology Inc.
REGISTER 9-1: CMCON0: COMPARATOR CONTROL REGISTER 0
R/W-0 R-0 R/W-0 R/W-0 U-0 R/W-0 U-0 R/W-0
CMON COUT CMOE CMPOL CMR CMCH
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 CMON: Comparator Enable bit
1 = Comparator is enabled
0 = Comparator is disabled
bit 6 COUT: Comparator Output bit
If C1POL =
1 (inverted polarity):
COUT = 0 when CMVIN+ > CMVIN-
COUT = 1 when CMV
IN+ < CMVIN-
If C1POL =
0 (non-inverted polarity):
COUT = 1 when CMVIN+ > CMVIN-
COUT = 0 when CMV
IN+ < CMVIN-
bit 5 CMOE: Comparator Output Enable bit
1 = COUT is present on the COUT pin
(1)
0 = COUT is internal only
bit 4 CMPOL: Comparator Output Polarity Select bit
1 = COUT logic is inverted
0 = COUT logic is not inverted
bit 3 Unimplemented: Read as0
bit 2 CMR: Comparator Reference Select bit (non-inverting input)
1 = CMVIN+ connects to CMVREF output
0 = CMV
IN+ connects to CIN+ pin
bit 1 Unimplemented: Read as0
bit 0 CMCH: Comparator C1 Channel Select bit
0 = CMVIN- pin of the Comparator connects to CIN0-
1 = CMV
IN- pin of the Comparator connects to CIN1-
Note 1: Comparator output requires the following three conditions: CMOE = 1, CMON = 1 and corresponding port
TRIS bit = 0.