Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: help on October 11, 2008, 10:22:29 PM
-
Hi,
Please can anyone help me?
I'm using at89c52. Can you guide me how to do the configuration keil code banking?
I have do some testing. I create x1 common x3 bank's. After i compiled, it just generate the 3 bank hex file. May i know how to generate the common.c hex file? Is it necessary to have common.hex to burn into MCU? The x3 bank.hex will be in to EPROM.
Please can you check for me is it the circuit correct not?
Thank you very much.....
-
Hmmm can you better explain what you are trying to do? I looked at your schematic, but there are a half dozen of unlabeled components . . .
Is it built already and not working?
-
Hi,
Can you guide me how to interface the CODE using the external SRAM?
Actually, I'm using AT89c52 wish to have more then 64k external CODE but is using SRAM.
I was thinking to use the SRAM to store CODE data instate of using ROM. The data in SRAM will be lose after the power is off. So i have a idea which is add another external buffer EEPROM or MMC/SD card when power is ON the external buffer CODE data will copy it to SRAM. With this method i can have a huge memory spacing and no worry about the CODE/DATA limitation. Is it possible to do that? Do you have any idea?
May be have to do the bootloader when power is on. Initial state will using UART to update the CODE in SRAM first. I already did the ASCII to Intel-Hex decode part, I think this is one of the part we need to do.. ???
Sorry, for my previous schematic design. I already re-design back. I haven't built yet but we can using proteus to simulate it.
Feel like very difficult to do... :(
Thank you.
-
Well if you haven't built it already, I'd recommend using another mcu with more memory. It'll save you both the wiring and coding headache, and probably won't cost you a penny more.
My Axon for example has 64K and a bootloader . . .
-
Hi Admin,
Sorry for so late then reply. At this moment no think to change the MCU. If using new MCU, i have to learn from the biginning and do alot of reseach on that. Anyway thank for your advice.
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 (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.