147
7.5.3 Pin Functions in Each Mode
The pin functions differ between mode 1, 3 (expanded modes with on-chip ROM disabled), modes
5 and 6 (expanded modes with on-chip ROM enabled), and mode 7 (single-chip mode). The pin
functions in each mode are described below.
Modes 1 and 3: Address output can be selected for each pin in port 5. Figure 7-13 shows the pin
functions in modes 1 and 3.
Port 5
A (output)
A (output)
A (output)
A (output)
19
18
17
16
Figure 7-13 Pin Functions in Modes 1 and 3 (Port 5)
Modes 5 and 6: Address output or generic input can be selected for each pin in port 5. A pin
becomes an address output pin if the corresponding P5DDR bit is set to 1, and a generic input pin
if this bit is cleared to 0. Following a reset, all pins are input pins. To use a pin for address output,
its P5DDR must be set to 1. Figure 7-14 shows the pin functions in modes 5 and 6.
Port 5
A (output)
A (output)
A (output)
A (output)
19
18
17
16
When P5DDR = 1
P5 (input)
P5 (input)
P5 (input)
P5 (input)
3
2
1
0
When P5DDR = 0
Figure 7-14 Pin Functions in Modes 5 and 6 (Port 5)
Mode 7: Input or output can be selected separately for each pin in port 5. A pin becomes an output
pin if the corresponding P5DDR bit is set to 1, and an input pin if this bit is cleared to 0. Figure 7-
15 shows the pin functions in mode 7.