PIC16F688
If the Comparator mode is changed, the comparator
output level may not be valid for the specified mode
change delay shown in Section 14.0 “Electrical Spec-
ifications”.
7.3
Comparator Configuration
There are eight modes of operation for the comparators.
The CMCON0 register is used to select these modes.
Figure 7-3 shows the eight possible modes.
Note:
Comparator interrupts should be disabled
during Comparator mode change.
Otherwise, a false interrupt may occur.
a
FIGURE 7-3:
COMPARATOR I/O OPERATING MODES
Comparators Reset (POR Default Value)
CM<2:0> = 000
Comparators Off
CM<2:0> = 111
A
D
VIN-
VIN-
RA1/AN1
RA1/AN1
Off (Read as ‘0’)
Off (Read as ‘0’)
Off (Read as ‘0’)
C1
C2
C1
C2
VIN+
VIN+
A
D
RA0/AN0
RA0/AN0
A
A
D
VIN-
VIN-
RC1/AN5
RC0/AN4
RC1/AN5
Off (Read as ‘0’)
VIN+
VIN+
D
RC0/AN4
Four Inputs Multiplexed to Two Comparators
Two Independent Comparators
CM<2:0> = 010
CM<2:0> = 100
A
A
VIN-
RA1/AN1
RA1/AN1
CIS = 0
CIS = 1
VIN-
A
C1OUT
C2OUT
C1
VIN+
A
RA0/AN0
C1OUT
C2OUT
C1
C2
RA0/AN0
VIN+
A
A
RC1/AN5
RC0/AN4
VIN-
CIS = 0
CIS = 1
A
A
VIN-
RC1/AN5
RC0/AN4
VIN+
C2
VIN+
From CVREF Module
Two Common Reference Comparators
CM<2:0> = 011
Two Common Reference Comparators with Outputs
CM<2:0> = 110
A
A
VIN-
VIN-
RA1/AN1
RA1/AN1
C1OUT
C1OUT
RA2
C1
C2
C1
C2
VIN+
VIN+
D
RA0/AN0
A
A
A
A
VIN-
VIN-
RC1/AN5
RC0/AN4
RC1/AN5
RC0/AN4
C2OUT
C2OUT
RC4
VIN+
VIN+
One Independent Comparator
CM<2:0> = 101
Three Inputs Multiplexed to Two Comparators
CM<2:0> = 001
D
VIN-
A
RA1/AN1
RA1/AN1
CIS = 0 VIN-
Off (Read as ‘0’)
C1
VIN+
D
A
RA0/AN0
CIS = 1
RA0/AN0
C1OUT
C2OUT
C1
C2
VIN+
A
A
VIN-
A
A
VIN-
RC1/AN5
RC0/AN4
RC1/AN5
RC0/AN4
C2OUT
C2
VIN+
VIN+
Legend: A = Analog Input, ports always read ‘0’
CIS (CMCON0<3>) is the Comparator Input Switch
D = Digital Input
DS41203B-page 56
Preliminary
2004 Microchip Technology Inc.