SM59A16U1
8-Bit Micro-controller
64KB with ISP Flash
& 6K+256B RAM embedded
22. OPA/Comparator
SM59A16U1 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. As shown in Fig. 22-1.
Green : Analog
Dx
Blue : Digital
OPx_CALI[2:0]
PDx
x : 0,1,2
HY_ONx
OPx_MINUS
-
OPxO
OPx
+
MUX
OPx_PLUS
level shifter
CxPOSPAD (SFR)
CMPxO
(SFR)
VBG(Bandgap)
1/2 VDD
CxPOSVBG(SFR)
CxPOSVDDD2(SFR)
CmpxOutEN(SFR)
Fig. 22-1: Operation of Comparator Mode
If OPA and Comparator Mode both are enabled at same module, the OPA Mode has higher priority.
The Comparator interrupt vector is 93h.
The OPA/Comparator SFR show as below:
Mnemonic Description
Dir.
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
RST
Comparator
C0Pos
VBG
OpCmp Pin
Select
Op0
En
Cmp0E
n
C0Pos
PAD
Op1
En
C1Pos
VBG
C0Pos
Vddd2
C1Pos
PAD
OpPin
F6h
Cmp1En
00h
00h
OpCmp Pin
OpPin2
C1Pos
Vddd2
CEh
-
-
Select 2
Cmp
0
Out
EN
Cmp
1
Comparator_
Cmp0CON
Hys0
En
CMF0
MS[1:0]
FEh
FFh
Cmp0o
Cmp1o
CMF0
CMF1
Hys0En
Hys1En
-
-
00h
00h
0 control
Comparator_
Cmp1CON
Hys1
En
CMF1
MS[1:0]
1 control
Out
EN
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M071 Ver A SM59A16U1 04/12/2013
- 139 -