I2C devices HW configuration

nicola
Posts: 22
Joined: Mon Feb 18, 2019 8:04 am

I2C devices HW configuration

Postby nicola » Sun Mar 03, 2019 8:46 am

Hi ,
I'm designing a board with ESP-WROOM32.
I have 2 I2C devices and I want to use pin multiplexing for assign pin to SDA and SCL of the two devices on my board (using the right FW instructions of esp-idf IDE)
This is my configuration:

Device1:
SDA ------to--------> GPIO4 of ESP-WROOM32
SCL-------to--------> GPIO5 of ESP-WROOM32

Device2
SDA ------to--------> GPIO21 of ESP-WROOM32
SCL-------to--------> GPIO19 of ESP-WROOM32

Could you confirm I can use such configuration?
Otherwise could you advice resources to understand if a GPIO could be use for specific peripheral?


Hope you can help me .
Thanks
Nicola

ESP_Sprite
Posts: 9729
Joined: Thu Nov 26, 2015 4:08 am

Re: I2C devices HW configuration

Postby ESP_Sprite » Sun Mar 03, 2019 8:54 am

That should work. In general, I2C requires IO pins that can also be used as an output (GPIO35-39 are input-only and as such cannot be used) and you cannot use the GPIOs that are shared with the flash (which are GPIO6-11 on the Wroom32 and most other modules).

nicola
Posts: 22
Joined: Mon Feb 18, 2019 8:04 am

Re: I2C devices HW configuration

Postby nicola » Mon Mar 04, 2019 1:04 pm

Hello ESP_Sprite,
thanks for you support.
Nicola

Who is online

Users browsing this forum: Baidu [Spider], MichaelS and 101 guests