Delta D25886 User Manual Page 274

  • Download
  • Add to my manuals
  • Print
  • Page
    / 339
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 273
Appendix A
DVP-MC operating manual A-11
Step 6: Repeat the action of step 2 and step 5 for the next byte in the command message till all bytes are
finished processing. The last content in CRC register is CRC check value. When CRC check value
in command message is transmitted, the high and low byte in calculated CRC check value must
exchange with each other, i.e. the low byte is transmitted first.
Example on calculation of CRC check value with C language
Unsigned char* data Å // Pointer of command message content
Unsigned char length Å // Length of command message content
unsigned int crc_chkunsigned char* data, unsigned char length
{
int j;
unsigned int reg_crc=0Xffff;
whilelength--
{
reg_crc ^= *data++;
for j=0;j<8;j++
{
If reg_crc & 0x01 reg_crc=reg_crc>>1 ^ 0Xa001; /* LSBb0=1 */
else reg_crc=reg_crc >>1;
}
}
return reg_crc; // the value that sent back to the CRC register finally
}
Page view 273
1 2 ... 269 270 271 272 273 274 275 276 277 278 279 ... 338 339

Comments to this Manuals

No comments