![](http://datasheet.mmic.net.cn/390000/PD784054GCA2_datasheet_16826984/PD784054GCA2_45.png)
μ
PD784054(A)
45
9.1 Memory Expansion
The external program memory or data memory can be expanded from 256 bytes up to 1M bytes in seven
steps.
When an external device is connected, the address/data bus and read/write strobe signals are controlled by
using ports 4 through 6 and P90 through P93 pins. The functions of these ports and pins are set by the memory
expansion mode register (MM).
Table 9-1. Setting of Pin Function
Memory Expansion
Pin Function
Mode Register
Port 4
Port 5
Port 6
MM0-MM3
P40-P47
P50-P57
P60-P63
P90-P93
Port mode
General-purpose port
External memory
expansion mode
AD0-AD7
AD8 to AD15 are set stepwise.
Rest of pins can be used as
general-purpose port pins.
A16 through A19 are set
stepwise.
Rest of pins can be used as
general-purpose port pins.
P90 : RD
P91 : LWR
P92 : HWR
P93 : ASTB
Remark
AD8 through AD15 are used as address bus.
The number of pins of ports 5 and 6 that are used as address bus pins can be changed according to the size
of the external memory connected (external address space), so that the external memory can be expanded
stepwise. The pins not used as address bus pins can be used as general-purpose I/O port pins (refer to
Table
9-2
). The external address space can be set in seven steps by MM.
Table 9-2. Operations of Ports 5 and 6 (in external memory expansion mode)
Port 5
Port 6
External address space
P50
P51
P52
P53
P54
P55
P56
P57
P60
P61
P62
P63
General-purpose port
256 bytes or less
Note
AD8
AD9
1K bytes or less
Note
AD10
AD11
4K bytes or less
Note
AD12
AD13
16K bytes or less
Note
AD14
AD15
64K bytes or less
A16
A17
256K bytes or less
A18
A19
1M bytes or less
Note
When the external 16-bit bus is specified, do not set MM such that the external address space is of this size.
Caution
When the external 16-bit bus is specified, set MM such that all the pins of port 5 (P50 through P57)
are used as AD pins (AD8 through AD15).