Pages: [1]   Go Down
Author Topic: Writing to EEPROM hangs Arduino?  (Read 752 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 63
Posts: 6055
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16514
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Lefty
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley

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!

Logged

Pages: [1]   Go Up
Jump to: