Saturday, September 23, 2017

TMP112 INTERFACING WITH MSP430 MICROCONTROLLER #19102016

TMP112, temperature sensor by Texas Instrument, with very interesting features as
a) SOT563 Pacakge (1.6mm x 1.6mm) is 68% smaller than SOT23.
b) Accuracy of 0.5C
c) Low quiescent of 10uA active and 1uA sleep
d) 12 bit resolution (0.0625C)
e) Supply range 1.4 to 3.6V




The i2c algorithm that we are using to sense the temperature sensor is as

A)      Should be in reset state while changing some register content. (check in datasheet)
B)      Set the IIc master mode with synchronous setting.
C)      Set IIc clock equal to sub master clock
D)     Set some divider smclk/x = 100khz (can be varied as per requirement up to 400khz)
E)      Set the slave address in 7 bit format
F)      Disable or enable the interrupts
G)     Disable the reset state


a)      Again put in reset mode
b)      Generate the stop condition after transmission of 1 byte automatically.
c)      Disable reset mode
d)      Send the start condition, it will also send the slave address.
e)      Wait until transmission is finished
f)      Send the register we need to read from and wait till transmission is done
g)      Set IIC write operation in receiver mode to generate auto stop after two bytes are received.
       TMP112 sensor gives 16 bits of data
h)      Setup for repeated start
i)       Receive two bytes of data
j)       Convert according to the formula

 (50°C) / (0.0625°C / LSB) = 800 = 320h = 0011 0010 0000
 0011 0010 0000 = 320h = 800 × (0.0625°C / LSB) = 50°C

(|–25°C|) / (0.0625°C / LSB) = 400 = 190h = 0001 1001 0000 Two's complement format: 1110 0110 1111 + 1 = 1110 0111 0000

No comments:

Post a Comment