Hi
我使用自己的IIC与BQ40Z50通信,先写入0x16(地址),0x00(Command),0x21,0x00(data),然后读取电池包电压值,写入地址0x09,读出的是0x01D4,此时电池包电压在11.7V,是我有落下什么操作吗?
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.
Hi
我使用自己的IIC与BQ40Z50通信,先写入0x16(地址),0x00(Command),0x21,0x00(data),然后读取电池包电压值,写入地址0x09,读出的是0x01D4,此时电池包电压在11.7V,是我有落下什么操作吗?
The bq40z50 uses SMbus protocol. More information on this can be found at www.ti.com/.../slua475.pdf
The 8-bit address is 0x16/0x17, where the lowest bit indicates if it is a read ( bit is 1) or a write(bit is 0).
You should be able to send a read word command of 0x09 with return length of 2-bytes to get the Voltage.
You can also try this in the "Advanced Comm SMB" tab of bqStudio while monitoring it with a bus sniffer, and duplicate the sequence in your code: