This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS131A04: CRC Calculation

Part Number: ADS131A04

How to computing the CRC data.

I try to read it on datasheet page 40 but not clear.

Could someone give me some example to make it clear?

  • Nopphon,


    The CRC implemented in the ADS131A04 is a CRC standard. If you look up CRC in Wikipedia, this particular implementation is found described as CRC-16-CCITT. If you google CRC-CCITT, you can even find code to generate the CRC data.

    When you read back data, you calculate the CRC byte and compare that with the CRC byte generated by the device to ensure that your communications have not been corrupted.


    Joseph Wu
  • I found how to calculate CRC-16-CCITT. but I think the step to computing CRC on datasheet isn't same way with standard CRC-16-CCITT on the wiki. So I'm not sure which one is the correct or I misunderstand.
    1. computing CRC data will be shifted 1bit and then check the MSB. but first step in the datasheet, the data will be shifted 8 bit.
    2. why first step XOR the FFFFh? I think it should be 1021h
    3. do we need to add 16bit logic 0 at the tail to calculate the CRC?
  • Nopphon,


    This may take me a little time to verify the CRC method. I'll admit that I've only rarely dealt with CRC in our devices, and in those cases, it was a different type of CRC.

    Let me take a look at the ADS131A04 CRC, and I'll see if I can verify the generated CRC output. I'll get back to you soon.


    Joseph Wu
  • Nopphon,


    I agree with you that the datasheet is a bit confusing. It took me a while, but I was able to eventually generate the CRC word taken from some communication with the device.

    Instead of using the description in the datasheet, it's just easier to say that it is CRC-CCITT (XModem). The output CRC is reported by the device with bytes in reverse order. With google, you should be able to find a couple of CRC calculators to report the CRC (without bytes reversed). You should also be able to find a few of code examples used to calculate the CRC result.


    Joseph Wu
  • OK. I got it.

    So I will use the example code of CRC-CCITT (XModem).