Checksums And Crc-8'S; Checksums And Crc-8 Checkcodes Defined; Differences Between A Checksum And A Crc-8 Checkcode - Zektor CVS4 User Manual

High definition component video switch
Hide thumbs Also See for CVS4:
Table of Contents

Advertisement

Checksums and CRC-8's

Checksums and CRC-8 Checkcodes Defined

The use of a checksums or CRC-8 checkcodes can increase the reliability of communications
between the controller and any Zektor device.
A checksum is calculated by using an unsigned byte as an accumulator, and adding together all
the ASCII characters of a command string, up to and including the ';' character, while ignoring
any overflow, and appending it as a decimal parameter to the end of the command.
A CRC-8 checkcode is calculated in a very similar way, but a CRC-8 algorithm is used instead of
a simply adding together the ASCII characters. The CRC-8 byte is initialized to 'FF' hex, and the
resultant value is sent inverted (one's compliment).
The CRC polynomial used is: x^8 +x^6 +x^3 +x^2 +1.
This polynomial was determined through exhaustive tests, to be the best CRC-8 polynomial for
arbitrarily lengthed bit streams.
See paper entitled: "Cyclic Redundancy Code (CRC) Polynomial Selection For Embedded
Networks" by Philip Koopman & Tridib Chakravarty. <http://www.ece.cmu.edu/~koopman/roses/
dsn04/koopman04_crc_poly_embedded.pdf>
Another source of CRC information is the CRC entry on Wikipedia, the free encyclopedia:
<http://en.wikipedia.org/wiki/Cyclic_redundancy_check>

Differences between a Checksum and a CRC-8 Checkcode

A CRC is capable of finding many more and different types of errors than a checksum can.
A good description of its capability is described in the above referenced articles, but a simple
example show some of the differences well.
Here's an example of the intended command string:
LI 2,3
Here's some examples of the original and some badly formed strings, of the above example, and
their associated checksums:
LI 2,3;129
LI 3,2;129
IL 2,3;129
KJ 2,3;129
Notice that every checksum is the same. Checksums cannot detected data being out of order.
Checksums cannot detect errors where two bits, in the same position in two different bytes, are
flipped. Checksums are not a very robust way to check for communication errors.
24 CVS4 Component Video Switch

Advertisement

Table of Contents
loading

Table of Contents