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.

求助 BQ27546 校准电流 如何计算!



ccOffset ,boardOffset  根据读 0X79 读到的数据再根据以下运算。

int ccOffset = (((uint16_t) block[8] << 8) + (uint16_t) block[9]);
signed char boardOffset = block[10];
float ccGain = (float) (校准值/ (float) ((int) 平均值- ((ccOffset + boardOffset) / 16)));

按这个计算无法校准电流,数据是100%写进去了。为什么 floating2Byte 也是根据官网的例子转换的 。不知道哪个算法出问题了?