138
Port Mode Register 5 (PMR5)
Bit
7
6
5
4
3
2
1
0
WKP
7
WKP
6
WKP
5
WKP
4
WKP
3
WKP
2
WKP
1
WKP
0
Initial value
0
0
0
0
0
0
0
0
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
PMR5 is an 8-bit read/write register, controlling the selection of pin functions for port 5 pins.
Upon reset, PMR5 is initialized to H'00.
Bit n: P5
n
/
WKP
n
Pin Function Switch (WKPn): This bit selects whether it is used as P5
n
or as
WKP
n
.
Bit n: WKPn
Description
0
Functions as P5
n
I/O pin
(initial value)
1
Functions as
WKP
n
input pin
(n = 7 to 0)
8.4.3
Pin Functions
Table 8.9 shows the port 5 pin functions.
Table 8.9
Port 5 Pin Functions
Pin
Pin Functions and Selection Method
P5
7
/
WKP
7
to
P5
0
/
WKP
0
The pin function depends on bit WKP
n
in PMR5 and bit PCR5
n
in PCR5.
(n = 7 to 0)
WKP
n
0
1
PCR5
n
0
1
*
Pin function
P5
n
input pin
P5
n
output pin
WKP
n
input pin
Note:
*
Don’t care