N STEENKAMP [M.ING E&E] wrote: > > 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 I resolved my problem with 1000uf Capacitor on Power of PIC16f84! And a circuit that verify if the power off. When this happen, i have disponible time to record my information with garanty, i think! I put jumper, for the user configurate for a new sequence of Disponible address, for example: JUMPER POSITIONS 0 0 0 0,1,2 0 0 1 2,3,4 0 1 0 5,6,7 . . . . . . Mig.