SN8P1602B
8-Bit Micro-Controller
I/O PULL UP REGISTER
ꢀ
SN8P1602B
0BEH
PUR
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
PUR2
W
Bit 1
PUR1
W
Bit 0
PUR0
W
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Read/Write
After reset
0
0
0
ꢁ
Example: I/O Pull up Register
CLR
PUR
; Disable all ports Pull-up register.
MOV
B0MOV
A, #07H
PUR, A
; Enable Port0, 1, 2 Pull-up register,
;
I/O PORT DATA REGISTER
ꢀ
SN8P1602B
0D0H Bit 7
P0
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
P00
R
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Read/Write
After reset
0
ꢀ
SN8P1602B
0D1H
P1
Bit 7
Bit 6
Bit 5
Bit 4
P14
R/W
0
Bit 3
P13
R/W
0
Bit 2
P12
R/W
0
Bit 1
P11
R/W
0
Bit 0
P10
R/W
0
-
-
-
-
-
-
-
-
-
Read/Write
After reset
ꢀ
SN8P1602B
0D2H
P2
Bit 7
P27
R/W
0
Bit 6
P26
R/W
0
Bit 5
P25
R/W
0
Bit 4
P24
R/W
0
Bit 3
P23
R/W
0
Bit 2
P22
R/W
0
Bit 1
P21
R/W
0
Bit 0
P20
R/W
0
Read/Write
After reset
ꢁ
ꢁ
ꢁ
Example: Read data from input port.
B0MOV
B0MOV
B0MOV
A, P0
A, P1
A, P2
; Read data from Port 0
; Read data from Port 1
; Read data from Port 2
Example: Write data to output port.
MOV
B0MOV
B0MOV
A, #55H
P1, A
P2, A
; Write data 55H to Port 1 and Port 2
Example: Write one bit data to output port.
B0BSET
B0BSET
P1.3
P2.5
; Set P1.3 and P2.5 to be “1”.
; Set P1.3 and P2.5 to be “0”.
B0BCLR
B0BCLR
P1.3
P2.5
ꢁ
Example: Port bit test.
B0BTS1
P0.0
P1.2
; Bit test 1 for P0.0
; Bit test 0 for P1.2
B0BTS0
SONiX TECHNOLOGY CO., LTD
Page 62
Version 1.1