English
Language : 

C509-L_97 Datasheet, PDF (61/290 Pages) Siemens Semiconductor Group – 8-Bit CMOS Microcontroller
External Bus Interface
C509-L
Example 2: Using Two Datapointers (Code for an C509)
Initialization Routine
MOV
MOV
MOV
MOV
DPSEL, #06H
DPTR, #1FFFH
DPSEL, #07H
DPTR, #2FA0H
;Initialize DPTR6 with source pointer
;Initialize DPTR7 with destination pointer
Table Look-up Routine under Real Time Conditions
PUSH
MOV
;INC
;CJNE
MOVC
MOV
DPSEL
DPSEL, #06H
DPTR
…
A,@DPTR
DPSEL, #07H
MOVX @DPTR, A
POP DPSEL
;
Number of cycles
;Save old source pointer
2
;Load source pointer
2
Increment and check for end of table (execution time
not relevant for this consideration)
–
;Fetch source data byte from ROM table 2
;Save source_pointer and
;load destination_pointer
2
;Transfer byte to destination address
2
;Save destination pointer and
;restore old datapointer
2
;
Total execution time (machine cycles): 12
The above example shows that utilization of the C509’s multiple datapointers can make external
bus accesses two times as fast as with a standard 8051 or 8051 derivative. Here, four data variables
in the internal RAM and two additional stack bytes were spared, too. This means for some
applications where all eight datapointers are employed that an C509 program has up to 24 byte (16
variables and 8 stack bytes) of the internal RAM free for other use.
Semiconductor Group
4-9
1997-10-01