Hi!
I'm having a weird problem using the TMP102 sensor.
Basically, I cannot use floating-point operations with my application, so what I do to get the right temperature is this:
1) Interpret the 8 MSB as the integer part
2) Interpret the remaining 4 bits as the fraction portion of the number.
I just handle everything in the fraction portion as integers, and then print them accordingly (the decimal point is just part of the
print format; the numbers are integers)
So, I read the 2 bytes that the sensor sends, and print them in a hyperterminal.
The first byte is working fine (I have a thermometer to compare results). However, the remaining byte is acting strangely: it only prints values between 0 and 127.
Considering 127 = 0b01111111, I am losing part of my fraction portion (the range from 128 to 255).
Has something like this happening to anyone? Maybe I'm doing something wrong while reading?
Thanks in advance