> To increase duration of 24xxx functioning inside of PIC system I think I > should > apply something like Hamming coding . Information block consist of 7 > information > byte and 1 correcting code byte . I should correct 1-bit error and > detect another > error situation inside of information block. Hmm... I think Hamming code is probably not your best choice, but I can tell you about it anyhow. > Would someone like to tell me is any information about Hamming coding > theory , with > examples how to generate checking tail and further check information > block with it , > ( maybe CRC or else ) in Internet ? The simplest way to understand Hamming code is to start with a number of buckets, labeled 1 on up. Into every bucket (starting with the lowest) whose number is NOT a power of two, you place a bit. If the bit was a 1, you should toggle the state of all the power-of-two buckets whose numbers go into the bucket number you used (e.g. if you place a "1" into bucket #11, then you should toggle the bits in buckets 1, 2, and 8). The power-of-two buckets are your check bits, the other buckets are your data. Typical arrangements: Four data, 3 check 1 2 3 4 5 6 7 K0 K1 D0 K2 D1 D2 D3 Kn = check bit; Dn = data bit K0 = D0 ^ D1 ^ D3 K1 = D0 ^ D2 ^ D3 K2 = D1 ^ D2 ^ D3 Eight data, 4 check 1 2 3 4 5 6 7 8 9 10 11 12 K0 K1 D0 K2 D1 D2 D3 K3 D4 D5 D6 D7 K0 = D0 ^ D1 ^ D3 ^ D4 ^ D6 K1 = D0 ^ D2 ^ D3 ^ D5 ^ D6 K2 = D1 ^ D2 ^ D3 ^ D7 K3 = D4 ^ D5 ^ D6 ^ D7 If you a number whose check bits don't match, add the numbers of the wrong check bits to get the number of the wrong bit (e.g. if check bits K1 and K3 don't match, you'd add their bucket numbers [2 and 8] to get the number of the wrong bit bucket [bucket 10, D5]). If only one check bit is wrong, then either the check bit itself is in error, or there are multiple errors in the word. Hamming code is nice for hardware implementations because it lends itself to on-the-fly correction and small block sizes [allowing memory words to be checked, corrected, and updated individually]. It's not the best approach from a software point of view, however. A CRC tends to be better for that [I'd suggest an 8-bit CRC would probably do just what you're looking for]. More on those in another post.