
RL78/G1P
CHAPTER 4 PORT FUNCTIONS
R01UH0895EJ0100 Rev.1.00
86
Nov 29, 2019
4.3.2 Port registers (Pxx)
These registers set the output latch value of 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 output latch value is
read
Note
.
These registers can be set by a 1-bit or 8-bit memory manipulation instruction.
Reset signal generation clears these registers to 00H.
Note
If P20 to P27 are set up as analog inputs of the A/D converter, when a port is read while in the input mode, 0 is
always returned, not the pin level.
Figure 4-17. Format of Port Register
Symbol
7 6 5 4 3 2 1 0
Address
After
reset
R/W
P1 P17
Note 3
P16
P15 P14
Note 3
P13
P12 P11
Note 3
P10
FFF01H
00H (output latch) R/W
P2 P27
P26
Note 3
P25
Note 3
P24
Note 3
P23 P22 P21 P20
FFF02H
00H
(output
latch)
R/W
P3 0 0
P35
Note 3
P34
Note 3
P33 P32 P31 P30
FFF03H
00H
(output
latch)
R/W
P4 0 0 0 0 0 0 0
P40
FFF04H
00H
(output
latch)
R/W
P6 0 0 0 0 0 0
P61
P60
FFF06H
00H
(output
latch)
R/W
P12 0 0 0 0 0
P122
P121
0
FFF0CH
Undefined
R/W
Note 1
P13
P137
0 0 0 0 0 0 0
FFF0DH
Note 2
R/W
Note 1
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
Notes 1.
P121, P122, and P137 are read-only.
2.
P137: Undefined
3.
These are not provided in 24-pin products.
Remark
m = 1 to 4, 6, 12, 13; n = 0 to 7