-->
Page 1 of 1

Use pin GPIO0 for I2C on ESP8266EX

PostPosted: Thu Apr 09, 2020 4:38 am
by Fibri
Hello.
I am trying to interface an I2C sensor on ESP8266.
I would like to use the GPIO0 and GPIO2 pins for the I2C_SCL and I2C_SDA signals.
Unfortunately, it seems that the GPIO0 pin creates some problems, both if used as I2C_SCL or
if used as I2C_SDA.

I am developing on the official Espressif ESP8266-DevKitC board.
I noticed that on this board the GPIO0 pin is connected to the reset button, as shown in the attached figure.
Could this particular create problems for I2C communication?
Could anyone help me?
Thanks.

Re: Use pin GPIO0 for I2C on ESP8266EX

PostPosted: Fri Apr 10, 2020 1:36 am
by schufti
a) it is the flash button (not reset)
b) yes, the capacity of 0.1µF is much to high for using on i2c, you have to remove it

Re: Use pin GPIO0 for I2C on ESP8266EX

PostPosted: Fri Apr 10, 2020 3:16 am
by Pail Roy
I'm using i2c on ESP8266-EO1 to read adc values with no problem, using the scheme as shown at second drawing here:
https://www.forward.com.au/pfod/ESP8266 ... magic.html

Re: Use pin GPIO0 for I2C on ESP8266EX

PostPosted: Sun Apr 12, 2020 6:41 am
by eriksl
Yes it is possible, even though both GPIO0 and GPIO2 spit a lot of nonsense (I2C-wise) on boot. You may want to do the "I2C reset procedure" after boot: have both SCL and SDA quiesce, generate a stop condition and then cycle SCL eight times. That should be enough to recover most I2C devices from every possible state.