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.

BQ34Z100-G1 寄存器读写问题!

Other Parts Discussed in Thread: BQ34Z100-G1, BQ34Z100

按照手册所示,我对寄存器0x00写了个0x01的 子命令,根据手册显示:

应该返回到寄存器0x00及0x01,我去读这2个寄存器应该得到2个值,其组合后应该是16位就是0x0100,代表BQ34Z100-G1。

按照手册先发送控制命令:

发送:

读取:

奇了个怪了 ,请问这是什么情况???????????  有谁可以解答吗????

  • 您参考下面的文档,希望对您有帮助:
    I tried a couple of Control() Subcommands and checked the waveforms on an oscilloscope. I tried the "Write I2C Data Block" and the "Read/Write I2C Byte" methods.

    Example 1:

    DEVICE_TYPE Control() Subcommand 0001 and the correct answer is 0100 for the bq34z100.

    Using "Write I2C Data Block"

    enter I2CCommand 00 Data Block 0100 press Write Data button (The scope waveforms occur in this order. AA, 00, 01, 00)

    Using "Read I2C Data Block"

    enter I2CCommand 00 Read Data Size 2 press Read Data button (The scope waveforms occur in this order. AA, 00, AB, 00, 01)

    The GUI returns 0001, which is Little Endian for 0100. This is the DEVICE_TYPE for the bq34z100.

    Using "Read/Write I2C Byte"

    enter I2CCommand 00 Byte 01 press Write Byte button (The scope waveforms occur in this order. AA, 00, 01)

    enter I2CCommand 01 Byte 00 press Write Byte button (The scope waveforms occur in this order. AA, 01, 00)

    enter I2CCommand 00 press Read Byte button; GUI returns a 00 (The scope waveforms occur in this order. AA, 00, AB, 00)

    enter I2CCommand 01 press Read Byte button; GUI returns a 01 (The scope waveforms occur in this order. AA, 01, AB, 01)

    The correlates to 0001, which is Little Endian for 0100.

    Example 2:

    CHEM_ID Control() Subcommand 0008 and the correct answer is 0107 for the default bq34z100.ChemID.

    Using "Write I2C Data Block"

    enter I2CCommand 00 Data Block 0800 press Write Data button (The scope waveforms occur in this order. AA, 00, 08, 00)

    Using "Read I2C Data Block"

    enter I2CCommand 00 Read Data Size 2 press Read Data button (The scope waveforms occur in this order. AA, 00, AB, 07, 01)

    The GUI returns 0701, which is Little Endian for 0107. This is the default ChemID for the bq34z100.

    Using "Read/Write I2C Byte"

    enter I2CCommand 00 Byte 08 press Write Byte button (The scope waveforms occur in this order. AA, 00, 08)

    enter I2CCommand 01 Byte 00 press Write Byte button (The scope waveforms occur in this order. AA, 01, 00)

    enter I2CCommand 00 press Read Byte button; GUI returns a 07 (The scope waveforms occur in this order. AA, 00, AB, 07)

    enter I2CCommand 01 press Read Byte button; GUI returns a 01 (The scope waveforms occur in this order. AA, 01, AB, 01)

    The correlates to 0701, which is Little Endian for 0107.
    • Can you provide the waveform,How do I read device types,

    • I tye write(AA,00,01,00) READ(AB,RXBYTE[0],RXBYTE[1]), but RXBYTE[0]=0,RXBYTE[1]=0