Hello, I have a problem with one of my projects. I used the freeRam() function and library to detect how much free RAM there is and it said about 1200KB. When I called delay() in one of my functions, it somehow jumped to a location in Setup, executed that, and went back to the beginning of the function the code was in the middle of executing. I have no idea why this happens and I've always expected the Arduino to be a regular computing device that should not have such a problem. Is it a bug?
The thing is, I've been thinking it's a memory error as it is known to cause random behavior, but this?
I want to experiment, so I am wondering whether there is an upgrade to ATMEGA328 that has 2.5KB or more memory.
What's the most I can put on my system?
davidl_i:
Hello, I have a problem with one of my projects. I used the freeRam() function and library to detect how much free RAM there is and it said about 1200KB.
I WANT one of those 1.2 MByte Arduinos!
As waski said, post your code. Assuming you meant 1200 bytes, rather than 1200 KB, your problem is likely in your code. Free RAM is only meaningful in a program that has no bugs, and in which you are not fragmenting the memory with things like String objects.
In memory, I am referring to RAM, not the flash the code uses. The code compiles with no warnings or errors, and runs perfectly for a few minutes to a few hours. Then, the code acts up.