I have this MIKROE board wired up to an S2 Feather via the SDA
and SCL
pins. The MIKROE board is powered by the Feather via 3V3
and GND.
I have 2 kΩ pull-up resistors to 3V3 on the SDA
and SCL
pins. When I don't use pull-ups, I can't detect any devices at all.
I run the following scan:
import time
import board
i2c = board.I2C()
while not i2c.try_lock():
pass
try:
while True:
print(
"I2C addresses found:",
[hex(device_address) for device_address in i2c.scan()],
)
time.sleep(2)
finally:
i2c.unlock()
With NO pullups I get:
I2C addresses found: []
This is strange in itself to me, because normally CircuitPython has a separate error for no pull-ups, but in this case it just returns no addresses. For the longest time I thought the MIKROE board must have built in pull-ups, but I checked the datasheet and it seemed inconclusive.
So I wired it up again as described with the pull-ups and return:
I2C addresses found: ['0x53', '0x5b']
Two addresses isn't the strangest thing in the world, because this device specifically says it responds to two addresses in the datasheet, but as far as I can tell, neither of these match any addresses enumerated in the datasheet. I admit, I don't know how to configure the I2C address using the I2CADDR
pins, and maybe that's part of what's going on, but when I run other sketches trying to write to either of those two devices nothing seems to be happening. Is it improperly wired because I added pull-up resistors and are these addresses artifacts? Am I simply misreading the datasheet?