English
Language : 

SM39R08A5 Datasheet, PDF (54/58 Pages) SyncMOS Technologies,Inc – Additional Baud Rate Generator
SM39R08A5
8-Bit Micro-controller
with 8KB Flash
& 256B RAM embedded
16. Comparator
SM39R08A5 had integrated a Comparator in chip. This module supports Comparator modes individually according
to user’s configuration. When use it as comparator, the comparator output is logical one when positive input greater
than negative input, otherwise the output is a zero.
Mnemonic
OPPIN
CMP0CON
Description
Comparator
pin select
Comparator
0 control
Addr
F6h
Bit 7
-
Bit 6 Bit 5 Bit 4
Op/Comparator
CMP0EN
C0POS
VBG
C0POS
PAD
FEh HYS0EN CMP0O CMF0MS[1:0]
Bit 3
-
CMF0
Bit 2
-
Cmp0
OutEN
Bit 1
-
-
Bit 0 RESET
-
00h
-
00h
Mnemonic: OPPIN
Address: F6h
7
6
5
4
3
2
1
0
Reset
-
CMP0EN C0POSVBG C0POSPAD
-
-
-
-
00h
CMP0EN : Cmp0 enable.
1: Comparator_0 circuit enable and switch to corresponding signal in
multi-function pin P3.0/P3.1/P3.7 by HW automatically.
C0POSVBG: Select Comparator_0 positive input source
1: set positive input source as internal reference voltage (1.2V±10%)
C0POSPAD: Select Comparator_0 positive input source
1: set positive input source as external pin
Comparator setting table:
CMP0EN
0
1
1
1
1
1
1
C0POSVBG
X
0
0
0
1
1
1
C0POSPAD Cmp0OutEN
X
X
0
X
1
0
1
1
0
0
0
1
1
X
Cmp0PIn
IO
Error
CMP
CMP
IO
IO
Error
Comparator
Cmp0NIn
IO
Error
CMP
CMP
CMP
CMP
Error
Cmp0Out
IO
Error
IO
CMP
IO
CMP
Error
Mnemonic: CMP0CON
7
6
5
4
3
2
1
HYS0EN CMP0O CMF0MS[1:0]
CMF0
Cmp0
OutEN
-
Address:FEh
0
Reset
-
00h
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 than negative input source
1: The positive input source was higher than 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
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M067
Ver E SM39R08A5 06/30/2015
- 54 -