This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

dsp 整形数转换为浮点数问题



在程序的某处定义了:

unt16_t      IQ_FullScale_V    = 930;

unt16_t      ADC_FullScale_V = 930;

其他地方需要浮点数,定义:

_iq   IQ_FULL = (_iq)IQ_FullScale_V ;

_iq   ADC_FULL = (_iq)ADC_FullScale_V ;

float_t  IQfull = _IQ1toF(IQ_FULL *2);

float_t  IADCfull = _IQ1toF(ADC_FULL *2);

float  Value =  ADCfull /IQfull ;

显示结果 Value = 930.0

单独:Value =  IQfull ;

或      Value =  ADCfull ;

 都显示 Value = 930.0;

什么原因?

uint16_t 数据要转换为 float_t 怎么做法才是正确的?