PIC16CE62X
changed, the comparator output level may not be valid
for the specified mode change delay shown in
Table 13-2.
8.1
Comparator Configuration
There are eight modes of operation for the
comparators.The CMCON register is used to select the
mode. Figure 8-2 shows the eight possible modes. The
TRISA register controls the data direction of the com-
parator pins for each mode. If the comparator mode is
Note: Comparator interrupts should be disabled
during a comparator mode change other-
wise a false interrupt may occur.
FIGURE 8-2: COMPARATOR I/O OPERATING MODES
VIN-
VIN-
A
A
D
D
-
-
Off
Off
RA0/AN0
RA3/AN3
RA0/AN0
RA3/AN3
C1
C2
C1
C2
VIN+
VIN+
(Read as '0')
(Read as '0')
+
+
VIN-
VIN-
A
A
D
D
-
-
Off
Off
RA1/AN1
RA2/AN2
RA1/AN1
RA2/AN2
VIN+
VIN+
(Read as '0')
(Read as '0')
+
+
CM<2:0> = 000
C1OUT
CM<2:0> = 111
Comparators Reset
Comparators Off
VIN-
A
A
A
-
RA0/AN0
CIS=0
CIS=1
VIN-
RA0/AN0
RA3/AN3
-
C1
C2
VIN+
A
C1OUT
RA3/AN3
+
C1
VIN+
+
VIN-
A
A
A
-
RA1/AN1
CIS=0
CIS=1
VIN-
RA1/AN1
RA2/AN2
-
C2OUT
VIN+
A
C2OUT
RA2/AN2
+
C2
VIN+
+
CM<2:0> = 100
From VREF Module
CM<2:0> = 010
Two Independent Comparators
Four Inputs Multiplexed to
Two Comparators
VIN-
VIN-
A
A
-
-
RA0/AN0
RA0/AN0
C1OUT
C1OUT
C1
C2
C1
VIN+
VIN+
D
D
+
+
RA3/AN3
RA3/AN3
VIN-
VIN-
A
A
-
-
RA1/AN1
RA1/AN1
C2OUT
C2OUT
C2
VIN+
VIN+
A
A
+
+
RA2/AN2
RA2/AN2
RA4 Open Drain
CM<2:0> = 011
CM<2:0> = 110
Two Common Reference Comparators
Two Common Rference Comparators with Outputs
VIN-
A
A
CIS=0
VIN-
CIS=1
VIN+
D
D
-
RA0/AN0
RA3/AN3
Off
RA0/AN0
RA3/AN3
-
C1
C2
VIN+
(Read as '0')
C1OUT
+
C1
C2
+
VIN-
A
A
-
VIN-
RA1/AN1
RA2/AN2
A
A
-
C2OUT
RA1/AN1
RA2/AN2
VIN+
C2OUT
+
VIN+
+
CM<2:0> = 101
CM<2:0> = 001
Three Inputs Multiplexed to
Two Comparators
One Independent Comparator
A = Analog Input, Port Reads Zeros Always
D = Digital Input
CIS = CMCON<3>, Comparator Input Switch
DS40182A-page 42
Preliminary
1998 Microchip Technology Inc.