| ??? 02/07/03 18:01 Read: times |
#38508 - RE: CRC CALCULATION? Responding to: ???'s previous message |
ok, then look for modbus, and 16 bit CRC on www.google.com
I got this in under 10 seconds.... unsigned int add2CRC16(unsigned char newData, unsigned int oldCRC, unsigned int genPoly) { int i = 8; oldCRC ^= newData; for(i = 8; i; i--) { if(oldCRC & 1) { oldCRC = (oldCRC >>= 1) ^ genPoly; } else { oldCRC >>= 1; } } return oldCRC; } Chris Brooks |
| Topic | Author | Date |
| CRC CALCULATION? | 01/01/70 00:00 | |
| RE: CRC CALCULATION? | 01/01/70 00:00 | |
| RE: CRC CALCULATION? | 01/01/70 00:00 | |
| RE: CRC CALCULATION? | 01/01/70 00:00 | |
| RE: CRC CALCULATION? | 01/01/70 00:00 | |
| RE: CRC CALCULATION? | 01/01/70 00:00 | |
| RE: CRC CALCULATION? | 01/01/70 00:00 | |
| RE: CRC CALCULATION - Christian | 01/01/70 00:00 | |
| RE: CRC CALCULATION - Christian | 01/01/70 00:00 | |
| RE: CRC CALCULATION - Christian | 01/01/70 00:00 | |
| RE: CRC CALCULATION - Christian | 01/01/70 00:00 | |
RE: CRC CALCULATION - Christian | 01/01/70 00:00 | |
| RE: CRC CALCULATION? | 01/01/70 00:00 | |
| RE: CRC CALCULATION? | 01/01/70 00:00 | |
| RE: CRC CALCULATION? | 01/01/70 00:00 | |
| RE: CRC CALCULATION? | 01/01/70 00:00 |



