Hardware manual

Rev. 3.0, 09/98, page 100 of 361
6.6 Port 5
Port 5 is a 3-bit input/output port that also provides the input and output pins for serial communi-
cation interface 0 (SCI0). The pin functions depend on control bits in the serial control register
(SCR). Pins not used for serial communication are available for general-purpose input/output.
Table 6.13 lists the pin functions, which are the same in both the expanded and single-chip modes.
Table 6.13 Port 5 Pin Functions (Modes 1 to 3)
Usage Pin Functions
I/O port P5
0
P5
1
P5
2
Serial communication interface 0 TxD
0
RxD
0
SCK
0
See section 9, “Serial Communication Interface,” for details of the serial control bits. Pins used by
the serial communication interface are switched between input and output without regard to the
values in the data direction register.
Pins of port 5 can drive a single TTL load and a 30pF capacitive load when they are used as output
pins. They can also drive a Darlington pair.
Table 6.14 details the port 5 registers.
Table 6.14 Port 5 Registers
Name Abbreviation Read/Write Initial Value Address
Port 5 data direction register P5DDR W H'F8 H'FFB8
Port 5 data register P5DR R/W H'F8 H'FFBA
Port 5 Data Direction Register (P5DDR)H'FFB8
Bit:76543210
P5
2
DDR P5
1
DDR P5
0
DDR
Initial value:11111000
Read/Write: WWW
P5DDR is an 8-bit register that selects the direction of each pin in port 5. A pin functions as an
output pin if the corresponding bit in P5DDR is set to “1,” and as an input pin if the bit is cleared
to “0.”