SN8P2740 Series
ADC, OP-amp, Comparator 8-Bit Micro-Controller
7.4 I/O PORT DATA REGISTER
0D0H
P0
Read/Write
After reset
Bit 7
Bit 6
P06
R/W
0
Bit 5
P05
R/W
0
Bit 4
P04
R
Bit 3
P03
R/W
0
Bit 2
P02
R/W
0
Bit 1
P01
W
Bit 0
P00
R/W
0
-
-
-
0
0
0D1H
P1
Read/Write
After reset
Bit 7
Bit 6
P16
R/W
0
Bit 5
P15
R/W
0
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
-
-
-
0D4H
P4
Read/Write
After reset
Bit 7
P47
R/W
0
Bit 6
P46
R/W
0
Bit 5
P45
R/W
0
Bit 4
P44
R/W
0
Bit 3
P43
R/W
0
Bit 2
P42
R/W
0
Bit 1
P41
R/W
0
Bit 0
P40
R/W
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
B0MOV
A, P0
A, P4
; Read data from Port 0
; Read data from Port 4
Example: Write data to output port.
MOV
B0MOV
B0MOV
A, #0FFH
P0, A
P4, A
; Write data FFH to all Port.
Example: Write one bit data to output port.
B0BSET
B0BCLR
P4.0
P4.0
; Set P4.0 to be “1”.
; Set P4.0 to be “0”.
SONiX TECHNOLOGY CO., LTD
Page 71
Version 2.0