![](http://datasheet.mmic.net.cn/90000/ML66Q525-NTB_datasheet_3507944/ML66Q525-NTB_346.png)
ML66525 Family User’s Manual
Chapter 16
Bus Port Functions
16 - 1
16 Bus Port Functions
16.1 Overview
The ML66525 family can externally expand program memory (usually ROM) up to a
maximum of 1 MB and data memory (usually RAM) up to a maximum of 1 MB.
Bus ports (A0 to A19, D0 to D7) and control signals (PSENn, RDn, WRn) are used to access
the external program memory and external data memory.
Bus ports are assigned as the secondary functions of port 0 (P0), port 1 (P1), port 2 (P2) and
port 4 (P4).
The 20 address (A0 to A19) lines and 8 data (D0 to D7) lines of the bus are
separate.
Unnecessary upper addresses can be reset as normal I/O ports.
PSENn (P3_1) is used as a strobe signal to read the external program memory.
RDn (P3_2)
and WRn (P3_3) are used as read and write strobes for external data memory.
16.2 Port Operation
16.2.1 Port Operation When Accessing Program Memory
When accessing internal program memory (addresses 0H to 1FFFFH with the EAn pin at a
high level), P0, P1, P2, P3_1 and P4 operate as I/O ports.
When accessing external program memory (the EAn pin at a low level or addresses 20000H to
FFFFFH with the EAn pin at a high level), P0 operates as the program data input port, P1, P2,
and P4 operate as address output ports, and P3_1 operates as the PSENn output port.
If the EAn pin is at a low level, P0, P1, P2, P3_1 and P4 are automatically switched (secondary
function control registers and mode registers are set) to bus port and control signal functions
(hereafter referred to as bus port functions) when reset (RESn signal input, execution of a BRK
instruction, overflow of the watchdog timer, opcode trap).
If the EAn pin is at a high level,
before external program memory is accessed, it is necessary to switch to bus port functions by
setting secondary function control registers and mode registers.
Of the ports that are automatically set as bus port functions when the EAn pin is at a low level,
if upper address or other output is unnecessary, then after reset, those ports can be operated as
I/O ports by resetting their secondary function control register.
Table 16-1 lists the operation of P0, P1, P2, P3_1 and P4 during a program memory access.