Page 1 of 1

How do we use the GPIO to simulate i2c communication?

Posted: Thu Jan 18, 2018 4:36 am
by aladdin_hou
Hello @Espressif
We have a touch pad that communicate with esp32 with i2c, but the touch pad i2c timing sequence needs a 40us delay before and after evey ACK/NACK, and needs 1ms delay after every bytes reading and writing.
So we cannot use the esp32 i2c APIs in this case, as we can't control the delay timing.
Maybe the option is using the gpio to simulate the i2c communication directly in our code.

So if there is any sample code in esp32 or anyone can give some suggestion?
Many thanks!

Re: How do we use the GPIO to simulate i2c communication?

Posted: Thu Aug 25, 2022 6:58 am
by ESP_Bob
Just add a reference code, even though the problem is a long time ago

https://github.com/tuupola/esp_software_i2c

Topic: esp32 software i2c