CHAPTER 4 PORT FUNCTIONS
User’s Manual U16899EJ2V0UD
106
(2) Port registers (P0 to P7, P12 to P14)
These registers write the data that is output from the chip when data is output from a port.
If the data is read in the input mode, the pin level is read. If it is read in the output mode, the value of the output
latch is read.
These registers can be set by a 1-bit or 8-bit memory manipulation instruction.
RESET input clears these registers to 00H (but P2 is undefined).
Figure 4-22. Format of Port Register
7
0
Symbol
P0
6
P06
5
P05
4
P04
3
P03
2
P02
1
P01
0
P00
Address
FF00H
After reset
00H (output latch)
R/W
R/W
7
P17
P1
6
P16
5
P15
4
P14
3
P13
2
P12
1
P11
0
P10
FF01H
00H (output latch)
R/W
R
7
P27
P2
6
P26
5
P25
4
P24
3
P23
2
P22
1
P21
0
P20
FF02H
Undefined
7
0
P3
6
0
5
0
4
0
3
P33
2
P32
1
P31
0
P30
FF03H
00H (output latch)
R/W
7
0
P4
6
0
5
0
4
0
3
P43
2
P42
1
P41
0
P40
FF04H
00H (output latch)
R/W
7
0
P5
6
0
5
0
4
0
3
P53
2
P52
1
P51
0
P50
FF05H
00H (output latch)
R/W
7
0
P6
6
0
5
0
4
0
3
P63
2
P62
1
P61
0
P60
FF06H
00H (output latch)
R/W
7
P77
P7
6
P76
5
P75
4
P74
3
P73
2
P72
1
P71
0
P70
FF07H
00H (output latch)
R/W
7
0
P12
6
0
5
0
4
0
3
0
2
0
1
0
0
P120
FF0CH
00H (output latch)
R/W
7
0
P13
6
0
5
0
4
0
3
0
2
0
1
0
0
P130
FF0DH
00H (output latch)
R/W
7
0
P14
6
0
5
0
4
0
3
0
2
0
1
P141
0
P140
FF0EH
00H (output latch)
R/W
m = 0 to 7, 12 to 14; n = 0 to 7
Pmn
Output data control (in output mode)
Input data read (in input mode)
0
Output 0
Input low level
1
Output 1
Input high level