Hello i was wondering if a eeprom can run a arduino sketch off of it if the arduino uno runs out of space?
No. Hard to think of running out of flash on a arduino mega2560 board, but I guess it's possible. Is that your problem?
problem is i can't use a mega or 2560 chip my project is setup with the 328p chip and running out of memory. I do have 1 256k eeprom chip and 1mb eeprom chip. so not sure what to do unless maybe can use another 328p chip just for the sketch maybe?
Can you define what you mean by "setup with the 328p chip"? What, specifically, about your project ties you to this chip?
sorry let me re phrase what i mean my project is not over it's limit of space yet but there the sketch there is taking of half space it's at like 16.something k in size was just wondering if it reaches it's limit what can i do from what I'm reading and a friend telling me if go over the 32k in size that there will be some problems so that is why I'm asking. minus the second 328 sorry didn't mean that part what i meant was of using a second 328 just maybe for extra memory space. sorry new to this memory thing.
Data can be stored in EEPROM. The sketch will not execute code from EEPROM.
You can run an interpretive program called bitlash that will run code stored outside of flash.
Or step up to a microController with more Flash and SRAM; 1284P has 128K flask, 16K SRAM (Mega2560 has 8K SRAM).
I have kits ready to go, and send assembled boards also.
http://www.crossroadsfencing.com/BobuinoRev17/
okay great information thank you.
josephchrzempiec:
problem is i can't use a mega or 2560 chip my project is setup with the 328p chip and running out of memory.
How much would you need? You can usually reduce the program a lot by optimizing it.
If it has big data tables then maybe you could put those tables in your EEPROM chips.
I still don't understand why, if you run into serious space limitations around which you can't optimise, you can't simply use a 2560 chip. Your reply doesn't make this clear.
Hello the reason why i can't use a mega is because of 2 reasons one is i all ready made my project on a pcb pinhole pcb board everything is finished but didn't realize the size of the sketch size right now it's not full but getting there and still adding more to it. second thing i don't have a mega chip i would have to use a pre made board. don't have one either.
The Arduino compiler is very agressive with function inlining. You can save a LOT of memory by telling it not to inline common functions.
Add this to your program:
#define NOINLINE attribute ((noinline))
Then go through and add it to functions, eg.
void foo()
{
}
becomes:
NOINLINE void foo()
{
}
You also need to learn to disassemble the program to see exactly which functions are causing the most trouble. Use objdump for this (google "arduino objdump")
