User Manual
TMCC160 TMCL Firmware Version 2.11 • 2018-FEB-08 | Document Revision 1.01 • 2018-FEB-08
5/57
© 2015 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany — Terms of delivery and rights
to technical change reserved. Download newest version at: www.trinamic.com .
Read entire documentation; especially the 6 “Supplemental Directives” (page 51).
The checksum is calculated by adding up all bytes (including the module address byte)
using 8-bit addition. Here is a C-example for the calculation:
i In case of CAN communication, the checksum is omitted. Consequently, the
request format then only consists of 8 bytes.
Checksum
Calculation
unsigned char i, Checksum;
unsigned char Command[9];
Checksum = Command[0];
for(i=1; i<8; i++) { Checksum+=Command[i]; }
Command[8]=Checksum; // insert checksum as last byte of the command
// Now, send the command back to the module
Calculation Examples 1: C-Example for Checksum Calculation