We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
Currently i have success download the hex data to SRAM and running the program. Now I would like to save the CODE data on external eeprom whenever power is ON will automatically download the data to SRAM and start running the program without manualy set the /EA to GND.
I have found this method 8051 von Neumann Memory ( http://www.keil.com/download/docs/192.asp ). I'm not sure this method will solve the problem not.
void main (void) { load_vonNeumann_memory (); // Load VN memory
((void (code *) (void)) 0xE000) (); // Call function in VN memory
while (1) // Loop Forever { } }
May i know this load_vonNeumann_memory (); function will be the bootloader portion? Download the hex data to SRAM. The next ((void (code *) (void)) 0xE000) (); function will be the external CODE execution start at 0xE000 address. Am i rite?
I have tested but no work. May be is the "Options for Target" Off-chip Code Memory and Off-chip Xdata memory setting is wrong. Let say, my application code define is :- Off-chip Code Memory: start = 0x0000, size = 0x4FFF Off-chip Xdata memory: start = 0x5000, size = 0xAFFF I'm using 2 32kB SRAM.
How can i do the setting on the 8051 von Neumann Memory? If this method can't make it. Is there any other method to run the external code without doing the /EA to GND setting?
Thank you.