| ??? 05/24/03 15:17 Read: times |
#46541 - code into eXternal RAM |
Hi again,
after setuping all the hardware i'm again here with the problem. My code run perfectly from the MCU flash. But the system was intended to run from external memory. Some time ago i searched the net for the program loader to put in MCU flash. Found BOOTSTRAP. ; This program downloading a hexadecimal program file over an asynchronous ; serial link to a code RAM in an 80C51 system. The downloaded code may then ; be executed as the main program for the system. This technique may be used ; in a system that normally connects to a host PC so that the code may come ; from a disk and thus be easily updated. The system RAM must be wired to the ; 80C51 system so that it appears as both data and program memory (wire the ; RAM normally, but use the logical AND of RD and PSEN for the output enable.) But i dont understand one thing. Let's say i wrote TEST.HEX which worked perfectly when put in MCU flash. Now question: as i know, i could with no changes(?) load TEST.HEX into external RAM to run as main program (setting EA low). Right? But what about interrupt vector table??? Does it "overlays" over the MCU flash programs table? I'm confused, because (part from a BOOTSTRP.ASM): ; The following are dummy labels for re-mapped interrupt vectors. The ; addresses should be changed to match the memory map of the target system. ExInt0 EQU 8003h ; Remap address for ext interrupt 0. T0Int EQU 800Bh ; Timer 0 interrupt. ExInt1 EQU 8013h ; External interrupt 1. T1Int EQU 801Bh ; Timer 1 interrupt. SerInt EQU 8023h ; Serial port interrupt. ORG 0000h LJMP Start ; Go to the downloader program. ; The following are intended to allow re-mapping the interrupt vectors to the ; users downloaded program. The jump addresses should be adjusted to reflect ; the memory mapping used in the actual application. ; Other (or different) interrupt vectors may need to be added if the target ; processor is not an 80C51. ORG 0003h ; LJMP ExInt0 ; External interrupt 0. RETI ORG 000Bh ; LJMP T0Int ; Timer 0 interrupt. etc. Why redirecting is needed? Is it BOOTSTRAP's specific? PLEASE, if someone has some other (not so confusing) program for loading code in external RAM, share. Or any tips/suggestion/help/enlightment is very appreciated. I write little bit messy. The point is: i dont understand how easily put the written code in external RAM for operating from external RAM. There is a switch for EA. Thanks, Rob |



