CCS/ADS1118: Understanding temperature conversion on 430BOOST-ADS1118-SFT
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
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Joseph Wu:
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.
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..
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.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.