I2C Pin Location

kostyan5
Posts: 50
Joined: Mon Mar 06, 2017 3:16 pm

I2C Pin Location

Postby kostyan5 » Tue Apr 18, 2017 8:23 pm

Page 49 of the ESP32 data sheet says that I2C pins are 21,22,23,24. However, the I2C example in the SDK uses:

Code: Select all

#define I2C_SLAVE_SCL_IO     26    /*!<gpio number for i2c slave clock  */
#define I2C_SLAVE_SDA_IO     25    /*!<gpio number for i2c slave data */
#define I2C_MASTER_SCL_IO    19    /*!< gpio number for I2C master clock */
#define I2C_MASTER_SDA_IO    18    /*!< gpio number for I2C master data  */
What is the correct location for the I2C pins?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: I2C Pin Location

Postby WiFive » Tue Apr 18, 2017 9:50 pm

No, it says the RTC I2C pins are 21-24 (gpio 0,2,4,15). The main I2C peripheral goes through the gpio matrix so has no default pins and you are free to choose. Don't confuse qfn package pin # with gpio #. ESP32 has so many features it gets confusing, but that's great!

Who is online

Users browsing this forum: Jblight32 and 117 guests