| ??? 05/24/03 19:37 Read: times |
#46565 - RE: code into eXternal RAM Responding to: ???'s previous message |
Download the 8051 "bible", chapter 1, page1 (talking about basics!) and read about the 8052 memory organisation. You will see that the 8052 is designed to have separate DATA (read RAM) and PROGRAM (read ROM) memories. You can not execute from DATA memory, you can not write to PROGRAM memory. To execute from RAM on an 8052, connect the RAM chip like this:
/WR (P3.6) from 8052 to /WE pin of RAM chip, /PSEN from 8052 to /OE pin of RAM chip. /EA to +5V. This will allow you to write to the RAM chip as external data memory (but not read from it), and read from it as program memory starting from address 01000h. Instructions from 00000h to 00fffh will be executed from internal (EEP)ROM. This solution will of course only do if you don't have a requirement for any external RAM, and you can spare the /WR pin. Sounds a bit weird by the way: more than 4k of code, and 256 bytes of internal RAM is still enough. I would take a long hard look at my code again if I were you, and find some clever tricks to make it shorter! |



