SM59R16A5/SM59R09A5/SM59R05A5
8-Bit Micro-controller
64KB/36KB/20KB with ISP Flash
& 2KB RAM embedded
Opx_En、Cmpx_En、CxPosVBG 及 CxPosPad setting table:
Opx_En
Cmpx_En
CxPosVBG
CxPosPad
OP/Comparator
positive input source
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
GPIO
GPIO
GPIO
N/A
N/A
N/A
N/A
N/A
GPIO
Not Allowed
Comparator
Comparator
Comparator
Not Allowed
OP
Positive pin input voltage
Internal Reference Voltage
Internal Reference Voltage
N/A
Positive pin input voltage
Internal Reference Voltage
NA
OP
Not Allowed
Not Allowed
OP
OP
Not Allowed
N/A
Positive pin input voltage
Internal Reference Voltage
NA
Mnemonic: Cmp0CON
Address:FEh
7
6
5
4
3
2
--
1
--
0
Reset
00h
Hys0En Cmp0o
CMF0MS[1:0]
CMF0
ToADC
Hys0En: Hysteresis function enable
0: disable Hysteresis at comparator_0 input
1: enable
Cmp0o: Comparator_0 output (read only)
0: The positive input source was lower then negative input source
1: The positive input source was higher then negative input source
CMF0MS[1:0] : CMF0(Comparator_0 Flag) setting mode select
00: CMF0 will be set when comprator_0 output toggle
01: CMF0 will be set when comprator_0 output rising
10: CMF0 will be set when comprator_0 output falling
11: reserved
CMF0: Comparator_0 Flag
This bit is setting by hardware according to meet CMF0MS [1:0] select condition.
This bit must clear by software.
ToADC: Select ADC channel as input source of Op0 output
0:set ADC input source as decided by SFR ADCC2 register ADCCH [2:0]
1:set ADC input source ( another ADC channel, not ADC channel 0~7)
Mnemonic: Cmp1CON
Address:FFh
Reset
7
6
5
4
3
2
1
0
Hys1En Cmp1o
CMF1MS[1:0]
CMF1
--
--
--
00h
Hys1En: Hysteresis function enable
0: disable Hysteresis at comparator_1 input
1: enable
Cmp1o: Comparator_1 output (read only)
0: The positive input source was lower then negative input source
1: The positive input source was higher then negative input source
CMF1MS[1:0] : CMF1(Comparator_1 Flag) setting mode select
00: CMF1 will be set when comprator_1 output toggle
01: CMF1 will be set when comprator_1 output rising
10: CMF1 will be set when comprator_1 output falling
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M047 84 Ver.G SM59R16A5 01/2014