153
Port 9 Data Direction Register (P9DDR)
Bit
7
6
5
4
3
2
1
0
P9
7
DDR
P9
6
DDR P9
5
DDR
P9
4
DDR P9
3
DDR
P9
2
DDR P9
1
DDR
P9
0
DDR
Modes 1 and 2
Initial value
Read/Write
Mode 3
Initial value
Read/Write
0
W
1
—
0
W
0
W
0
W
0
W
0
W
0
W
0
W
0
W
0
W
0
W
0
W
0
W
0
W
0
W
P9DDR is an 8-bit readable/writable register that controls the input/output direction of each pin in
port 9. A pin functions as an output pin if the corresponding P9DDR bit is set to 1, and as an input
pin if this bit is cleared to 0. In modes 1 and 2, P9
6
DDR is fixed at 1 and cannot be modified.
P9DDR is a write-only register. Read data is invalid. If read, all bits always read 1.
P9DDR is initialized by a reset and in hardware standby mode. The initial value is H'40 in modes
1 and 2, and H'00 in mode 3. In software standby mode P9DDR retains its existing values, so if a
transition to software standby mode occurs while a P9DDR bit is set to 1, the corresponding pin
remains in the output state.
Port 9 Data Register (P9DR)
Bit
7
6
5
4
3
2
1
0
P9
7
0
R/W
P9
6
—
*
R
P9
5
0
R/W
P9
4
0
R/W
P9
3
0
R/W
P9
2
0
R/W
P9
1
0
R/W
P9
0
0
R/W
Initial value
Read/Write
Note:
*
Determined by the level at pin P9
6
.
P9DR is an 8-bit register that stores data for pins P9
7
to P9
0
. When a P9DDR bit is set to 1, if port
9 is read, the value in P9DR is obtained directly, regardless of the actual pin state, except for P9
6
.
When a P9DDR bit is cleared to 0, if port 9 is read the pin state is obtained. This also applies to
pins used by on-chip supporting modules and for bus control signals. P9
6
always returns the pin
state.
Except for bit P9
6
, P9DR bits are initialized to 0 by a reset and in hardware standby mode. In
software standby mode it retains its existing values.