Hi,
I am having trouble with MSP430F55xx_adc_10 example code that reads internal temperature sensor.
The degree C reading is -112.952.
Is there a setting in the compiler or linker I need to set? Looking carefully at the values I noticed that the Code Composer V5.4 results in a positive number "(CALADC12_15V_85C - CALADC12_15V_30C)", where
CALADC12_15V_85C is 2468 decimal
CALADC12_15V_30C is 49674 decimal
temperatureDegC = (float)(((long)temp - CALADC12_15V_30C) * (85 - 30)) /
(CALADC12_15V_85C - CALADC12_15V_30C) + 30.0f;
I suspect that this is why the example code temperatureDegC value (in degree C) is a negative number.
Thanks,
Ed