PDA

View Full Version : Anyone used the TMP102 temperature sensor (I2C interface)



tekart
- 11th February 2011, 19:52
I'm struggling to get this apparently simple TMP102 thermometer chip to respond to I2C reads. I'm using the SparkFun breakout board: http://www.sparkfun.com/products/9418
And working with a 12F675. Just trying to get temperature readings from it, but it is not ACKnowledging the I2Cread commands like this:

I2Cread SDA,SCL,tmpcon,tmpaddr,[temperature.highbyte,temperature.lowbyte]

Anyone used this pesky chip before?

ScaleRobotics
- 11th February 2011, 19:55
There has been work done with the TMP100 series. Not sure of the differences.

Check out http://www.picbasic.co.uk/forum/content.php?r=242-Using-the-TMP100-series-of-I2C-temperature-sensor-from-Texas-Instruments

Walter

tekart
- 11th February 2011, 20:37
There are some differences between these chips, but this may help a bit - thanks.
Still can't get and ACK from the darned chip though. Will order a spare - I may have smoked it.... :(

jellis00
- 24th June 2011, 22:08
I'm struggling to get this apparently simple TMP102 thermometer chip to respond to I2C reads. I'm using the SparkFun breakout board: http://www.sparkfun.com/products/9418
And working with a 12F675. Just trying to get temperature readings from it, but it is not ACKnowledging the I2Cread commands like this:

I2Cread SDA,SCL,tmpcon,tmpaddr,[temperature.highbyte,temperature.lowbyte]

Anyone used this pesky chip before?
tekart,
I am also trying to use the Sparkfun breakout for the TMP102, but with a PIC18F2550. Having similar problems in using the I2C bus to read a temperature from the device. Did you ever resolve your problem with the TMP102? If so, could you please share your PICBASIC code and any circuit schematic you are using with the breakout to make it work? Thanks!
jellis00

tekart
- 24th June 2011, 23:58
Here's what worked for me:

I2CWRITE SDA,SCL,%10010000,$01,[%11100101] ' get one-shot sample
pause 350 ' wait for conversion to complete
I2Cread SDA,SCL,%10010000,$00,[tempH,tempL] ' read the temperature as 2 bytes

hope this helps