TMP125 from texas instruments

Discussion in 'Embedded Systems and Microcontrollers' started by gusmas, Jul 30, 2010.

  1. gusmas

    Thread Starter Active Member

    Sep 27, 2008
    239
    0
    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?
     
  2. gusmas

    Thread Starter Active Member

    Sep 27, 2008
    239
    0
    NVM its in the datasheet hehe
     
  3. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    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
     
Loading...