Internet PLC Forum
General => Technical support => Topic started by: pixelfantastic on May 16, 2011, 11:25:53 AM
-
hi,
i need to calculate a CCITT type crc checksum
...does anyone here know if its possible in Tbasic please?
(The C code is attached in case there are any maths geniuses here)
Thank you
Barrie
-
Short answer, yes. TBASIC supports enough bit operators to allow you to write code equivalent to the C example. The TBASIC version will be a bit less eloquent then the C version.
The is some built-in support for calculating CRCs in TBASiC. I suspect that it uses the same feedback terms as the CRC16-CCITT
Unfortunately I'm away form my computers and can't give you an example.
Gary d
-
Look at the TBASIC function, CRC16. This will probably do the trick.
Gary d