Store it quickly!

design tip

The EEPROM in a microcontroller is often used to store collected data or device settings so that they are still available even if the device is switched off and then on again. However, there is a limit to the number of write cycles that the EEPROM can endure and so it is not always a good idea to store data at the earliest opportunity: an alternative is to store the data away quickly just before power is lost.