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