SN8P2740 Series
ADC, OP-amp, Comparator 8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 71
Version 2.0
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
-
P06
P05
P04
P03
P02
P01
P00
Read/Write
-
R/W
R/W
R
R/W
R/W
W
R/W
After reset
-
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
-
P16
P15
P14
P13
P12
P11
P10
Read/Write
-
R/W
R/W
R/W
R/W
R/W
R/W
R/W
After reset
-
0
0
0
0
0
0
0
0D4H
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
P4
P47
P46
P45
P44
P43
P42
P41
P40
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
Note:
1. The P04 keeps
“1” when external reset enable by code option.
2. If set one bit of P0 register (P0.n bit), recommend using
“MOV” or “B0MOV” instructions to
control the bit, not use
“read & modify write” type instructions (e.g. bset, bclr, b0bset,
b0bclr
…), or the write only type bit (P0.1) is modified after executing instruction.
Example: Read data from input port.
B0MOV
A, P0
; Read data from Port 0
B0MOV
A, P4
; Read data from Port 4
Example: Write data to output port.
MOV
A, #0FFH
; Write data FFH to all Port.
B0MOV
P0, A
B0MOV
P4, A
Example: Write one bit data to output port.
B0BSET
P4.0
; Set P4.0 to be
“1”.
B0BCLR
P4.0
; Set P4.0 to be
“0”.