Advantages Of Multiple Datapointers; Application Example And Performance Analysis - Siemens C500 User Manual

Microcontroller family
Table of Contents

Advertisement

-
-
-
-
-
.2
DPSEL(92 )
H
DPSEL
Selected
Data-
.2
.1
.0
pointer
0
0
0
DPTR 0
0
0
1
DPTR 1
0
1
0
DPTR 2
0
1
1
DPTR 3
1
0
0
DPTR 4
1
0
1
DPTR 5
1
1
0
DPTR 6
1
1
1
DPTR 7
Figure 2-2
Accessing of External Data Memory via Multiple Datapointers

2.5.3 Advantages of Multiple Datapointers

Using the above addressing mechanism for external data memory results in less code and faster
execution of external accesses. Whenever the contents of the datapointer must be altered between
two or more 16-bit addresses, one single instruction, which selects a new datapointer, does this job.
lf the program uses just one datapointer, then it has to save the old value (with two 8-bit instructions)
and load the new address, byte by byte. This not only takes more time, it also requires additional
space in the internal RAM.

2.5.4 Application Example and Performance Analysis

The following example shall demonstrate the involvement of multiple data pointers in a table
transfer from the code memory to external data memory.
Start address of ROM source table:
Start address of table in external RAM:
Semiconductor Group
.1
.0
DPH(83 )
DPTR7
DPTR0
DPL(82 )
H
H
1FFF H
2FA0 H
2-6
CPU Functions
C500 Family
External Data Memory
MCD00779
1998-04-01

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents