
Pin Functions in Single-Chip Mode:
In the single-chip mode (mode 7), each of the port 3 pins
can be designated as an input pin or an output pin, as indicated in figure 9-7, by setting the
corresponding bit in P3DDR to 1 for output or clearing it to 0 for input.
9.5 Port 4
9.5.1 Overview
Port 4 is an 8-bit input/output port with the pin configuration shown in figure 9-8. In the
expanded modes it provides the low bits (A
7
– A
0
) of the address bus. In the single-chip mode it
operates as a general-purpose input/output port.
Outputs from port 4 can drive one TTL load and a 90 pF capacitive load. They can also drive a
Darlington transistor pair or LED (with 10 mA current sink).
P3
7
(input/output)
P3
6
(input/output)
P3
5
(input/output)
P3
4
(input/output)
P3
3
(input/output)
P3
2
(input/output)
P3
1
(input/output)
P3
0
(input/output)
Port
3
Pin
P4
7
/ A
7
P4
6
/ A
6
P4
5
/ A
5
P4
4
/ A
4
P4
3
/ A
3
P4
2
/ A
2
P4
1
/ A
1
P4
0
/ A
0
Expanded Modes
A
7
(output)
A
6
(output)
A
5
(output)
A
4
(output)
A
3
(output)
A
2
(output)
A
1
(output)
A
0
(output)
Single-Chip Mode
P4
7
(input/output)
P4
6
(input/output)
P4
5
(input/output)
P4
4
(input/output)
P4
3
(input/output)
P4
2
(input/output)
P4
1
(input/output)
P4
0
(input/output)
Port
4
Figure 9-7 Port 3 Pin Functions in Single-Chip Mode
Figure 9-8 Pin Functions of Port 4
156