Hi,
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 :)
BR
Hello Nick,
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.
Best regards,
Ian WilliamsLinear Applications EngineerPrecision Linear and Sensing Products
Hi Ian,
Thanks, I'm finding the excel document very useful. My calculations works now...Guess calculating with the right bit order is kind of essential :)
Thanks again!
Hi Nick,
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!
Ian Williams
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.
--Derek
fixituntilitsbroken.blogspot.com
Derek,
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.