How do we use the GPIO to simulate i2c communication?

aladdin_hou
Posts: 1
Joined: Thu Jan 18, 2018 3:03 am

How do we use the GPIO to simulate i2c communication?

Postby aladdin_hou » Thu Jan 18, 2018 4:36 am

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!

ESP_Bob
Posts: 80
Joined: Fri Nov 27, 2020 12:52 pm

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

Postby ESP_Bob » Thu Aug 25, 2022 6:58 am

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

Who is online

Users browsing this forum: Baidu [Spider] and 79 guests