511
CHAPTER 22 EXTERNAL DEVICE EXPANSION FUNCTION22.1 External Device Expansion Functions
The external device expansion functions connect external devices to areas other than the internal ROM, RAM,
and SFR. Connection of external devices uses ports 4 to 6. Ports 4 to 6 control address/data, read/write strobe,
wait, address strobe etc.
Table 22-1. Pin Functions in External Memory Expansion Mode
Pin function at external device connection Alternate function
Name Function
AD0 to AD7 Multiplexed address/data bus P40 to P47
A8 to A15 Address bus P50 to P57
RD Read strobe signal P64
WR Write strobe signal P65
WAIT Wait signal P66
ASTB Address strobe signal P67
Table 22-2. State of Ports 4 to 6 Pins in External Memory Expansion Mode
Ports and bits Port 4 Port 5 Port 6
Modes 0-7 0 1 2 3 4 5 6 7 0-3 4-7
Single-chip mode Port Port Port Port
256-byte expansion mode Address/data Port Port RD, WR, WAIT, ASTB
4K-byte expansion mode Address/data Address Port Port RD, WR, WAIT, ASTB
16K-byte expansion mode Address/data Address Port Port RD, WR, WAIT, ASTB
Full address mode Address/data Address Port RD, WR, WAIT, ASTB
Caution When the external wait function is not used, the WAIT pin can be used as a port in all modes.