SN8P2977
8-Bit Micro-Controller with Regulator, PGIA, 24-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 65
Version 1.7
7.4 I/O PORT DATA REGISTER
0D0H
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
P0
P07
P06
P05
P04
P03
P02
P01
P00
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
After reset
0
0
0
0
0
0
0
0
0D1H
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
P1
-
-
-
-
-
-
P11
P10
Read/Write
-
-
-
-
-
-
R/W
R/W
After reset
-
-
-
-
-
-
0
0
0D2H
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
P2
P27
P26
P25
P24
P23
P22
P21
P20
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
After Reset
0
0
0
0
0
0
0
0
0D3H
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
P3
P37
P36
P35
P34
P33
P32
P31
P30
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
After Reset
0
0
0
0
0
0
0
0
Bit [7:0]
Pn0~Pn7:
I/O port data buffer.
(n = 0~1).
0 = Input low or output low.
1 = Input high or output high.
Example: Read data from input port.
B0MOV
A, P0
; Read data from Port 0
B0MOV
A, P1
; Read data from Port 1
Example: Write data to output port.
MOV
A, #0FFH
; Write data FFH to all Port.
B0MOV
P0, A
B0MOV
P1, A
Example: Write one bit data to output port.
B0BSET
P1.0
; Set P1.0 to be
“1”.
B0BCLR
P1.0
; Set P1.0 to be
“0”.