136
7.3.2 Register Descriptions
Table 7-3 summarizes the registers of port 2.
Table 7-3 Port 2 Registers
Initial Value
Address
*
Name
Abbreviation
R/W
Modes 1 and 3
Modes 5 to 7
H'FFC1
Port 2 data
direction register
P2DDR
W
H'FF
H'00
H'FFC3
Port 2 data
register
P2DR
R/W
H'00
H'00
H'FFD8
Port 2 input pull-
up control
register
P2PCR
R/W
H'00
H'00
Note:
*
Lower 16 bits of the address.
Port 2 Data Direction Register (P2DDR): P2DDR is an 8-bit write-only register that can select
input or output for each pin in port 2.
Bit
Modes
1 and 3
Initial value
Read/Write
Initial value
Read/Write
Modes
5 to 7
7
P2 DDR
1
—
0
W
7
6
P2 DDR
1
—
0
W
6
5
P2 DDR
1
—
0
W
5
4
P2 DDR
1
—
0
W
4
3
P2 DDR
1
—
0
W
3
2
P2 DDR
1
—
0
W
2
1
P2 DDR
1
—
0
W
1
0
P2 DDR
1
—
0
W
0
Port 2 data direction 7 to 0
These bits select input or
output for port 2 pins
P2DDR is initialized to H'00 by a reset and in hardware standby mode. In software standby mode
it retains its previous setting. If a P2DDR bit is set to 1, the corresponding pin maintains its output
state in software standby mode.