JBUS protocol (continued)
CRC 16 algorithm
If the CRC 16 is calculated using the above algorithm, the least significant byte is transmitted first.
|
|
| Hex FFFF |
|
|
|
|
| CRC 16 BYTE |
|
|
|
|
| n = 0 |
|
|
|
|
| CRC 16 shift to the right |
|
|
|
| no | remainder | yes |
|
|
|
|
| CRC 16 poly |
|
|
|
| n = n+1 |
|
|
|
| no | n > 7 | yes |
|
|
|
| no | end of message | yes |
|
|
| following byte |
|
|
|
|
|
|
| END |
| = | exclusive or |
|
| |
n | = | number of data bits |
|
| |
poly | = | CRC 16 polynomial = 215 + 213 + 20 = $ A001 |
|
Page 14 - 6739389EN/FB