CHAPTER 14 PORT FUNCTIONS
User’s Manual U14359EJ4V0UM
478
14.3.5 Port 4
Port 4 is a 6-bit I/O port that can be set to the input or output mode in 1-bit units.
7
6
5
4
3
2
1
0
Address
After reset
P4
–
–
P45
P44
P43
P42
P41
P40
FFFFF408H
Undefined
Bit position
Bit name
Function
5 to 0
P4n
(n = 5 to 0)
Port 4
I/O port
In addition to their function as port pins, the port 4 pins can also operate as the serial interface (UART0/CSI0,
UART1/CSI1) I/O in the control mode.
(1) Operation in control mode
Port
Alternate Function
Remark
Block Type
P40
TXD0/SO0
G
P41
RXD0/SI0
H
P42
SCK0
Serial interface (UART0/CSI0) I/O
M
P43
TXD1/SO1
G
P44
RXD1/SI1
H
Port 4
P45
SCK1
Serial interface (UART1/CSI1) I/O
M
(2) I/O mode/control mode setting
The port 4 I/O mode setting is performed by the port 4 mode register (PM4), and the control mode setting is
performed by the port 4 mode control register (PMC4) and the port 4 function control register (PFC4).
(a) Port 4 mode register (PM4)
This register can be read/written in 8-bit or 1-bit units.
7
6
5
4
3
2
1
0
Address
After reset
PM4
1
1
PM45
PM44
PM43
PM42
PM41
PM40
FFFFF428H
FFH
Bit position
Bit name
Function
5 to 0
PM4n
(n = 5 to 0)
Port Mode
Specifies input/output mode for P4n pin
0: Output mode (output buffer on)
1: Input mode (output buffer off)