SM39R16A3
内嵌 16KB
具有 ISP 功能的 Flash
和 512B RAM 的 8 位控制器
19.
(Comparator)
比较器
SM39R16A3在片内集成了两组比较器.当比较器使用时,比较器的非反向输入脚大于反向输入脚时,比较器输出脚置高,反
之比较器输出脚置低.
Comparator SFRs 如下所示:
Addr
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
符号
描述
重置值
Comparator
OpCmp Pin
Select
Cmp0CO Comparator_
0 control
Cmp1CO Comparator_
1 control
Cmp0 C0PosVB C0PosP
_En ad
Cmp1_ C1PosV C1PosP
OpPin
F6h
FEh
FFh
-
-
00h
00h
00h
G
En
BG
-
ad
-
Hys0E Cmp0
Cmp0
OutEN
Cmp1
OutEN
CMF0MS[1:0]
CMF1MS[1:0]
CMF0
CMF1
N
n
o
Hys1E Cmp1
-
-
N
n
o
符号: OpPin
地址: F6h
7
6
5
4
3
2
1
0
Reset
Cmp0_E C0PosVB C0PosP
Cmp1_ C1PosVB C1PosP
En ad
-
-
00h
n
G
ad
G
比较器 0 使能位.
Cmp0_En :
1: 比较器 0 电路使能,并自动将多功能之 I/O P0.3/P0.4/P0.6 切换到比较器 0 相应
的信号.
非反向输入端参考内部固定电压(1.2V±10%)使能位
C0PosVBG :
C0PosPad:
Cmp1_En :
1: 使能
非反向输入端电压参考外部输入脚电压使能位
1: 使能
比较器 1 使能位.
1: 比较器 1 电路使能,并自动将多功能之 I/O P0.0/P0.1/P0.2 切换到比较器 1 相应
的信号.
非反向输入端参考内部固定电压(1.2V±10%)使能位
C1PosVBG:
C1PosPad:
1: 使能
非反向输入端电压参考外部输入脚电压使能位
1: 使能
CmpxOut、Cmpx_En、CxPosVBG及CxPosPad 设定参考表:
Comparator
CmpxNIn CmpxOUT
Cmpx_En CxPosVBG CxPosPad CmpxOut_En
CmpxPIn
IO
0
1
1
1
1
X
0
0
1
1
X
1
1
0
0
X
0
1
0
1
IO
CMP
IO
CMP
CMP
IO
IO
CMP
IO
IO
IO
CMP
CMP
CMP
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M066 Ver C SM39R16A3 04/20/2013
- 80 -