On 13 Dec 2017 at 12:13, Isaac M. Bavaresco wrote: > I think you are overthinking it. >=20 > The usual way of doing things is to calculate the CRC before writing the > data and writing the entire record at once, data and CRC. As you are > using EEPROM, it is possible to write the CRC first, so if a write is > aborted midways then there is no possibility of having data without a > CRC in the memory. Or simply put the CRC in the beginning of the record. >=20 > Think of a block memory device (FLASH, diskette of hard disk drives), > each block or sector must be written in a single operation. >=20 > If you do things this way then your concern becomes a lot less important. >=20 > It is always possible for a memory corruption to alter data and CRC at > the same time and make a corrupted record to appear OK, but it is highly > improbable. >=20 > One measure that I think is easy to implement and adds a lot of security > is avoiding sequence number 0xffff. I think you are right, I have been over thinking it. Will simplify my appro= ach,=20 implement it, test it, and let you know the result. Many thanks for your in= put. --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .