Quantcast
Channel: MSP 低功耗微控制器论坛 - 最近的话题
Viewing all articles
Browse latest Browse all 3634

M430F2252T计算出错

$
0
0

我在主程序中,循环执行下面的一组计算程序,经常会出错,这可能是什么原因导致的了。

wRTempValue = (int)((long)(dwROutputVoltCalValue * 10 >> 12) * 4963 >> 9);
wROutputVoltNew = (int)((long)(wRTempValue) * 9099 >> 13); 
wSTempValue = (int)((long)(dwSOutputVoltCalValue * 10 >> 12) * 4963 >> 9);
wSOutputVoltNew = (int)((long)(wSTempValue) * 9099 >> 13);
wTTempValue = (int)((long)(dwTOutputVoltCalValue * 10 >> 12) * 4963 >> 9);
wTOutputVoltNew = (int)((long)(wTTempValue) * 9099 >> 13);

Viewing all articles
Browse latest Browse all 3634

Trending Articles