1
\$\begingroup\$

I am using an PCA9456A i2c switch to help me toggle between i2c devices with the same address, but i am having problems opening channel 1 (second channel out of 4) and i ran out of ideas what is causing it

Here are the code and schematics, I am using the busio and board library in python

import busio
import board

i2c = busio.I2C(board.SCL, board.SDA, frequency=100000)

i2c.writeto(0x70, bytes([0x0F]), stop=True) # 0x0F = b00001111 which turns all channels on

With this code i am able to toggle between the other 3 channels (be it only 1 channel is enabled or any combination of the 3)

enter image description here

I am planning of using it on a raspberry pi 4.

what i have tried checking:

  • I have tried double checking all connections and if they are
    connected to the correct pins EDIT: This turns out to be false
  • I have tried changing the pull up resistors' value (decreasing and increasing it)
  • I have tried creating another circuit using another PCA chip and a different i2c device than what i am supposed to be using. It is always channel one that i cannot enable

here a picture for the i2c scan, you may notice that there is a gap between the addresses, 0x49. That is the device connected to channel 1.

enter image description here

\$\endgroup\$
4
  • \$\begingroup\$ I’ll give you the benefit of the doubt and assume that you’ve properly set up the address of your slave. Did you happen to probe and see what’s coming from the master? This also might be a silly question but is your system on with the 3v3 active while you’re trying to scan the device? \$\endgroup\$ – user103380 Dec 28 '19 at 15:52
  • \$\begingroup\$ Address are properly set, i ust have recently tried to hook up that missing device to another slave master and it showed up. Unfortunately i do not have access to an oscilloscope. Yes i am running on a 3v3 source, is there a problem with usin 3v3? \$\endgroup\$ – Jake quin Dec 28 '19 at 16:07
  • \$\begingroup\$ Is that your actual schematic? Are pull-ups for SDA and SCL really 1 ohm ? \$\endgroup\$ – Justme Dec 28 '19 at 17:16
  • \$\begingroup\$ @Justme the raspberry pi has already 1.8k pullups on those lines so, i just placed a slot incase i wanted to adjust it. \$\endgroup\$ – Jake quin Dec 28 '19 at 19:15
1
\$\begingroup\$

If that is the real schematic of the device, the channel 1 has SDA and SCL swapped, so it does not work until you swap the pins somehow.

\$\endgroup\$
1
  • \$\begingroup\$ yeah that is from the actual circuit, and i know why it didn't show up on the second PCA too. I was basing the connections on my breadboard on the pcb layout, the same goes for testing the connection. the culprit all along was the schematics ! Thank you for pointing out good sir, I have verified that that is the problem \$\endgroup\$ – Jake quin Dec 28 '19 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.