PIC16F630/676
Comparator mode is changed, the comparator output
level may not be valid for a specified period of time.
Refer to the specifications in Section 12.0.
6.2
Comparator Configuration
There are eight modes of operation for the comparator.
The CMCON register, shown in Register 6-1, is used to
select the mode. Figure 6-2 shows the eight possible
modes. The TRISA register controls the data direction
of the comparator pins for each mode. If the
Note: Comparator interrupts should be disabled
during a Comparator mode change. Other-
wise, a false interrupt may occur.
FIGURE 6-2:
COMPARATOR I/O OPERATING MODES
Comparator Reset (POR Default Value - low power)
Comparator Off (Lowest power)
CM2:CM0 = 000
CM2:CM0 = 111
RA1/CIN-
RA0/CIN+
A
A
RA1/CIN-
RA0/CIN+
D
D
Off (Read as '0')
Off (Read as '0')
RA2/COUT
D
RA2/COUT
D
Comparator without Output
Comparator w/o Output and with Internal Reference
CM2:CM0 = 010
CM2:CM0 = 100
RA1/CIN-
RA0/CIN+
A
A
RA1/CIN-
RA0/CIN+
A
D
COUT
COUT
RA2/COUT
D
RA2/COUT
D
From CVREF Module
Comparator with Output and Internal Reference
Multiplexed Input with Internal Reference and Output
CM2:CM0 = 011
CM2:CM0 = 101
RA1/CIN-
RA0/CIN+
A
D
RA1/CIN-
RA0/CIN+
A
A
CIS = 0
CIS = 1
COUT
COUT
RA2/COUT
D
RA2/COUT
D
From CVREF Module
From CVREF Module
Comparator with Output
Multiplexed Input with Internal Reference
CM2:CM0 = 001
CM2:CM0 = 110
RA1/CIN-
RA0/CIN+
A
A
RA1/CIN-
RA0/CIN+
A
A
CIS = 0
CIS = 1
COUT
COUT
RA2/COUT
D
RA2/COUT
D
From CVREF Module
A = Analog Input, ports always reads ‘0’
D = Digital Input
CIS = Comparator Input Switch (CMCON<3>)
© 2007 Microchip Technology Inc.
DS40039E-page 39