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.

LAUNCHXL-TMS57004: I2C communication protocol

Part Number: LAUNCHXL-TMS57004
Other Parts Discussed in Thread: BQ76920

TMS57004 is to be used along BQ76920 IC that monitors cell voltages. The monitored voltages of BQ76920 need to be acquired by TMS57004. The communication protocol in BQ76920 IC is I2C. However TMS57004 does not have I2C pins i.e SDA,SCL. I have the following questions in this regard:-

1) Can GPIO pins of TMS57004 be programmed to be used as I2C pins?

2) If yes, how would they be different from dedicated I2C pins present in other controller such as TMS57012?

3)If no, is there any other way of communicating with BQ76920? Like using additional circuitry to make the SPI or CAN pins of TMS57004 to behave as I2C.

Thank you in advance.

  • Hello Kartik,

    Kartik Shanbhag said:
    1) Can GPIO pins of TMS57004 be programmed to be used as I2C pins?

    As noted, the TMS570LS04x does not have an I2C module. As you have suggested, you could implement a SW I2C using GPIO (this is usually referred to a bit banged I2C). The only limitation to this would be bandwidth of the CPU. For sure, you could use the interrupt features of the GPIO to help with CPU loading and I am fairly confident you could find some examples of bit banged I2C implementations somewhere on the web. Most likely any example you find will be  for some other device and will need to be ported to Hercules.

    Kartik Shanbhag said:
    2) If yes, how would they be different from dedicated I2C pins present in other controller such as TMS57012?

    Most likely any SW based approach would less performance than a HW based implementation. The specific features supported will be dependent on the SW you implementation and would need to be characterized once you finish the development of it.

    Kartik Shanbhag said:
    3)If no, is there any other way of communicating with BQ76920? Like using additional circuitry to make the SPI or CAN pins of TMS57004 to behave as I2C.

    There are a few other posts on the E2E about emulating I2C with NHET and at least one video series on it. I think you will find this series of posts by Jan Crumps most helpful

    e2e.ti.com/.../1332192