English
Language : 

PIC16F688 Datasheet, PDF (58/174 Pages) Microchip Technology – 14-Pin Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology
PIC16F688
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.
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”.
Note:
Comparator interrupts should be disabled
during a Comparator mode change.
Otherwise, a false interrupt may occur.
FIGURE 7-3:
COMPARATOR I/O OPERATING MODES
Comparators Reset (POR Default Value)
CM<2:0> = 000
RA1/AN1 A
RA0/AN0 A
VIN-
VIN+ C1
Off (Read as ‘0’)
Comparators Off
CM<2:0> = 111
RA1/AN1 D
RA0/AN0 D
VIN-
VIN+ C1
Off (Read as ‘0’)
RC1/AN5 A
RC0/AN4 A
VIN-
VIN+ C2
Off (Read as ‘0’)
Two Independent Comparators
CM<2:0> = 100
RA1/AN1 A
RA0/AN0 A
VIN-
VIN+ C1
C1OUT
RC1/AN5 A
RC0/AN4 A
VIN-
VIN+ C2
C2OUT
Two Common Reference Comparators
CM<2:0> = 011
RA1/AN1 A
RA0/AN0 D
VIN-
VIN+ C1
C1OUT
RC1/AN5 A
RC0/AN4 A
VIN-
VIN+ C2
C2OUT
RC1/AN5 D
RC0/AN4 D
VIN-
VIN+ C2
Off (Read as ‘0’)
Four Inputs Multiplexed to Two Comparators
CM<2:0> = 010
RA1/AN1 A
RA0/AN0 A
CIS = 0
CIS = 1
VIN-
VIN+ C1
C1OUT
RC1/AN5 A
RC0/AN4 A
CIS = 0
CIS = 1
VIN-
VIN+ C2
C2OUT
From CVREF Module
Two Common Reference Comparators with Outputs
CM<2:0> = 110
RA1/AN1 A
VIN-
VIN+ C1
C1OUT
RA2
RC1/AN5 A
RC0/AN4 A
VIN-
VIN+ C2
C2OUT
RC4
One Independent Comparator
CM<2:0> = 101
RA1/AN1 D
RA0/AN0 D
VIN-
VIN+ C1
Off (Read as ‘0’)
RC1/AN5 A
RC0/AN4 A
VIN-
VIN+ C2
C2OUT
Legend: A = Analog Input, ports always read ‘0’
D = Digital Input
Three Inputs Multiplexed to Two Comparators
CM<2:0> = 001
RA1/AN1 A
RA0/AN0 A
CIS = 0 VIN-
CIS = 1
VIN+ C1
C1OUT
RC1/AN5 A
RC0/AN4 A
VIN-
VIN+ C2
C2OUT
CIS (CMCON0<3>) is the Comparator Input Switch
DS41203B-page 56
Preliminary
 2004 Microchip Technology Inc.