1. Port 9 Data Direction Register (P9DDR)—H'FEFE
P9DDR is an 8-bit register that selects the direction of each pin in port 9. A pin functions as an
output pin if the corresponding bit in P9DDR is set to 1, and as an input pin if the bit is cleared to
0.
P9DDR can be written but not read. An attempt to read this register does not cause an error, but
all bits are read as 1, regardless of their true values.
At a reset and in the hardware standby mode, P9DDR is initialized to H'00, setting all pins for
input. P9DDR is not initialized in the software standby mode, so if a P9DDR bit is set to 1 when
the chip enters the software standby mode, the corresponding pin continues to output the value in
the port 9 data register.
A transition to the software standby mode initializes the on-chip supporting modules, so any pins
of port 9 that were being used by an on-chip module (example: free-running timer output) when
the transition occurs revert to general-purpose input or output, controlled by P9DDR and P9DR.
2. Port 9 Data Register (P9DR)—H'FEFF
P9DR is an 8-bit register containing the data for pins P9
7
to P9
0
. When the CPU reads P9DR, for
output pins it reads the value in the P9DR latch, but for input pins, it obtains the pin status
directly.
9.10.3 Pin Functions
The pin functions of port 9 are the same in all MCU operating modes. As figure 9-21 indicated,
these pins are used for output of on-chip timer signals and for input and output of serial data and
clock signals as well as for general-purpose input and output. Specifically, they carry output
signals for free-running timers 2 and 3, pulse-width modulation (PWM) timer output signals, and
input and output signals for the serial communication interfaces.
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
Initial value
0
0
0
0
0
0
0
0
Read/Write
W
W
W
W
W
W
W
W
Bit
7
6
5
4
3
2
1
0
P9
7
P9
6
P9
5
P9
4
P9
3
P9
2
P9
1
P9
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
179