• Resolved

Compiler/ADS1018: Understanding conversion register on ADS1018; TS_MODE and ADC_MODE

Prodigy 190 points

Replies: 4

Views: 91

Part Number: ADS1018

Tool/software: TI C/C++ Compiler

I had a quick question. Regarding the ADS1018 conversion register data.

In temperature sensor mode; we only care about 12 of the 16 bits. Therefore we truncate the final 4 bits. Is this done by RoL (<<4) or RoR (>>4)? I can also divide b 16 but i don't see the same value. Please clarify for me.

Does the same truncation apply when operating on ADC_MODE? Can the returned value be divided by 16?

  • Shubham,



    For RoL and RoR are you referring to Rotate Left, and Rotate Right functions? These are circular shift functions which puts the lower bits shifted to the upper bits. However, this could cause a problem with the two's complement notation for negative numbers.

    What you want is an arithmetic right shift of four bits or divide by 16 to get the result. The arithmetic shift would work for both the temperature sensor and ADC data.  If you're having problems with the divide by 16, what is the original value you from the ADC and what value do you get when you divide by 16?



    Joseph Wu

  • In reply to Joseph Wu:

    Joseph,

    I see 0x2288 returned when in ADC mode. I was able to get some measurements against a thermometer and wanted your opinion on how to improve results. I write 0x0A83 to the config register. I know from your other threads that, if both MUXs are being used, the chip must be in single conversion mode. THis is in continuous, would operating in single-conversion mode increase the resolution?

      

    You can see that the value calculated won't change for up to 11degF when compared to a thermometer. Just looking for way to better this.

    Thank you,

    Shubham

  • In reply to Shubham Tandon:

    Nevermind that question Joseph - it was an issue with the probe. When we utilize a calibrated Tegam the value is off by 2degF, which is acceptable.. 

  • In reply to Shubham Tandon:

    Shubham,

    Ok, I was in the process of composing an answer. I would note that you could use the device in continuous conversion mode or in single-shot conversion mode, and you should get the same results. I just find it easier to set up the conversion and read the device in single-shot conversion mode.


    Joseph Wu