AMM80 • SSI, BiSS, & RS-485
for (i=0; i<8; ++i) CRC[i] = 0;// Init before
calculation
for (i=0; i<strlen(BitString); ++i)
{
DoInvert = ('1'==BitString[i]) ^ CRC[7];//
XOR required?
CRC[7] = CRC[6];
CRC[6] = CRC[5];
CRC[5] = CRC[4];
CRC[4] = CRC[3];
CRC[3] = CRC[2];
CRC[2] = CRC[1];
CRC[1] = CRC[0];
CRC[0] = DoInvert;
}
for (i=0; i<8; ++i) CRC8 += CRC[i] ? (1<<i) :
0;
return(CRC8);
}
MAN AMM80 SSI_BiSS_RS485 E 1.5.odt 7 – RS-485 serial interface 51 of 60
Содержание AMM80
Страница 57: ...This page intentionally left blank...
Страница 58: ...This page intentionally left blank...
Страница 59: ...This page intentionally left blank...