Go Down

Topic: "External" memory for program memory? (Read 4 times) previous topic - next topic

holmes4

In reply to question 2 yes you can it called overlay programming. Its a very old trick from the 1950's/1960's but ..... well look it up.

Mark

jharris1993


In reply to question 2 yes you can it called overlay programming. Its a very old trick from the 1950's/1960's but ..... well look it up.

Mark


Mark,

You are absolutely correct and it has gone under a variety of names over the years.  In fact, modern operating systems use a virtual memory scheme that - at the kernel level - is rather similar.

I was thinking about trying something like that, but wanted to ask first BEFORE banging my head against the floor trying to do something that everyone else knew could not be done.

Thanks for the update!

holmes4

You may also like to look at code relocation where addresses are resolved at load time or using  only addressing via registers for both jumps and load/store op's. But to be realistic you need to asm only! and it's very hard work to write such programs. Better to get a bigger CPU!.

Mark

cr0sh

If you wanted to approach this idea from another angle, one way to do what you want to do would be to write an interpreter that would fit within the limits of the SRAM and Flash; there is likely more than enough space available for that.

It would no longer be an "Arduino" (that is, you couldn't develop using the normal Arduino tools) but that may not be that big of an issue. You'd have to make the interpreter very lean, and it would likely only run on a single ATMega processor. The biggest issue would likely be how to keep the SD card reader code tight and lightweight. It would take a lot of work, but it should be possible. It wouldn't be as fast as a regular Arduino, given the interpretation overhead, but it would work well for most tasks, I think. It might even be easier to develop for.

That's basically what the Parallax Basic Stamp 2 was - a PIC16F57 microcontroller with an external 24LC16B EEPROM. The PIC ran at 20 MHz, with 2K (12 bit) words of flash, 72 (8 bit) bytes of SRAM; the EEPROM was a 16K I2C device. There shouldn't be any reason why you couldn't do the same with the 328 and a similar EEPROM or an SD card.
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

AWOL

I think the OOPIC took the same approach - interpeted code in external EEPROM.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Go Up