CHAPTER 4 PORT FUNCTIONS
(2) Registers
(a) Port 4 register (P4)
The port 4 register (P4) is an 8-bit register that controls pin level read and output level write. This
register can be read/written in 8-bit or 1-bit units.
After Reset: Undefined
R/W
Address: FFFFF408H
P4
0
0
0
0
0
P42
P41
P40
P4n
0
Control of output data (in output mode) (n = 0 to 2)
Output 0
Output 1
1
Remark In input mode:
When read, port 4 (P4) returns the current pin level.
When written to, the data written to P4 is written. This has no
influence on the input pins.
In output mode: When read, port 4 (P4) returns the P4 value. When written to, the
value is written to P4 and the written value is immediately output.
(b) Port 4 mode register (PM4)
This is an 8-bit register that specifies the input mode/output mode.
This register can be read/written in 8-bit or 1-bit units.
After Reset: FFH
R/W
1
Address: FFFFF428H
PM4
1
1
1
1
PM42
PM41
PM40
PM4n
Control of I/O mode (n = 0 to 2)
0
1
Output mode
Input mode
User’s Manual U15862EJ3V0UD
166