137
Port Data Register 5 (PDR5)
Bit
7
6
5
4
3
2
1
0
P5
7
P5
6
P5
5
P5
4
P5
3
P5
2
P5
1
P5
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
PDR5 is an 8-bit register that stores data for port 5 pins P5
7
to P5
0
. If port 5 is read while PCR5
bits are set to 1, the values stored in PDR5 are directly read, regardless of the actual pin states. If
port 5 is read while PCR5 bits are cleared to 0, the pin states are read.
Upon reset, PDR5 is initialized to H'00.
Port Control Register 5 (PCR5)
Bit
7
6
5
4
3
2
1
0
PCR5
7
PCR5
6
PCR5
5
PCR5
4
PCR5
3
PCR5
2
PCR5
1
PCR5
0
Initial value
0
0
0
0
0
0
0
0
Read/Write
W
W
W
W
W
W
W
W
PCR5 is an 8-bit register for controlling whether each of the port 5 pins P5
7
to P5
0
functions as an
input pin or output pin. Setting a PCR5 bit to 1 makes the corresponding pin an output pin, while
clearing the bit to 0 makes the pin an input pin. The settings in PCR5 and in PDR5 are valid only
when the corresponding pin is designated as a general I/O pin in PMR5.
Upon reset, PCR5 is initialized to H'00.
PCR5 is a write-only register. All bits are read as 1.
Port Pull-Up Control Register 5 (PUCR5)
Bit
7
6
5
4
3
2
1
0
PUCR5
7
PUCR5
6
PUCR5
5
PUCR5
4
PUCR5
3
PUCR5
2
PUCR5
1
PUCR5
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
PUCR5 controls whether the MOS pull-up of each port 5 pin is on or off. When a PCR5 bit is
cleared to 0, setting the corresponding PUCR5 bit to 1 turns on the MOS pull-up for the
corresponding pin, while clearing the bit to 0 turns off the MOS pull-up.
Upon reset, PUCR5 is initialized to H'00.