71M6403
Electronic Trip Unit
SEPTEMBER 2006
Page: 15 of 75
©
2006 TERIDIAN Semiconductor Corporation
REV 1.0
External Data Memory:
While the 80515 can address up to 64KB of external data memory in the space from 0x0000 to
0xFFFF, only the memory ranges shown in Figure 5 contain physical memory. The 80515 writes into external data memory when
the MPU executes a MOVX @Ri,A or MOVX @DPTR,A instruction. The MPU reads external data memory by executing a
MOVX A,@Ri or MOVX A,@DPTR instruction (SFR USR2 provides the upper 8 bytes for the MOVX A,@Ri instruction).
Clock Stretching:
MOVX instructions can access fast or slow external RAM and external peripherals. The three low ordered
bits of the CKCON register define the stretch memory cycles. Setting all the
CKCON
stretch bits to one allows access to very
slow external RAM or external peripherals.
Table 3 shows how the signals of the External Memory Interface change when stretch values are set from 0 to 7. The widths of
the signals are counted in MPU clock cycles. The post-reset state (001) of the CKCON register, which is in bold in the table,
performs the MOVX instructions with a stretch value equal to 1.
CKCON register
Read signals width
Write signal width
CKCON.2
CKCON.1 CKCON.0
Stretch Value
memaddr
memrd
memaddr
memwr
0
0
0 0 1 1 2 1
0
0
1 1 2 2 3 1
0
1
0 2 3 3 4 2
0
1
1 3 4 4 5 3
1
0
0 4 5 5 6 4
1
0
1 5 6 6 7 5
1
1
0 6 7 7 8 6
1
1
1 7 8 8 9 7
Table 3: Stretch Memory Cycle Width
Direct vs Paged Addressing:
There are two types of instructions, differing in whether they provide an eight-bit or sixteen-bit
indirect address to the external data RAM.
In the first type (MOVX A,@Ri), the contents of R0 or R1, in the current register bank, provide the eight lower-ordered bits of
address. The eight high-ordered bits of address are specified with the USR2 SFR. This method allows the user paged access
(256 pages of 256 bytes each) to the full 64KB of external data RAM. In the second type of MOVX instruction (MOVX
A,@DPTR), the data pointer generates a sixteen-bit address. This form is faster and more efficient when accessing very large
data arrays (up to 64 Kbytes), since no additional instructions are needed to set up the eight high ordered bits of address.
It is possible to mix the two MOVX types. This provides the user with four separate data pointers, two with direct access and two
with paged access to the entire 64KB of external memory range.
Dual Data Pointer:
The Dual Data Pointer accelerates the block moves of data. The standard DPTR is a 16-bit register that is
used to address external memory or peripherals. In the 80515 core, the standard data pointer is called DPTR, the second data
pointer is called DPTR1. The data pointer select bit chooses the active pointer. The data pointer select bit is located at the LSB
of the DPS register (DPS.0). DPTR is selected when DPS.0 = 0 and DPTR1 is selected when DPS.0 = 1.
The user switches between pointers by toggling the LSB of the DPS register. All DPTR-related instructions use the currently
selected DPTR for any activity.
The second data pointer may not be supported by certain compilers.
electronic components distributor