This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Viktor Gottschald, ARM7 CRC_CCITT assembly code

Hi

Viktor Gottschald wrote a code for CRC_CCITT which asks for an ascii input. However there are a few errors in the code.

Hey Viktor, if you read this, kindly send me an e-mail at vywake@yahoo.com, i'd like to discuss a few things about the CRC code when you have some free time.

Thanks

Vy

Parents Reply Children
  • Ur right there's plenty of code in C....more wrong ones than right.

    The best one by far that i liked has been written by Lammert Bies on his website that also has am online CRC calculator.

    However, i've written the entire code (10,000 lines approx)using ARM(7) assembly language and assembled it using Keil MV3. I'm using the LPC2148 MC.

    Can you tell me how the hex value from my assembly language program can be fed to the C program and brought back into my assembly progam???

    I'll need to call the C code as a subroutine but i don't know how to go about it.

    Any assitance would be highly appreciated.

    Thanks

    Vy

  • I don't really think "more wrong ones than right" is really correct, but it is true that there are broken implementations out there. Some solutions just switches the polynomial and forgets to augment the data.

    Anyway - here is a reference to a "right" implementation.

    www.joegeluso.com/.../ccitt.htm

    You can write a little C program that implements the CCITT algorithm and calls it. Generate a list output - then you will see exactly how the C compiler generates code to call the function.

    On the other hand - if you don't need a tabulated solution for extreme speed, and already have the knowledge to write in assembler - the posted link contains a good description of the algorithm (which is simple) so you can probably write it in assembly yourself too.