TMP125 from texas instruments

Thread Starter

gusmas

Joined Sep 27, 2008
239
OK so my temp sensor has an 10bit resolution, now the temp range will be from -25 to +85, it uses SPI, how do i figure out what lets say 25 degrees will be in binary?
 

t06afre

Joined May 11, 2009
5,934
You base type will be an 16 bit signed integer. Shift the result 5 times to the right. Then test bit 9. If this bit 1, you have to or the result with 0xf800. Now you will have the temprature as temprature*4
 
Top