SM59R16A5/SM59R09A5/SM59R05A5
8-Bit Micro-controller
64KB/36KB/20KB with ISP Flash
& 2KB RAM embedded
21. OPA/Comparator
SM59R16A5 had integrated an OPA/Comparator module on chip. This module supports OPA and Comparator
modes individually according to user’s configuration. When OPA Mode enabled, dual OP-Amps may be applied to
single or two-stage amplifier network, and may be applied as a front-end signal process and internally routed to
specific ADC channel. When Comparator Mode enabled, an internal reference voltage is available to be configured
on comparator terminals.
If OPA and Comparator Mode both are enabled at same module, the OPA Mode has higher priority.
The OPA/Comparator SFR show as below:
RESET
Mnemonic Description
Addr
Bit 7
Bit 6
Bit 5
Op/Comparator
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Cmp1_En C1PosVBG
C1PosPad 00h
OpCmp Pin
Cmp0_En
OpPin
Select
F6h Op0_En
C0PosVBG C0PosPad Op1_En
Cmp0CO Comparator
FEh Hys0En Cmp0o
FFh Hys1En Cmp1o
CMF0MS[1:0]
CMF1MS[1:0]
CMF0
CMF1
--
--
--
--
ToADC
--
00h
00h
N
_0 control
Cmp1CO Comparator
_1 control
N
Mnemonic: OpPin
Address: F6h
7
6
5
4
3
2
1
0
Reset
Op0_En Cmp0_En C0PosVBG C0PosPad Op1_En Cmp1_En C1PosVBG C1PosPad
00h
Op0_En : Op0 enable.
1: Op0 circuit enables and switch to corresponding signal in multi-function pin
P2.5/P2.6/P2.7 by HW automatically.
Cmp0_En : Cmp0 enable.
1: Comparator_0 circuit enables and switch to corresponding signal in
multi-function pin P2.5/P2.6/P2.7 by HW automatically.
C0PosVBG : Select Comparator_0 positive input source
1: set positive input source as internal reference voltage (1.23V±10%)
C0PosPad: Select Comparator_0 positive input source
1: set positive input source as external pin
Op1_En: Op1 enable.
1:Op1 circuit enables and switch to corresponding signal in multi-function pin
P2.2/P2.3/P2.4 by HW automatically.
Cmp1_En : Cmp1 enable.
1: Comparator_1 circuit enables and switch to corresponding signal in
multi-function pin P2.2/P2.3/P2.4 by HW automatically.
C1PosVBG: Select Comparator_1 positive input source
1: set positive input source as internal reference voltage (1.23V±10%)
C1PosPad: Select Comparator_1 positive input source
1: set positive input source as external pin
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M047 83 Ver.G SM59R16A5 01/2014