Hi,
Consider this code snippet from Stellarisware/Examples/ADC/temperature_sensor.c:
ulTemp_ValueC = ((1475 * 1023) - (2250 * ulADC0_Value[0])) / 10230;
The value of ulADC0_VAlue[0] is 1750 (otained through UART printing); When we calculate the ulTemp_Value using this 1750, manually, we get the value -237 Celsius. But the UART printed value of ulTemp_ValueC is 419604 Celsius.
Now consider the execution of the following snippet:
ulTemp_ValueC = ((1475 * 1023) - (2250 *1750)) / 10230;
Now the Expected value is -237, and it is printed.
In either case, I havent got the actual temperature, which must be around 30 Celsius.