通过单片机改变电量计Data Flash中Calibration的值,达到校准电流电压的目的,看了技术文档,没看太清楚电压和Voltage Divider的具体关系,CC Ggain和CC Delta与电流的关系。
电压与Voltage Divider的计算公式是什么?电流与CC Gain和CC Delta的计算公式又是什么?
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.
CC Gain: data flash raw data 0x7F71205C, EVSW reading with: 10.124
Raw data (0x7F71205C) -> first two byte is for exp gain. The exp is 0x7F -> 127, so gain: (127-128-24) = -25 -> 2^(-25)
0x71205C OR with 0x80 = 0xF1205C -> convert into DEC and times 2^(-25) = 15802460*2^(-25) = 0.47095
CC Gain = 4.768/x = 4.768/0.47095 = 10.124 (matches!)
CC Delta: data flash raw data 0x940898C0, EVSW reading: 10.147
Raw data (0x940898C0) -> first two byte is for exp gain. The exp is 0x94 -> 148, so gain = (148-128-24) = -4
0x0898C0 OR with 0x80 = 0x8898C0 -> convert into DEC and times 2^-4 = 559500
CC delta = 5677445/x = 5677445/559500 = 10.147
你可以这么理解,CC gain或者对应的CC Delta就是对应的你的采样电阻的阻值大小,只不过内部的转换表达方式不一样,这个值通常通过标准电流校正得到。