English
Language : 

PIC16F946 Datasheet, PDF (99/274 Pages) Microchip Technology – 64-Pin Flash-Based, 8-Bit CMOS Microcontrollers with LCD Driver and nanoWatt Technology
PIC16F946
8.3 Comparator Configuration
There are eight modes of operation for the comparators.
The CMCON0 register is used to select these modes.
Figure 8-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 19.0 “Electrical
Specifications”.
Note:
Comparator interrupts should be disabled
during a Comparator mode change.
Otherwise, a false interrupt may occur.
FIGURE 8-3:
COMPARATOR I/O OPERATING MODES
Comparators Reset (POR Default Value)
CM<2:0> = 000
Comparators Off
CM<2:0> = 111
RA0/AN0/
C1-/SEG12
RA3/AN3/
A VIN-
A VIN+ C1
C1+/VREF+/SEG15
Off (Read as ‘0’)
RA0/AN0/
D
C1-/SEG12
RA3/AN3/
D
C1+/VREF+/SEG15
VIN-
VIN+ C1
Off (Read as ‘0’)
RA1/AN1/
A
C2-/SEG7
RA2/AN2/
A
C2+/VREF-/COM2
VIN-
VIN+ C2
Two Independent Comparators
CM<2:0> = 100
RA0/AN0/
A
C1-/SEG12
RA3/AN3/
A
C1+/VREF+/SEG15
VIN-
VIN+ C1
RA1/AN1/
A
C2-/SEG7
RA2/AN2/
A
C2+/VREF-/COM2
VIN-
VIN+ C2
Off (Read as ‘0’)
C1OUT
C2OUT
RA1/AN1/
D
C2-/SEG7
RA2/AN2/
D
C2+/VREF-/COM2
VIN-
VIN+ C2
Off (Read as ‘0’)
Four Inputs Multiplexed to Two Comparators
CM<2:0> = 010
RA0/AN0/ A
C1-/SEG12
RA3/AN3/ A
C1+/VREF+/SEG15
CIS = 0
CIS = 1
VIN-
VIN+ C1
RA1/AN1/ A
C2-/SEG7
RA2/AN2/ A
C2+/VREF-/COM2
CIS = 0
CIS = 1
VIN-
VIN+ C2
C1OUT
C2OUT
From CVREF Module
Two Common Reference Comparators
CM<2:0> = 011
RA0/AN0/
A
C1-/SEG12
RA3/AN3/
D
C1+/VREF+/SEG15
VIN-
VIN+ C1
RA1/AN1/
A
C2-/SEG7
RA2/AN2/
A
C2+/VREF-/COM2
VIN-
VIN+ C2
C1OUT
C2OUT
Two Common Reference Comparators with Outputs
CM<2:0> = 110
RA0/AN0/
A
C1-/SEG12
VIN-
VIN+ C1
C1OUT
RA1/AN1/
A
C2-/SEG7
RA2/AN2/
A
C2+/VREF-/COM2
VIN-
VIN+ C2
RA4
C2OUT
RA5
One Independent Comparator with Reference Option
CM<2:0> = 101
RA0/AN0/ D
C1-/SEG12
RA3/AN3/ D
C1+/VREF+/
SEG15
VIN-
VIN+ C1
Off (Read as ‘0’)
RA1/AN1/
C2-/SEG7
RA2/AN2/
C2+/VREF-/
COM2
A
VIN-
A CIS = 0 VIN+ C2
A CIS = 1
Internal 0.6V reference
C2OUT
RA5
Three Inputs Multiplexed to Two Comparators
CM<2:0> = 001
RA0/AN0/
A
C1-/SEG12
RA3/AN3/
A
C1+/VREF+/SEG15
CIS = 0
CIS = 1
VIN-
VIN+ C1
RA1/AN1/
A
C2-/SEG7
RA2/AN2/
A
C2+/VREF-/COM2
VIN-
VIN+ C2
C1OUT
C2OUT
Legend:
A = Analog Input, port reads zeros always.
D = Digital Input.
CIS (CMCON0<3>) is the computer Input Switch.
© 2005 Microchip Technology Inc.
Preliminary
DS41265A-page 97