C509-L_97 SIEMENS [Siemens Semiconductor Group], C509-L_97 Datasheet - Page 61

no-image

C509-L_97

Manufacturer Part Number
C509-L_97
Description
8-Bit CMOS Microcontroller
Manufacturer
SIEMENS [Siemens Semiconductor Group]
Datasheet
Example 2: Using Two Datapointers (Code for an C509)
Initialization Routine
MOV
MOV
MOV
MOV
Table Look-up Routine under Real Time Conditions
PUSH
MOV
;INC
;CJNE
MOVC
MOV
MOVX
POP
;
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
DPSEL, #06H
DPTR, #1FFFH
DPSEL, #07H
DPTR, #2FA0H
DPSEL
DPSEL, #06H
DPTR
A,@DPTR
DPSEL, #07H
@DPTR, A
DPSEL
;Initialize DPTR6 with source pointer
;Initialize DPTR7 with destination pointer
;
;Save old source pointer
;Load source pointer
Increment and check for end of table (execution time
not relevant for this consideration)
;Fetch source data byte from ROM table
;Save source_pointer and
;load destination_pointer
;Transfer byte to destination address
;Save destination pointer and
;restore old datapointer
Total execution time (machine cycles):
4-9
External Bus Interface
Number of cycles
12
1997-10-01
2
2
2
2
2
2
C509-L

Related parts for C509-L_97