5-20
MSM66573 Family User's Manual
Chapter 5 Port Functions
5.8
Port 4 (P4)
Port 4 is an 8-bit I/O port. Each individual bit can be specified as input or output by the port
4 mode register (P4IO). When output is specified (corresponding bits of P4IO = "1"), the
value of the corresponding bits in the port 4 data register (P4) will be output from their
appropriate pins.
In addition to its port function, P4 is assigned a secondary function (external memory
address output). If the secondary function is to be used, set the corresponding bits of the
port 4 mode register (P4IO) and the port 4 secondary function control register (P4SF) to "1".
If the port is specified as an input (corresponding bits of P4IO = "0") and the port 4 secondary
function control register (P4SF) is set to "1", the pin inputs corresponding to those bits will
be pulled-up.
Figure 5-11 shows the configuration of the port 4 data register (P4), port 4 mode register
(P4IO) and the port 4 secondary function control register (P4SF).
Figure 5-11 P4, P4IO, P4SF Configuration
7
P4IO7
6
5
4
3
2
1
0
P4IO6
P4IO3
P4IO2
P4IO1
P4IO0
7
6
5
4
3
2
1
0
XDM6
P4SF6
7
P4_7
6
5
4
3
2
1
0
P4_6
P4_3
P4_2
P4_1
P4_0
00
0
00
0/1
XDM3
P4SF3
XDM2
P4SF2
P4IO5
P4IO4
P4_5
P4_4
XDM7
P4SF7
XDM5
P4SF5
XDM4
P4SF4
XDM1
P4SF1
XDM0
P4SF0
0
Not pulled-up
P4_0 input
Primary function
P4_0 output
1
Pulled-up
Secondary function Address 0 output
Not pulled-up
P4_1 input
Primary function
P4_1 output
Pulled-up
Secondary function Address 1 output
Not pulled-up
P4_2 input
Primary function
P4_2 output
Pulled-up
Secondary function Address 2 output
Not pulled-up
P4_3 input
Primary function
P4_3 output
Pulled-up
Secondary function Address 3 output
Not pulled-up
P4_4 input
Primary function
P4_4 output
Pulled-up
Secondary function Address 4 output
Not pulled-up
P4_5 input
Primary function
P4_5 output
Pulled-up
Secondary function Address 5 output
Not pulled-up
P4_6 input
Primary function
P4_6 output
Pulled-up
Secondary function Address 6 output
Not pulled-up
P4_7 input
Primary function
P4_7 output
Pulled-up
Secondary function Address 7 output
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0 (Input setting)
1 (Output setting)
Address:
R/W access:
002C [H]
R/W
P4IO
At reset
(EA = H/L)
P4SF
At reset
(EA = H/L)
P4
At reset
Address:
R/W access:
0024 [H]
R/W
Address:
R/W access:
001C [H]
R/W