Data Sheet

but you can find more information using Wikipedia [http://en.wikipedia.org/wiki/Cyclic_redundancy_check].
The CRC computation is basically a carryless long division of a CRC “polynomial”, 0x91, into your
message (expressed as a continuous stream of bits), where all you care about is the remainder. The
Tic uses CRC-7, which means it uses an 8-bit polynomial and, as a result, produces a 7-bit remainder.
This remainder is the lower 7 bits of the CRC byte you tack onto the end of your command packets.
The CRC-7 algorithm is as follows:
1. Express your 8-bit CRC-7 polynomial and message in binary, least-significant bit (LSb) first.
The polynomial 0x91 is written as 10001001.
2. Add 7 zeros to the end of your message.
3. Write your CRC-7 polynomial underneath the message so that the LSb of your polynomial is
directly below the LSb of your message.
4. If the LSb of your CRC-7 is aligned under a 1, XOR the CRC-7 with the message to get a
new message; if the LSb of your CRC-7 is aligned under a 0, do nothing.
5. Shift your CRC-7 right one bit. If all 8 bits of your CRC-7 polynomial still line up underneath
message bits, go back to step 4.
6. What’s left of your message is now your CRC-7 result (transmit these seven bits as your CRC
byte when talking to the Tic with CRC enabled).
If you have never encountered CRCs before, this probably sounds a lot more complicated than it really
is. The following example shows that the CRC-7 calculation is not that difficult. For the example, we
will use a two-byte sequence: 0x83, 0x01.
Steps 1 & 2 (write as binary, least significant bit first, add 7 zeros to the end of the message):
CRC-7 Polynomial = [1 0 0 0 1 0 0 1]
message = [1 1 0 0 0 0 0 1] [1 0 0 0 0 0 0 0] 0 0 0 0 0 0 0
Steps 3, 4, & 5:
_______________________________________________
1 0 0 0 1 0 0 1 ) 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
XOR 1 0 0 0 1 0 0 1 | | | | | | | | | | | | | | |
_______________ | | | | | | | | | | | | | | |
1 0 0 1 0 0 0 1 | | | | | | | | | | | | | |
shift ----> 1 0 0 0 1 0 0 1 | | | | | | | | | | | | | |
_______________ | | | | | | | | | | | | | |
1 1 0 0 0 0 0 0 | | | | | | | | | | |
1 0 0 0 1 0 0 1 | | | | | | | | | | |
_______________ | | | | | | | | | | |
1 0 0 1 0 0 1 0 | | | | | | | | | |
1 0 0 0 1 0 0 1 | | | | | | | | | |
_______________ | | | | | | | | | |
1 1 0 1 1 0 0 0 | | | | | | |
1 0 0 0 1 0 0 1 | | | | | | |
_______________ | | | | | | |
1 0 1 0 0 0 1 0 | | | | | |
Tic Stepper Motor Controller User’s Guide © 2001–2018 Pololu Corporation
9. Serial command encoding Page 139 of 150