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.

TM4C gpio simulate i2c funtction need 3 pin?

For some reason, I need to implement i2c fucntion by gpio simulation(not use TM4C embedded i2c function),

currently, I used 3 gpio to implement i2c function,

1 for SDA in(config as input)

1 for SDA out(config as output OD)

1 for SCL (config as output) 

I think it should have better solution to implement i2c function by 2 gpio.

anybody can give me some advice? 

Thanks 

Leo Liao

  • Hi Leo,

    We don't have sample code for bitbang 2C. TM4C129 has 10 I2C ports and TM4C123 has up to 6 I2C ports, that is enough for most of the applications. You can find many open source from the web as the reference.

    Regards,
    QJ