Communication lost between Sparkfun MUX and 8 displays

I am using Arduino UNO with a Qwiic Shield so I could use Qwiic connectors. I connected one Mux (TCA9548A) to the shield. My 8 Qwiic Alphanumeric Displays ((VK16K33) are then connected the MUX.

I am trying to write down a value on each one of the displays, but following problem has happened so far:

  1. When all 8 displays are connected, not a single display showed anything.

  2. When 4 displays are connected, It worked for almost 3 minutes and then it frizzed.

  3. When 3 displays are connected, it works fine.

I cut down the display pull up resistors, but nothing changed.

I added separate power supplies for each of the displays, but it didn’t help.

I checked the connections, but it was fine as well.

It seems something wrong with I2C communication, in which when I increase the number of displays it cannot keep up with the communication.

I will appreciated if you could help me with this problem.

Thank you all in advance.

Here it is my code:

#include <Wire.h>
#include <SparkFun_Alphanumeric_Display.h>
#include <SparkFun_I2C_Mux_Arduino_Library.h> 

HT16K33 display;
QWIICMUX myMux;

String dis;
int long p = 1;

void setup() {
  Serial.begin(9600);  
  Wire.begin();
  myMux.begin(0x72);
  if (myMux.begin(0x72) == false)
  {
    Serial.println("Mux not detected. Freezing...");
    while (1) ;
  }

  for (int x = 0 ; x < 8 ; x++)
  { 
    myMux.setPort(x);
    display.begin();
    if (display.begin() == false)
      {
        Serial.println("Device did not acknowledge! Freezing.");
        while(1);
      }   
    myMux.disablePort(x);
  }
}

void loop() {

  for (byte x = 0 ; x < 8 ; x++)
  { 
    dis = p;
    myMux.setPort(x);
    display.print(dis); 
    myMux.disablePort(x);
    delay(10);
    p = p+1;
  }  
  delay(10);  
}

The problem may or may not be in your code. Is your power supply sufficient for 8 displays? I fear that the power supply cannot give sufficient current to all 8 displays.

Thank you for your reply.

Yes, the power supply is sufficient.

To make sure about about power supply, now I used an external power supply from DC power supply device and it solved the problem. Previously I was using Arduino pins but it didn’t work. In the display data sheet it says that the required current is 2 mA, but my experiment shows that it actually is 0.2 A.

It looks like you are only creating one instance of display. That class stores some local data, so you would need a separate instance of it for each display. Look at https://forum.sparkfun.com/viewtopic.ph … nt#p220782 for an example of using an array of instances for each mux channel.

/mike

Thank you so much.