Strange shift register

Hi Guys,

I got old PCB with LEDS (16x RGB leds and 16x white leds) and 4 MBI5025 chip(R, G, B and W). MBI5025 are normal shift register(16 outs, 16 bits), so normally no problem, but : ;D

I think there is 2 data lines (with 2 MBI5025 on each lines), but only one clock and latch line.

I have 5 pins on the PCB to control the 4 MBI5025, I think it's :

  • DATA1
  • DATA2
  • CLOCK
  • LATCH
  • Output Enable (just to switch on/off all leds, it's a MBI feature), must be LOW.

With this code, I can make work the data lines (2 MBI5025) separately (I have just to change the pin for the other data line) :

#define SDI 8
#define SDI2 9
#define CLK 10
#define LE 11
#define OE 5

void setup() 
{
  Serial.begin(9600);
  pinMode(SDI, OUTPUT);
  pinMode(SDI2, OUTPUT);
  pinMode(CLK, OUTPUT);
  pinMode(LE, OUTPUT);
  pinMode(OE, OUTPUT);
  digitalWrite(OE, LOW);
}

void loop() 
{  
 Serial.println("1");
 Out(B00000001, B00000001, B00000001, B00000001);
 delay(1000);
 Serial.println("0");
 Out(B00000000, B00000000, B00000000, B00000000);
 delay(1000);
}

void Out(byte data1, byte data2, byte data3, byte data4) {
  shiftOut(SDI, CLK, MSBFIRST, data4);  
  //shiftOut(SDI2, CLK, MSBFIRST, data4); 
  shiftOut(SDI, CLK, MSBFIRST, data3);  
  //shiftOut(SDI2, CLK, MSBFIRST, data3); 

  shiftOut(SDI, CLK, MSBFIRST, data2);  
  //shiftOut(SDI2, CLK, MSBFIRST, data2); 
  shiftOut(SDI, CLK, MSBFIRST, data1);  
  //shiftOut(SDI2, CLK, MSBFIRST, data1); 
  
  
  digitalWrite(LE, HIGH);
  delayMicroseconds(1);
  digitalWrite(LE, LOW);
}

But I don't know how to make all working, if I uncomment "SDI2" lines of the codes, strange things appear.

Thanks for all !

Do you have a data sheet or a link to a page describing the board and showing its schematic? If not, can you post some well-lit, well-focussed pictures, particularly showing and connectors and the labels on them.

The chips on the board only have a single data input pin, so I think you are correct to say that the chips are in two pairs and the two chips in each pair are daisy-chained.

The reason your code does not work as expected is that data must be shifted into both pairs of chips simultaneously, and this cannot be done with shiftOut() because there is only one clock line.

Does the board have any DATA OUT connections? If so, you could connect DATA OUT 1 back to DATA IN 2. Then all 4 chips will be in a daisy chain and only one data in pin will be needed from the Arduino.

I bet you need to write your own ShiftOut() that shifts out 2 bits on 2 pins at the same time.

If there are DATA OUT connections on the board, then my suggestion above would be simpler and would also allow the SPI library to be used. This would be much faster and allow PWM or BAM dimming in software, allowing colour mixing using the RGB leds, giving more than the standard 7 colours.

But if there are no DATA OUT connections, then Rintin is correct. Getting PWM or BAM dimming & colour mixing will be difficult but not impossible.