I have several motherboards that are either pyboard-based (micropython) or AVR Xmega-based (C++) and the I2C/TWI code that I wrote for both has worked just fine for some years to drive I2C chips on those motherboards. Recently I began adding a Qwiic connector to the I2C bus on motherboards so that I can add various external Sparkfun Qwiic-based boards to the motherboard I2C bus.
However, when I plug a Sparkfun Qwiic board into the I2C bus, the I2C bus gets completely smashed. The I2C address of the Qwiic device is not recognized on either the pyboard or Xmega systems. I have cut the jumpers on the Qwiic devices so that only pull-ups on the motherboard are used, and have been careful not to have I2C address clashes with chips on the motherboard. I have tried this with FIVE different Qwiic boards (keypad, alphanumeric display, TMP103, 9DoF and BME280) and the result is the same on all of them. I have confirmed that all those Qwiic boards work just fine using an Arduino Qwiic Redboard and the example Arduino code. I have tried changing the I2C frequency and the result is the same for 100 or 400 KHz. I have confirmed that my Qwiic connectors have the correct pin-outs and the power led lights up on those Qwiic devices that have one. All motherboards are 3.3V.
This is very easy to test on the Micropython pyboards. Just open a REPL session and type in 3 lines:
from machine import I2C
i2c = I2C(‘X’, freq=100000) # or omit for the default 400000 Khz
i2c.scan()
In all cases it returns “”, i.e., nothing found, including no I2C chips on my motherboard either. Unplug the Qwiic board, and all motherboard I2C chips are found just fine.
I wrote an Xmega C++ equivalent of that scan function, and it gives the same results on the Xmega boards. I also tried changing the I2C frequency on those boards as well, with nothing found for either frequency. Unplug the Qwiic board, and all motherboard I2C chips ase found just fine.
So what am I missing here?
I would sure appreciate help. I have a lot of time and money invested in these new boards with external Qwiic devices and right now they are useless for the external Qwiic devices – which for some boards is the whole purpose of the board.
Thanks, Steve