I am trying to write to a external EEPROM 24LC256 chip and I can get the code to write and read from the chip but when I repower or reset the ARDUINO the values written to the chip reset to zero.
Have you tried running an existing EEPROM library example sketch to verify the hardware?
Do you have a test sketch with only EEPROM functions so we don't have to plow through all the Weather pond "MEGAjunk"?
I am trying to make a counter that writes total counts to External EEPROM but my code sets the EEPROM to zero when I reset the ARDUINO(PRO MINI or MEGA) or repower the board.
I know the hardware works because I get the error "extEEPROM.begin() failed, status = 2" when I remove the 24LC256 EEPROM chip.
Pulling the RAIN pin(#22) low will increment total COUNTS by one and pulling the reset_rain pin(#26) low will set total COUNTS to whatever I have in reset_counter().
I used the eepromTest sketch that is part of the extEEPROM library. It works fine.
Bill
Build upon that step by step instead of trying to unravel what you've already done. By the way, please post your code in code tags, don't post as an attachment.
The library example sketch appears to be designed for a different EEPROM. You must have made changes. Can you please explain what those were? Are you sure that 0x50 is the right I2C address?