5-12
MSM66573 Family User's Manual
Chapter 5 Port Functions
5.4
Port 0 (P0)
Port 0 is an 8-bit I/O port. Each individual bit can be specified as input or output by the port
0 mode register (P0IO). When output is specified (corresponding bits of P0IO = "1"), the
value of the corresponding bits in the port 0 data register (P0) will be output from their
appropriate pins.
In addition to its port function, P0 is assigned a secondary function (external memory data
I/O). If the secondary function is to be used, set the corresponding bits of the port 0 mode
register (P0IO) and the port 0 secondary function control register (P0SF) to "1".
If the port is specified as an input (corresponding bits of P0IO = "0") and the port 0 secondary
function control register (P0SF) is set to "1", the pin inputs corresponding to those bits will
be pulled-up.
Figure 5-7 shows the configuration of the port 0 data register (P0), port 0 mode register
(P0IO) and the port 0 secondary function control register (P0SF).
7
P0IO7
6
5
4
3
2
1
0
P0IO6
P0IO3
P0IO2
P0IO1
P0IO0
0
Not pulled-up
P0_0 input
Primary function
P0_0 output
1
Pulled-up
Secondary function
Data 0 I/O
Not pulled-up
P0_1 input
Primary function
P0_1 output
Pulled-up
Secondary function
Data 1 I/O
Not pulled-up
P0_2 input
Primary function
P0_2 output
Pulled-up
Secondary function
Data 2 I/O
Not pulled-up
P0_3 input
Primary function
P0_3 output
Pulled-up
Secondary function
Data 3 I/O
Not pulled-up
P0_4 input
Primary function
P0_4 output
Pulled-up
Secondary function
Data 4 I/O
Not pulled-up
P0_5 input
Primary function
P0_5 output
Pulled-up
Secondary function
Data 5 I/O
Not pulled-up
P0_6 input
Primary function
P0_6 output
Pulled-up
Secondary function
Data 6 I/O
Not pulled-up
P0_7 input
Primary function
P0_7 output
Pulled-up
Secondary function
Data 7 I/O
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0 (Input setting)
1 (Output setting)
P0IO
At reset
(EA = H/L)
7
6
5
4
3
2
1
0
XAD6
P0SF6
P0SF
At reset
(EA = H/L)
7
P0_7
6
5
4
3
2
1
0
P0_6
P0_3
P0_2
P0_1
P0_0
P0
At reset
00
0
00
0/1
XAD3
P0SF3
XAD2
P0SF2
P0IO5
P0IO4
P0_5
P0_4
XAD7
P0SF7
XAD5
P0SF5
XAD4
P0SF4
XAD1
P0SF1
XAD0
P0SF0
Address:
R/W access:
0018 [H]
R/W
Address:
R/W access:
0020 [H]
R/W
Address:
R/W access:
0028 [H]
R/W
Figure 5-7 P0, P0IO, P0SF Configuration