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.

Output code of ADS1244

Other Parts Discussed in Thread: ADS1244

Hello, 

I'm working with ADS1244 to Convert ADC value of Input voltage. But I meet a problem is: When I connect all 2 pin AIN- and AIN+ of ADS1244 to GND, I always get Ouput code of ADS1244 is 8389370 ( 8389361,8389321,8389348,8389352,...) some value like that. I don't understand alot, because Datasheet of ADS1244 said the Ouput Code following the table below.

I don't understand alot, and when I connect VIN- to GND and VIN+ to Vin. And I increase the voltage of Vin, the Output code still increase, the value something like that ( 11928658 or 13564602 depend on the voltage I supply). Did anybody meet the same prolem with me? Can you recommend me some sollution to check it.

Thank you very much. Sorry about my poor english.

BestRegard

  • Phan,


    The ADC data format comes out such that the output is in twos complement notation so that the data can represent negative numbers. If the MSB is 0, this is a positive number so the the code the decimal conversion of the number, if the MSB is a 1, then take 2^24 and subtract the decimal conversion of the entire code.

    As an example:

    B60452 = 11928658 (from your example)

    The conversion is: 2^24-11928658 = -4848558

    Assuming that the reference is 2.5V, then the input is measuring:

    (-4848558/2*23)*2.5V = -1.445V

    An as another example:

    CEFABA = 13564602 (also from your example)

    The conversion is: 2^24-13564602 = -3212614

    Assuming that the reference is 2.5V, then the input is measuring:

    (-4848558/2*23)*2.5V = -0.957V

    I'm not sure what's happening in your system, but there are a few possibilities. Perhaps you have the inputs swapped (positive for negative). However, this doesn't explain the first reading which is close to negative full scale.

    It's also possible that you've interpreted the data wrong. Perhaps you are accidentally reading in the LSB first. Or there could be a problem in your SPI communications in terms of your clock polarity or the clock phase. Or there could be a problem in your timing. It might be good to get a scope photo of the SPI lines to see that the data is being interpreted correctly. A logic analyzer may work just as well. If you do this, post back the results and I'll look it over.

    Regardless, it helps to record the input voltage and record the output data and see if the results are off in any particular way. Just compare the input with the expected input.


    Joseph Wu
  • Hi Joseph Wu,

    Thanks you very much, with your help, I had found my mistake in my code ^^

    BestRegard