I am making an led cube using STP08DP05 (http://www.st.com/stonline/books/pdf/docs/13405.pdf) to drive the multiplexed leds.
Currently no matter what i change the cube still seems to lighting up columns 1 2 3 and occasionally 4. From what I can tell this is due to the serial connection with the chips.
I have one serial from pin 2 on the auruino into sdi and out from sdo to the other chip driving the last 8 columns.
anything helps!!!
//pins
int sdiPin = 1; //
int clkPin = 2;
int latPin = 3;
int L1 = 4;
int L2 = 5;
int L3 = 6;
int L4 = 7;
//vars
byte led[15] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
//-----------------------------------------
void setup()
{
pinMode(sdiPin, OUTPUT);
pinMode(clkPin, OUTPUT);
pinMode(latPin, OUTPUT);
pinMode(L1, OUTPUT);
pinMode(L2, OUTPUT);
pinMode(L3, OUTPUT);
pinMode(L4, OUTPUT);
//digitalWrite(clkPin, LOW);
Serial.begin(9600);
}
//-----------------------------------------
void loop()
{
digitalWrite(L4, HIGH);
digitalWrite(L3, HIGH);
digitalWrite(L2, HIGH);
digitalWrite(L1, HIGH);
//turn all LEDs off then turn them on
delay(.00000002);
Serial.print(0, BIN);
delayMicroseconds(.007);
digitalWrite(clkPin, HIGH);
delayMicroseconds(.015);
digitalWrite(latPin, HIGH);
delayMicroseconds(.005);
digitalWrite(clkPin, LOW);
delayMicroseconds(.015);
digitalWrite(latPin, LOW);
delay(.00000002);
Serial.print(255, BIN);
delayMicroseconds(.007);
digitalWrite(clkPin, HIGH);
delayMicroseconds(.015);
digitalWrite(latPin, HIGH);
delayMicroseconds(.005);
digitalWrite(clkPin, LOW);
delayMicroseconds(.015);
digitalWrite(latPin, LOW);
}