I have been having issues with the fixed point code not outputting the same answer as the floating point method, this specifically seems to be an issue when the sensor voltage is positive. For instance when ambient reads 0x0D14 and Sensor Voltage reads 0x014C, TMP006_Calculate outputs 0x67C which is 12.968 degress C. When I enter those values into the floating point algorithm it outputs 37.68 degress C.
I have typedef'd TMP006_INT16 to a 16 bit unsigned int and TMP006_INT32 to 32 bit signed int. I have tried changes these typedefs but it hasn't made things any better.
I am using a 16-bit microcontroller(PIC24EP256GU810) rather than a 32-bit microcontroller, could this have something to do with the issue?
Thanks.