
CHAPTER 4 PORT FUNCTIONS
User’s Manual U15905EJ2V1UD
107
(2) Registers
(a) Port register 3 (P3)
Port register 3 (P3) is an 8-bit register that controls reading the pin level and writing the output level. This
register can be read or written in 8-bit or 1-bit units.
0
Outputs 0.
Outputs 1.
P3n
0
1
Controls output data (in output mode) (n = 0 to 2)
P3
0
P32
P31
P30
After reset: Undefined
R/W
Address: FFFFF406H
Remarks 1. In input mode:
When port 3 (P3) is read, the pin level at that time is read. When written, the
data written to P3 is written. The input pin is not affected.
In output mode: When port 3 (P3) is read, the value of P3 is read. When a value is written to P3,
it is immediately output.
2. After reset, an undefined value (pin input level) is read from P3 in the input mode. When P3 is
read in the output mode, 00H (value of the output latch) is read.
(b) Port mode register 3 (PM3)
This is an 8-bit register that specifies the input or output mode.
This register can be read or written in 8-bit or 1-bit units.
1
Output mode
Input mode
PM3n
0
1
Controls input/output mode (n = 0 to 2)
PM3
1
PM32
PM31
PM30
After reset: FFH
R/W
Address: FFFFF426H