Table 9-1 Port Functions
Port
Description
Pins
Mode 1
Mode 2
Mode 3
Mode 4
Mode 5
Mode 6
Mode 7
Port 1
8-bit I/O port
Can drive LEDs
P1
7
to P1
0
/
A
7
to A
0
Address output pins (A
7
to A
0
)
Address output (A
7
to
A
0
) and generic input
DDR = 0:
generic input
DDR = 1:
address output
Generic
input/
output
Port 2
8-bit I/O port
Input pull-up
MOS
Can drive LEDs
P2
7
to P2
0
/
A
15
to A
8
Address output pins (A
15
to A
8
)
Address output (A
15
to
A
8
) and generic input
DDR = 0:
generic input
DDR = 1:
address output
Generic
input/
output
Port 3
8-bit I/O port
P3
7
to P3
0
/
D
15
to D
8
Data input/output (D
15
to D
8
)
Generic
input/
output
Port 4
8-bit I/O port
Input pull-up
MOS
P4
7
to P4
0
/
D
7
to D
0
Data input/output (D
7
to D
0
) and 8-bit generic input/output
8-bit bus mode: generic input/output
16-bit bus mode: data input/output
Generic
input/
output
Port 5
4-bit I/O port
Input pull-up
MOS
Can drive LEDs
P5
3
to P5
0
/
A
19
to A
16
Address output (A
19
to A
16
)
Address output (A
19
to
A
16
) and 4-bit generic
input DDR = 0:
generic input
DDR = 1:
address output
Generic
input/
output
Port 6
7-bit I/O port
P6
6
/
LWR
,
P6
5
/
HWR
,
P6
4
/
RD
,
P6
3
/
AS
P6
2
/
BACK
,
P6
1
/
BREQ
,
P6
0
/
WAIT
P7
7
/AN
7
/DA
1
,
P7
6
/AN
6
/DA
0
P7
5
to P7
0
/
AN
5
to AN
0
P8
4
/CS
0
Bus control signal output (
LWR
,
HWR
,
RD
,
AS
)
Generic
input/
output
Bus control signal input/output (
BACK
,
BREQ
,
WAIT
) and
3-bit generic input/output
Port 7
8-bit I/O port
Analog input (AN
7
, AN
6
) to A/D converter, analog output (DA
1
, DA
0
)
from D/A converter, and generic input
Analog input (AN
5
to AN
0
) to A/D converter, and generic input
Port 8
5-bit I/O port
P8
2
to P8
0
have
Schmitt inputs
DDR = 0: generic input
DDR = 1 (reset value): CS
0
output
Generic
input/
output
P8
3
/CS
1
/IRQ
3
,
P8
2
/CS
2
/IRQ
2
,
P8
1
/CS
3
/IRQ
1
P8
0
/RFSH/IRQ
0
IRQ
3
to IRQ
1
input, CS
1
to CS
3
output, and generic input
DDR = 0 (reset value): generic input
DDR = 1: CS
1
to CS
3
output
IRQ
0
input, RFSH output, and generic input/output
IRQ
3
to
IRQ
0
input and
generic
input/
output
244