Go Down

Topic: Writing to EEPROM hangs Arduino? (Read 930 times) previous topic - next topic

gbravetti

Hi,
I did a project on an Arduino Mega and all worked flawlessly, now I ported my project to an Arduino Pro and when I try to write to EEPROM (first memory positions) the Arduino Pro hangs. I changed the memory positions to higher positions, then there is no more hanging, but it doesn't works as expected, values not written properly and strange behaviors happent.

Any thing that has to be considered when porting a project from Arduino Mega to Arduino Pro regarding writing and reading EEPROM?

Thanks!

Arduino Mega AT MEGA 1280
Arduino Pro (Sparkfun)- MEGA328P, 5V. 16Mhz.

James C4S

The Mega has more EEPROM (4k) than the Pro (1k).

What are the actual addresses you are trying to write to?  It might be more helpful to post your actual code.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

retrolefty

Also less SRAM for variables, arrays, and strings, 2K Vs 8K. Perhaps your running out of space? Posting sketch is next step.

Lefty

liudr

Very possible for running out of SRAM scenario if your program behaves poorly and unpredictably and hangs. Post your code, plus, give us an overview of what your code should do.

gbravetti

Hey guys thanks for your help!

I fixed it, it was something on the code, I just clean up the code a bit and all is working now, sorry :)

My confusion was because it worked on the mega, about EEPROM size, I'm just writing 20 bytes so EEPROM size won't be a problem.

Thanks again!


Go Up