| ??? 05/25/03 11:54 Read: times |
#46591 - RE: code into eXternal RAM Responding to: ???'s previous message |
Then my point of view is:
The flash only contents the RAM_downloader and a little interface to start the program. 1st. Download at the flash the new downloader. This new_downloader must do something like: Wait for the input of the 'real' aplication Control the execution of the student's soft. The download can be done from .bin (it is easyest) If you use some interrupts for the new_downloader put a conditional jump at the start of the routine for jumping to the ram if the 'real' app is working. 2nd download the 'real' app After this execute the new code. Change the condition for redirecting the interrupts to the external ram Example ramstart equ 1000h org 0 ljmp start org irq1 ljmp code1 ;first used irq org irq2 ljmp code2 ;second used irq org irq3 ljmp redirected_irq3 ;Not used irq start: ;your downloader code ... ... code1: jnb conditon,lb1 ljmp redirected_irq1 lb1: ;The new_downloader irq1 code ... ... reti code2: jnb condition,lb2 ljmp redirected_irq2 lb2: ;Teh new_downloader irq2 code ... ... reti ; The user's code will be: org ramstart redirected_reset: ljmp new_start org ramstart+irq1 redirected_irq1: ljmp xxx org ramstart+irq2 redirected_irq2: ljmp xxxx org ramstart+irq3 redirected_irq3: ljmp xxxxx If you want to start from 0h you can download to RAM the program, cut the power, change EA and power on again. It was discussed the posibilliti of changing EA while power is on but i dont remember the result of this discussion. Good Luck |



