
ML66517 Family User’s Manual
Chapter 5
Port Functions
5 – 37
5.17 Port 17 (P17)
Port 17 is a 4-bit I/O port. Each individual bit can be specified as input or output by the port 17 mode register
(P17IO). When output is specified (corresponding bits of P17IO = “1”), the value of the corresponding bits in the
port 17 data register (P17) will be output from their appropriate pins.
In addition to its port function, P17 is assigned secondary functions (such as capture 0 input). If a secondary
function output is to be used, set the corresponding bits of the port 17 mode register (P17IO) and the port 17
secondary function control register (P17SF) to “1”. If a secondary function input is to be used, reset
corresponding bits of the port 17 mode register (P17IO) 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 P17IO = “0”) and the port 17 secondary function control
register (P17SF) is set to “1”, the pin inputs corresponding to those bits will be pulled-up.
If bits 0 and 1 of port 17 are set as secondary function outputs (P17IOn = 1, P17SFn = 1), the output will be
fixed at “0”, regardless of the value of the port 17 data register.
Figure 5-19 shows the configuration of the port 17 data register (P17), port 17 mode register (P17IO) and the
port 17 secondary function control register (P17SF).
Figure 5-19
P17, P17IO, P17SF Configuration
7
6
5
4
3
2
1
0
P17IO3 P17IO2
P17IO1
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
P17_3
P17_2
P17_1
0
CPCMF0
P17SF2
CPCMF1
P17SF3
P17SF1
P17IO0
P17_0
P17SF0
0
Not pulled-up
P17_0 input
Capture 0 input
Primary function
P17_0 output
1
Pulled-up
0 output*
Not pulled-up
P17_1 input
Capture 1 input
Primary function
P17_1 output
Pulled-up
0 output*
Not pulled-up
Primary function
P17_2 output
Pulled-up
Not pulled-up
P17_3 output
Pulled-up
0
1
0
1
0
1
0 (Input setting)
1 (Output setting)
P17IO
At reset
P17SF
At reset
P17
At reset
Address: 00B5 [H]
R/W access: R/W
Address: 00B3 [H]
R/W access: R/W
Address: 00B1 [H]
R/W access: R/W
P17_3 input
Capture 1 input
Primary function
P17_2 input
Capture 0 input
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”.
Secondary function
Secondary function Compare 1 output
Compare 0 output