English
Language : 

SN8P2602B Datasheet, PDF (68/95 Pages) SONiX Technology Company – 8-Bit Micro-Controller
SN8P2602B
8-Bit Micro-Controller
7.3 I/O OPEN-DRAIN REGISTER
P1.0 is built-in open-drain function. P1.0 must be set as output mode when enable P1.0 open-drain function.
Open-drain external circuit is as following.
MCU1
U
VCC
Pull-up Resistor
Open-drain pin
MCU2
U
Open-drain pin
The pull-up resistor is necessary. Open-drain output high is driven by pull-up resistor. Output low is sunken by MCU’s
pin.
0E9H
P1OC
Read/Write
After reset
Bit 7
-
-
-
Bit 6
-
-
-
Bit 5
-
-
-
Bit 0
P10OC: P1.0 open-drain control bit
0 = Disable open-drain mode
1 = Enable open-drain mode
Bit 4
-
-
-
Bit 3
-
-
-
Bit 2
-
-
-
Bit 1
-
-
-
Bit 0
P10OC
W
0
¾ Example: Enable P1.0 to open-drain mode and output high.
B0BSET
P1.0
; Set P1.0 buffer high.
B0BSET
MOV
B0MOV
P10M
A, #01H
P1OC, A
; Enable P1.0 output mode.
; Enable P1.0 open-drain function.
’ Note: P1OC is write only register. Setting P10OC must be used “MOV” instructions.
¾ Example: Disable P1.0 to open-drain mode and output low.
MOV
B0MOV
A, #0
P1OC, A
; Disable P1.0 open-drain function.
’ Note: After disable P1.0 open-drain function, P1.0 mode returns to last I/O mode.
SONiX TECHNOLOGY CO., LTD
Page 68
Preliminary Version 0.4