I am trying to convert int16_t to float
code is
int16_t ADC_value;
float voltage = (float)ADC_value/1000.0f;
printf("%f\r\n",voltage);
result
when the voltage exceeds 2.0V floating point values become (-)values. but before it converts to floating point values it is normal.
code:-
int16_t ADC_value;
printf("%u\r\n",ADC_Value); //this is correct
is that int16_t to float conversion wrong?