ML66525 Family User’s Manual
Chapter 5
Port Functions
5 - 43
5.18 Port 21 (P21)
Port 21 is a 5-bit I/O port.
Each individual bit can be specified as input or output by the port
21 mode register (P21IO).
When output is specified (corresponding bits of P21IO = “1”), the
value of the corresponding bits in the port 21 data register (P8) will be output from their
appropriate pins.
In addition to its port function, P21 is assigned secondary functions (such as external NAND
Flash memory RDn, WRn output).
If a secondary function output is to be used, set the
corresponding bits of the port 21 mode register (P21IO) and the port 21 secondary function
control register (P21SF) to “1”.
If a secondary function input is to be used, reset
corresponding bits of the port 21 mode register (P21IO) to “0” to configure the input mode
(same input as the primary function input).
If the port is set as an input (corresponding bits of P21IO = “0”) and the port 21 secondary
function control register (P21SF) is set to “1”, the pin inputs corresponding to those bits will be
pulled-up.
If bit 4 of port 21 is set as a secondary function output (P21IO0 = 1, P21SF0 = 1), the output
will be fixed at “0”, regardless of the value of the port 21 data register.
Figure 5-20 shows the configuration of the port 21 data register (P21), port 21 mode register
(P21IO) and the port 21 secondary function control register (P21SF).
0
1
0
1
0
1
0
1
0
1
7
6
5
4
3
2
1
0
P21IO2
P21IO3
P21IO1 P21IO0
P21IO
7
6
5
4
3
2
1
0
P21SF1 P21SF0
P21SF
7
6
5
4
3
2
1
0
P21_3 P21_2 P21_1 P21_0
P21
At reset
00
0
00
0
00
0
P21SF2
P21SF3
P21IO4
P21SF4
P21_4
——
—
——
—
——
—
At reset
Address: 1B81 [H]
R/W access: R/W
Address: 1B83 [H]
R/W access: R/W
Address: 1B85 [H]
R/W access: R/W
Not pulled-up
P21_0 input
Primary function
P21_0 output
FRDn output
0 (Input setting)
1 (Output setting)
Pulled-up
Secondary function
Not pulled-up
P21_1 input
Primary function
P21_1 output
FWRn output
Pulled-up
Secondary function
Not pulled-up
P21_2 input
Primary function
P21_2 output
SIO1 receive clock output
Pulled-up
Secondary function
Not pulled-up
P21_3 input
Primary function
P21_3 output
FCLE output
Pulled-up
Secondary function
Not pulled-up
P21_4 input
FRB input
Primary function
P21_4 output
0 output*
Pulled-up
Secondary function
0 output*: “0” is output, regardless of the value of the port data register.
“—” indicates a bit that does not exist.
If read, the value will be “0”.
Figure 5-20
P21, P21IO, P21SF Configuration