Microchip Technology MCP1630DM-DDBS1 Data Sheet

Page of 176
©
 2007 Microchip Technology Inc.
DS41211D-page 53
PIC12F683
8.3
Comparator Configuration
There are eight modes of operation for the comparator.
The CM<2:0> bits of the CMCON0 register are used to
select these modes as shown in Figure 8-4.
• Analog function (A): digital input buffer is disabled
• Digital function (D): comparator digital output, 
overrides port function
• Normal port function (I/O): independent of com-
parator
The port pins denoted as “A” will read as a ‘
0
regardless of the state of the I/O pin or the I/O control
TRIS bit. Pins used as analog inputs should also have
the corresponding TRIS bit set to ‘
1
’ to disable the
digital output driver. Pins denoted as “D” should have
the corresponding TRIS bit set to ‘
0
’ to enable the
digital output driver.
FIGURE 8-4:
COMPARATOR I/O OPERATING MODES
Note:
Comparator interrupts should be disabled
during a Comparator mode change to
prevent unintended interrupts.
Comparator Reset (POR Default Value – low power)
Comparator w/o Output and with Internal Reference
CM<2:0> = 
000
CM<2:0> = 
100
Comparator with Output
Multiplexed Input with Internal Reference and Output
CM<2:0> = 
001
CM<2:0> = 
101
Comparator without Output
Multiplexed Input with Internal Reference
CM<2:0> = 
010
CM<2:0> = 
110
Comparator with Output and Internal Reference
Comparator Off (Lowest power)
CM<2:0> = 
011
CM<2:0> = 
111
Legend: A = Analog Input, ports always reads ‘
0
CIS = Comparator Input Switch (CMCON0<3>)
I/O = Normal port I/O
D = Comparator Digital Output
Note 1:
Reads as ‘
0
’, unless CINV = 
1
.
CIN-
CIN+
Off
(1)
A
A
COUT (pin) I/O
CIN-
CIN+
COUT
A
I/O
COUT (pin) I/O
From CV
REF
 Module
CIN-
CIN+
COUT
A
A
COUT (pin) D
CIN-
CIN+
COUT
A
A
COUT (pin)
D
 From CV
REF
 Module
CIS = 
0
CIS = 
1
CIN-
CIN+
COUT
A
A
COUT (pin)
I/O
CIN-
CIN+
COUT
A
A
COUT (pin)
I/O
From CV
REF
 Module
CIS = 
0
CIS = 
1
CIN-
CIN+
COUT
A
I/O
COUT (pin) D
From CV
REF
 Module
CIN-
CIN+
Off
(1)
I/O
I/O
COUT (pin) I/O