Can shiftOut() be used with the M5450B7 LED display Driver chip?
With a quick look at the data sheet I would say no, that chip is not compatible with shift out, mainly because it automatically loads the data on the 36th clock pulse.
However you can roll your own version of shiftOut that moves 36 bits and use the chip that way.
Rob
ok thanks
That chip look pretty nice, I wouldn't let 5 minutes coding put you off it if that's what you need.
Rob
i have no idea how to do that tho...
do u have any sugestions/exanple code that could go with the chip?
and btw i plan on using the chip with 34 outputs and 3 serial lines(data_in - clock - data_eneble)
This compiles but I can't test it at the moment.
#define N_BITS 36
static const int dataPin = 3;
static const int clockPin = 4;
byte bits [5] = {1,2,3,4,5}; // 5 bytes == 40 bits
byte *ptr;
void setup () {
multibitshiftOut();
}
void loop () {};
void multibitshiftOut () {
ptr = bits;
for (int b = 0; b < N_BITS; b++) {
if ((*ptr & 0x01) == 0)
digitalWrite (dataPin, LOW);
else
digitalWrite (dataPin, HIGH);
digitalWrite (clockPin, HIGH);
digitalWrite (clockPin, LOW);
*ptr >>= 1;
if (b % 8 == 0) ptr++;
}
}
You need to pack your bits into 5 bytes, the function then transmits 36 of them to the chip.
data_in - clock - data_eneble
I don't think you need data enable in this case.
Rob