![](http://datasheet.mmic.net.cn/90000/ML66Q525-NTB_datasheet_3507944/ML66Q525-NTB_135.png)
ML66525 Family User’s Manual
Chapter 5
Port Functions
5 - 30
5.11 Port 8 (P8)
Port 8 is a 4-bit I/O port.
Each individual bit can be specified as input or output by the port 8
mode register (P8IO).
When output is specified (corresponding bits of P8IO = “1”), the value
of the corresponding bits in the port 8 data register (P8) will be output from their appropriate
pins.
In addition to its port function, P8 is assigned secondary functions (such as SIO1 receive data
input).
If a secondary function output is to be used, set the corresponding bits of the port 8
mode register (P8IO) and the port 8 secondary function control register (P8SF) to “1”.
If a
secondary function input is to be used, reset corresponding bits of the port 8 mode register
(P8IO) 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 P8IO = “0”) and the port 8 secondary
function control register (P8SF) is set to “1”, the pin inputs corresponding to those bits will be
pulled-up.
If bit 0 of port 8 is set as a secondary function output (P8IO0 = 1, P8SF0 = 1), the output will
be fixed at “0”, regardless of the value of the port 8 data register.
Figure 5-13 shows the configuration of the port 8 data register (P8), port 8 mode register
(P8IO) and the port 8 secondary function control register (P8SF).
0
000
00
0
1
765
4
3
21
0
76
54
3
2
1
0
76
54
3
2
10
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”.
0
1
0
1
0
1
0
000
00
0
000
00
—
P8IO2
P8IO3
P8IO1 P8IO0
P8IO
TXD1
P8SF1
P8SF0
P8SF
P8_3
P8_2
P8_1
P8_0
P8
At reset
RXC1
P8SF2
PWM3OUT
P8SF7
At reset
Address: 00B8 [H]
R/W access: R/W
Address: 00C0 [H]
R/W access: R/W
Address: 00C8 [H]
R/W access: R/W
Not pulled-up
P8_1 input
Primary function
P8_0 output
0 output*
0 (Input setting)
1 (Output setting)
Pulled-up
Secondary function
Not pulled-up
Pulled-up
Not pulled-up
Pulled-up
Not pulled-up
Pulled-up
P8_1 output
SIO1 transmit data output
P8_0 input
SIO1 receive
data input
SIO1 receive clock output
P8_2 output
SIO1 transmit clock output
P8_3 output
P8_2 input
SIO1 receive
clock input
P8_3 input
SIO1 transmit
clock input
Primary function
Secondary function
Primary function
Secondary function
Primary function
Secondary function
——
—
P8IO7 P8IO6
—
P8IO4
PWM2OUT
P8SF6
P8SF3
PWM4OUT
P8SF4
TXC1
—
Figure 5-13
P8, P8IO, P8SF Configuration