Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

EEPROM write on the hour
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

EEPROM write on the hour

by mike31416 on Wed Sep 16, 2009 6:08 pm

Looks like the EEPROM is updated each hour with the current hour and minutes. clock_init is called by main at startup and restores the time from EEPROM. The signal comparator function SIGNAL(SIG_COMPARATOR) stores the current minutes and seconds on power down.

Could the hour also be stored by SIGNAL(SIG_COMPARATOR) instead of being stored on the hour in the one second timer function SIGNAL (TIMER2_OVF_vect)?

It seems good to minimize the EEPROM writes. If you update it once and hour it will last for 11.5 years per the spec (100,000 updates). Seems like a long time and the display should be good for ten years so many be its not really an issue.

Heck I don't even know if I will be here 11 years from now ;)

Also looks like the wakeup function is not used.

Got to get a USBtinyISP soon so I can start hacking!!!

Mike

mike31416
 
Posts: 126
Joined: Wed Aug 26, 2009 12:06 pm

Re: EEPROM write on the hour

by adafruit on Wed Sep 16, 2009 11:12 pm

yes we need to upload the latest firmware where we get rid of wakeup() it is an extraneous function
however we did the math on eeprom writes and decided that the -minimum- life was 10+ yrs and that we were happy with that.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Please be positive and constructive with your questions and comments.