software I2C problem

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
nedoskiv
Posts: 20
Joined: Fri Jan 18, 2019 10:48 am

software I2C problem

Post by nedoskiv » Thu Jul 28, 2022 10:50 am

Hello,

I have maded schema of two MCP23017 IO expanders, connected to I2C with 4.7K pullup resistors, tested it on ESP8266 with NodeMCU LUA, they work fine
now decided to try them on one WT32 board. Hardware I2C pins are used here for intergrated LAN, so I decide to try software I2C
after lot of failures, one of the MCPs start to show when I used pin 12 and pin 14, other MCP chip do not show up, If I remove working chip, other one apper in i2c.scan() function
I tried to change frequency, no effect.

Anyone succeed using software I2C on more than one device, using non standart pins?

Code: Select all

MicroPython v1.19.1 on 2022-06-18; ESP32 module with ESP32
Type "help()" for more information.

>>> from machine import Pin, SoftI2C
>>> i2c = SoftI2C(scl=Pin(14), sda=Pin(12), freq=100000)
Last edited by nedoskiv on Thu Jul 28, 2022 11:14 am, edited 1 time in total.

nedoskiv
Posts: 20
Joined: Fri Jan 18, 2019 10:48 am

Re: software I2C problem

Post by nedoskiv » Thu Jul 28, 2022 11:09 am

after changing a lot of pin combinations, managed to find working one:

Code: Select all

>>> from machine import Pin, SoftI2C
>>> i2c = SoftI2C(scl=Pin(14), sda=Pin(5), freq=44000)
>>> i2c.scan()
[32, 33]

Post Reply