
ML66517 Family User’s Manual
Chapter 4
Memory Control Functions
4 – 4
4.4
READY Function
So that memory and general-purpose ICs with slow access speeds can be connected externally, wait cycles can
be specified to be inserted during external memory accesses. There are two registers that specify the number of
wait cycles, the ROM ready control register (ROMRDY) and the RAM ready control register (RAMRDY).
ROMRDY specifies wait cycles when the external ROM mode is used for the program memory space.
By setting the IRORDY flag to “1”, the same wait cycles specified for external ROM are also set to internal
ROM.
RAMRDY specifies wait cycles when the data memory space is extended externally. Memory can be divided
into the two areas of address 0000H to 7FFFH and 8000H to FFFFH, and wait cycles can be specified for each
area.
Table 4-3 lists the number of wait cycles that can be specified for RAMRDY and ROMRDY.
The number of wait cycles to be inserted during SFR area access can be specified in ROMRDY.
Wait cycles may need to be inserted during an SFR area access. The number of wait cycles is specified with the
ROM ready control register (ROMRDY). For more details on the number of wait cycles during an SFR area
access, refer to the development tool manual for the ML66517 family.
Table 4-3
Wait Cycles
Control register
Number of wait cycles to be inserted
ROMRDY
0 to 3
RAMRDY
0 to 7
4.4.1 ROM Ready Control Register (ROMRDY)
The ROM ready control register (ROMRDY) consists of six bits. ROMRDY specifies the number of wait cycles
during external program memory accesses with bits 0 and 1 (ORDY0 and ORDY1), specifies wait cycle
insertion to internal ROM with bit 2 (IRORDY), and specifies the number of wait cycles during the SFR area
access with bits 4 to 6 (SRDY0 to SRDY2).
ROMRDY can be read from and written to by the program. However, write operations are invalid for bits 3 and
7. When read, bits 3 and 7 are always “1”.
When reset (
RES signal input, execution of a BRK instruction, overflow of the watchdog timer, opcode trap),
ROMRDY becomes 8BH and the largest number of wait cycles are set during external program memory
accesses. Therefore, three wait cycles will be added and inserted when external program memory is accessed.
Figure 4-2 shows the configuration of ROMRDY.