You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I took a look at the EEPROM code and at avr-libc but I did not find anything that looked like a pre-write value check. I have heard a number of developers prefer to read the eeprom to ensure that it isn't already the value you want to write to it before writing, to save write cycles.
Is the lack of this check intentional to avoid bloat? There isn't very many applications where it would be useful, but there are some cases where it might be useful, as a protection to novice programmers, and in cases where values are mostly the same the speedup would be huge.
It might also come up in the eeprom clear sketch, if someone accidentally left it programmed in, several erase cycles could be wasted for no good reason. Maybe at the very least the eeprom clear sketch should be changed to include a check?
The text was updated successfully, but these errors were encountered:
I took a look at the EEPROM code and at avr-libc but I did not find
anything that looked like a pre-write value check. I have heard a
number of developers prefer to read the eeprom to ensure that it isn't
already the value you want to write to it before writing, to save
write cycles.
I think recent versions of avr-libc have "update" functions in addition
to "write" functions that only do an erase+write if the value actually
changed.
I took a look at the EEPROM code and at avr-libc but I did not find anything that looked like a pre-write value check. I have heard a number of developers prefer to read the eeprom to ensure that it isn't already the value you want to write to it before writing, to save write cycles.
Is the lack of this check intentional to avoid bloat? There isn't very many applications where it would be useful, but there are some cases where it might be useful, as a protection to novice programmers, and in cases where values are mostly the same the speedup would be huge.
It might also come up in the eeprom clear sketch, if someone accidentally left it programmed in, several erase cycles could be wasted for no good reason. Maybe at the very least the eeprom clear sketch should be changed to include a check?
The text was updated successfully, but these errors were encountered: