ML66525 Family User’s Manual
Chapter 5
Port Functions
5 - 26
5.9
Port 6 (P6)
Port 6 is a 4-bit I/O port.
Each individual bit can be specified as input or output by the port 6
mode register (P6IO).
When output is specified (corresponding bits of P6IO = “1”), the value
of the corresponding bits in the port 6 data register (P6) will be output from their appropriate
pins.
In addition to its port function, P6 is assigned a secondary function (external interrupt input).
If the secondary function input is to be used, reset the corresponding bits of the port 6 mode
register (P6IO) 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 P6IO = “0”) and the port 6 secondary
function control register (P6SF) is set to “1”, the pin inputs corresponding to those bits will be
pulled-up.
If port 6 is set as a secondary function output (P6IOn = 1, P6SFn = 1), the output will be fixed
at “0”, regardless of the value of the port 6 data register.
Figure 5-11 shows the configuration of the port 6 data register (P6), port 6 mode register
(P6IO) and the port 6 secondary function control register (P6SF).
0
000
00
0
1
7
6
5
4
3
2
1
0
P6IO3 P6IO2 P6IO1 P6IO0
P6IO
7
6
5
4
3
2
1
0
P6SF
7
6
5
4
3
2
1
0
P6_3
P6_2
P6_1
P6_0
P6
At reset
P6SF3 P6SF2 P6SF1 P6SF0
0 output*: “0” is output, regardless of the value of the port data register.
“—” indicates a bit that does not exist.
0
1
0
1
0
1
0
000
00
0
000
00
—
At reset
Address: 001E [H]
R/W access: R/W
Address: 0026 [H]
R/W access: R/W
Address: 002E [H]
R/W access: R/W
Not pulled-up
P6_0 input
External interrupt 0
input
Primary function
P6_0 output
0 output*
0 (Input setting)
1 (Output setting)
Pulled-up
Secondary function
Not pulled-up
P6_1 input
External interrupt 1
input
Primary function
P6_1 output
0 output*
Pulled-up
Secondary function
Not pulled-up
P6_2 input
External interrupt 2
input
Primary function
P6_2 output
0 output*
Pulled-up
Secondary function
Not pulled-up
P6_3 input
External interrupt 3
input
Primary function
P6_3 output
0 output*
Pulled-up
Secondary function
——
—
P6IO7 P6IO6 P6IO5 P6IO4
——
—
Figure 5-11
P6, P6IO, P6SF Configuration