Hi, > Another problem with periodic saving is that if power fails during a save > the data may be garbled. One solution to this would be to save two > copies with a scheme such as CRC applied to each copy to check if it is > valid. If upon turning the power back on, a copy fails the CRC the other > one would be used. The bad copy would be fixed by rewriting it from the > good one. (If both copies fail CRC, obviously this is a problem. This > shouldn't happen if it is just power on/off causing garbled data to be > written) A method I have used keeps two copies of the data and a pointer byte. I write alternately to the one or the other. I first write the data and then write the single pointer byte to indicate which of the entries contain the most recent info. This method makes sure that the data you read is always valid (although it might not be the newest data). Niki