I have a brief question regarding the TMP006 temperature calculations. From the data sheet I can read that "Converting the integer temperature result of the TMP006 to physical temperature is done by right-shifting the last two LSBs followed by a divide-by-32 of TREG to obtain the physical temperature result in degrees Celsius" , which I would interpret as a right shift 7 of the complete TREG, since divide by 32 is a right shift 5. This did not work so I must be wrong in my thinking, care to share any input on this?
A complete calculation sequence in embedded C wouldn't be bad either :)
Sorry to hear you're having difficulty with the TMP006 temperature calculations. I've attached a .zip containing some files that should help you out.
First is an Excel calculator which allows you to enter the full 16-bit hex values directly from the TMP006 registers and then calculates all the temperature values for you.
Second is some C code which is used in a TMP006+MSP430+LCD demo board. There are a lot of functions that deal with the LCD screen, but the calculateTemp and main functions at the bottom show how to do the conversions and calculate the object temperature.
Ian WilliamsLinear Applications EngineerPrecision Linear and Sensing Products
Thanks, I'm finding the excel document very useful. My calculations works now...Guess calculating with the right bit order is kind of essential :)
You're very welcome, I'm glad you were able to get up and running. It's not the most trivial process to calculate those temps!
Thanks for posting the code; it will help me too.
Recommendation: TI makes a TMP006 boosterpack that plugs into a MSP430 Launchpad. It would be an excellent, low cost demonstration platform.
I have some good news for you then - we're about to release exactly that! Keep an eye out on the TI homepage in the next few weeks.
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. 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 respect to these materials. 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.