English
Language : 

C508_01 Datasheet, PDF (50/267 Pages) Infineon Technologies AG – 8-Bit CMOS Microcontroller
C508
External Bus Interface
4.6.4 Application Example and Performance Analysis
The following example demonstrates the involvement of multiple data pointers in a table
transfer from the code memory to external data memory.
Start address of ROM source table: 1FFFH
Start address of table in external RAM: 2FA0H
Example 1: Using only One Datapointer (Code for a C501)
Initialization Routine
MOV LOW(SRC_PTR), #0FFH ;Initialize shadow_variables with
source_pointer
MOV HIGH(SRC_PTR), #1FH
MOV LOW(DES_PTR), #0A0H ;Initialize shadow_variables with
destination_pointer
MOV HIGH(DES_PTR), #2FH
Table Look-up Routine under Real Time Conditions
PUSH
PUSH
MOV
MOV
INC
CJNE
MOVC
MOV
MOV
MOV
MOV
INC
MOVX
MOV
MOV
POP
POP
DPL
DPH
DPL, LOW(SRC_PTR)
DPH, HIGH(SRC_PTR)
DPTR
…
A,@DPTR
LOW(SRC_PTR), DPL
HIGH(SRC_PTR), DPH
DPL, LOW(DES_PTR)
DPH, HIGH(DES_PTR)
DPTR
@DPTR, A
LOW(DES_PTR), DPL
HIGH(DES_PTR),DPH
DPH
DPL
;
Number of cycles
;Save old datapointer
2
;
2
;Load Source Pointer
2
;
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
2
;load destination_pointer
2
;
2
;
2
;Increment destination_pointer
;(ex. time not relevant)
–
;Transfer byte to destination address 2
;Save destination_pointer
2
;
2
;Restore old datapointer
2
;
2
;Total execution time (machine cycles): 28
User’s Manual
4-8
2001-05