[
Menu
]>[
Guide to use the PIC
]>[
628 Hardware
]>[
SFR
]
SFR explanation for PIC16F628(5)
CMCON ( Comparator Control Register ) 1Fh
This register controls Comparator function.
The value in the parenthesis is in the condition immediately after the turning on.
C2OUT :
Comparator 2 Output
When C2INV = 0:
1
:
V
IN+
> V
IN-
0
:
V
IN+
< V
IN-
When C2INV = 1:
1
:
V
IN+
< V
IN-
0
:
V
IN+
> V
IN-
C1OUT :
Comparator 1 Output
When C1INV = 0:
1
:
V
IN+
> V
IN-
0
:
V
IN+
< V
IN-
When C1INV = 1:
1
:
V
IN+
< V
IN-
0
:
V
IN+
> V
IN-
C2INV :
Comparator 2 Output Inversion
1
:
Output inverted
0
:
Output not inverted
C1INV :
Comparator 1 Output Inversion
1
:
Output inverted
0
:
Output not inverted
CIS :
Comparator Input Switch
When CM2:CM0 = 001
1
:
C1 V
IN-
connects to RA3
0
:
C1 V
IN-
connects to RA0
When CM2:CM0 = 010
1
:
C1 V
IN-
connects to RA3
C2 V
IN-
connects to RA2
0
:
C1 V
IN-
connects to RA0
C2 V
IN-
connects to RA1
CM2-0 :
Comparator Mode
Refer to
Comparator I/O Operating Modes