
ML66525 Family User’s Manual
Chapter 5
Port Functions
5 - 16
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-6 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
1
Not pulled-up
P0IO
7
6
5
4
3
2
1
0
XAD6
P0SF6
P0SF
7
P0_7
6
5
4
3
2
1
0
P0_6
P0_3
P0_2
P0_1
P0_0
P0
At reset
(EAn = H/L)
0
00
0
0/1
XAD3
P0SF3
XAD2
P0SF2
P0_0 input
Primary function
P0_0 output
Data 0 I/O
0
1
P0_1 input
0
1
P0_2 input
0
1
P0_3 input
0
1
P0_4 input
0
1
P0_5 input
Address: 0018 [H]
0 (Input setting)
1 (Output setting)
R/W access: R/W
P0IO5 P0IO4
P0_5
P0_4
XAD7
P0SF7
XAD5
P0SF5
XAD4
P0SF4
XAD1
P0SF1
XAD0
P0SF0
0
1
P0_6 input
0
1
P0_7 input
0/1
0/10/1
0/1
0/10/1
Pulled-up
Secondary function
At reset
(EAn = H/L)
Address: 0020 [H]
R/W access: R/W
Address: 0028 [H]
R/W access: R/W
Not pulled-up
Pulled-up
Not pulled-up
Pulled-up
Not pulled-up
Pulled-up
Not pulled-up
Pulled-up
Not pulled-up
Pulled-up
Not pulled-up
Pulled-up
Not pulled-up
Pulled-up
Primary function
P0_1 output
Data 1 I/O
Secondary function
Primary function
P0_2 output
Data 2 I/O
Secondary function
Primary function
P0_3 output
Data 3 I/O
Secondary function
Primary function
P0_4 output
Data 4 I/O
Secondary function
Primary function
P0_5 output
Data 5 I/O
Secondary function
Primary function
P0_6 output
Data 6 I/O
Secondary function
Primary function
P0_7 output
Data 7 I/O
Secondary function
Figure 5-6
P0, P0IO, P0SF Configuration