English
Language : 

PIC16F676-I Datasheet, PDF (41/132 Pages) Microchip Technology – 14-Pin, Flash-Based 8-Bit CMOS Microcontrollers
PIC16F630/676
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
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 “Electri-
cal Specifications”.
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)
CM2:CM0 = 000
Comparator Off (Lowest power)
CM2:CM0 = 111
RA1/CIN- A
RA0/CIN+ A
RA2/COUT D
Comparator without Output
CM2:CM0 = 010
Off (Read as ‘0’)
RA1/CIN- D
RA0/CIN+ D
Off (Read as ‘0’)
RA2/COUT D
Comparator w/o Output and with Internal Reference
CM2:CM0 = 100
RA1/CIN- A
RA0/CIN+ A
RA2/COUT D
COUT
Comparator with Output and Internal Reference
CM2:CM0 = 011
RA1/CIN- A
RA0/CIN+ D
COUT
RA2/COUT D
From CVREF Module
Multiplexed Input with Internal Reference and Output
CM2:CM0 = 101
RA1/CIN- A
RA0/CIN+ D
RA2/COUT D
COUT
From CVREF Module
Comparator with Output
CM2:CM0 = 001
RA1/CIN- A
RA0/CIN+ A
CIS = 0
CIS = 1
COUT
RA2/COUT D
From CVREF Module
Multiplexed Input with Internal Reference
CM2:CM0 = 110
RA1/CIN- A
RA0/CIN+ A
RA2/COUT D
COUT
A = Analog Input, ports always reads ‘0’
D = Digital Input
CIS = Comparator Input Switch (CMCON<3>)
RA1/CIN- A
RA0/CIN+ A
RA2/COUT D
CIS = 0
CIS = 1
COUT
From CVREF Module
 2010 Microchip Technology Inc.
DS40039F-page 41