PIC12F629/675
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 TRISIO 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)
Comparator Off (Lowest power)
CM2:CM0 = 111
CM2:CM0 = 000
GP1/CIN-
GP0/CIN+
A
A
GP1/CIN-
GP0/CIN+
D
D
Off (Read as ‘0’)
Off (Read as ‘0’)
GP2/COUT
D
GP2/COUT
D
Comparator without Output
Comparator w/o Output and with Internal Reference
CM2:CM0 = 010
CM2:CM0 = 100
GP1/CIN-
GP0/CIN+
A
A
GP1/CIN-
GP0/CIN+
A
D
COUT
COUT
GP2/COUT
D
GP2/COUT
D
From CVREF Module
Comparator with Output and Internal Reference
Multiplexed Input with Internal Reference and Output
CM2:CM0 = 011
CM2:CM0 = 101
GP1/CIN-
GP0/CIN+
A
D
GP1/CIN-
GP0/CIN+
A
A
CIS = 0
CIS = 1
COUT
COUT
GP2/COUT
D
GP2/COUT
D
From CVREF Module
From CVREF Module
Comparator with Output
Multiplexed Input with Internal Reference
CM2:CM0 = 001
CM2:CM0 = 110
GP1/CIN-
GP0/CIN+
A
A
GP1/CIN-
GP0/CIN+
A
A
CIS = 0
CIS = 1
COUT
COUT
GP2/COUT
D
GP2/COUT
D
From CVREF Module
A = Analog Input, ports always reads ‘0’
D = Digital Input
CIS = Comparator Input Switch (CMCON<3>)
2010 Microchip Technology Inc.
DS41190G-page 39