Thread: Save a variable
View Single Post
  #5   Spotlight this post!  
Unread 16-04-2005, 13:45
RyanMcE RyanMcE is offline
Still Learning...
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2002
Location: Bellevue, WA
Posts: 60
RyanMcE will become famous soon enough
Re: EEPROM Lifetimes

Quote:
Originally Posted by ConKbot of Doom
Ok lets do the math, 1,000,000/(38cycles/sec*3600 seconds/hr)=7.3 hours. not a lot of time.

Once per second gives 277 hours, longer, probably longer than you will need for the robot. But depending on the variable, it could be longer.

How often does the variable change? if it is not that often, you could detect when it changes, and then save it.
Good points - it seems to me) that 277 hours is longer than most robots are on, in their lifetimes. Nevertheless, you are right - only writing when you need to is a better solution than writing periodically.

What I had in mind, however, was a variable that is constantly changing (like position, for example), but you don't want to exhaust your EEPROM. So you write only every second. That gives you reasonably up-to-date information, but many fewer write cycles, greatly extending the life of your EEPROM.
__________________
Titan Robotics Club (Team 492) Co-Founder, Alumni & Mentor

#1 in the Northwest: 2001 Silicon Valley Regional Rookie All-Star Award || 2001 Galileo Incredible Play Award || 2002 Southern California Regional Judge's Award || 2002 Pacific Northwest Regional Finalist || 2003 Silicon Valley Regional Entrepreneurship Award || 2003 Pacific Northwest Regional Website Award || 2003 Pacific Northwest Regional Finalist || 2003 Pacific Northwest Regional Engineering Inspiration Award || 2004 Pacific Northwest Website Award || 2004 Pacific Northwest Regional Champions (#1 seed) || 2004 Galileo Semi-Finalist || 2005 Pacific Northwest Regional General Motors Industiral Design Award || 2005 Pacific Northwest Regional Champions (#1 seed) || 2005 Galileo Finalist

"We'll do better next time" -- Team Motto