SN8P26L38
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 81
Version 1.5
Example: Enable P1.0 to open-drain mode and output high.
B0BSET
P1.0
; Set P1.0 buffer high.
B0BSET
P10M
; Enable P1.0 output mode.
MOV
A, #01H
; Enable P1.0 open-drain function.
B0MOV
P1OC, A
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
A, #0
; Disable P1.0 open-drain function.
B0MOV
P1OC, A
Note: After disable P1 open-drain function, P1 mode returns to last I/O mode.