主题中讨论的其他部件: BQSTUDIO, BQ34Z100-G1
工具/软件:Starterware
你好,我是Deni-Jeong。
我使用Atmega128和AVR Studio4。
我想通过BQ34Z110测量电池电压。
我查询了一个网站(“e2e.ti.com/.../37.2162万"”),然后我完成了BQ34Z110的基本设置。
但我不知道测量电压的方法。
我在5步下发送类似数据。
步骤1。
I2C_Start--0x55 (设备地址)--0x08---I2C_END
I2C_Start--0x55 (设备地址)--receive数据等待--I2C_END
I2C_Start--0x55 (设备地址)--0x09---I2C_END
I2C_Start--0x55 (设备地址)--receive数据等待--I2C_END
步骤2。
I2C_Start--0x55 (设备地址)--0x08---I2C_END
I2C_Start--0x55 (设备地址)--0x09---I2C_END
I2C_Start--0x55 (设备地址)--0x08---receive数据等待--I2C_END
I2C_Start--0x55 (设备地址)--0x09---receive数据等待--I2C_END
步骤3。
I2C_Start--0x55 (设备地址)--0x08---I2C_END
I2C_Start--0x55 (设备地址)--0x09---I2C_END
I2C_Start--0x55 (设备地址)--0x08---receive数据等待--I2C_END
I2C_Start--0x55 (设备地址)--0x09---receive数据等待--I2C_END
步骤4.
I2C_Start--0x55 (设备地址)--0xAA---0x08---I2C_END
I2C_Start--0x55 (设备地址)--0xab---receive数据等待--I2C_END
I2C_Start--0x55 (设备地址)--0xAA---0x09---I2C_END
I2C_Start--0x55 (设备地址)--0xab---receive数据等待--I2C_END
步骤5.
I2C_Start--0x55 (设备地址)--0xAA---0x08---I2C_END
I2C_Start--0x55 (设备地址)--0xAA---0x09---I2C_END
I2C_Start--0x55 (设备地址)--0xab---receive数据等待--I2C_END
I2C_Start--0x55 (设备地址)--0xab---receive数据等待--I2C_END
但我没有得到正常电压数据。
我想获取电池电压。
当我通过I2C获得电池电压时,我应该怎么做?