Hi,
I just got a few tlc5940's and built it up on a breadboard. Sample sketches run perfectly, but then I tryed to write some "efects". Since I'm not so good at mathematics I thought I'll have the most control if I write separate array for each led, but when it get's larger, it stops working (two random led's blink histerycaly)
Is it possible that I used up too much RAM doing this? Any other ideas why shouldn't it work?
For a closer look, definitions:
int chase2_R0[] = {1000,0,0,0,0,0,0,0,1000,0,0,0,0,0,0,1000,0,0,0,0,0,1000,0,0,0,0,1000,0,0,0,1000,0,0,1000,0,1000};
int chase2_R1[] = {0,1000,0,0,0,0,0,0,0,1000,0,0,0,0,0,0,1000,0,0,0,0,0,1000,0,0,0,0,1000,0,0,0,1000,0,0,1000,1000};
int chase2_R2[] = {0,0,1000,0,0,0,0,0,0,0,1000,0,0,0,0,0,0,1000,0,0,0,0,0,1000,0,0,0,0,1000,0,0,0,1000,1000,1000,1000};
int chase2_R3[] = {0,0,0,1000,0,0,0,0,0,0,0,1000,0,0,0,0,0,0,1000,0,0,0,0,0,1000,0,0,0,0,1000,1000,1000,1000,1000,1000,1000};
int chase2_R4[] = {0,0,0,0,1000,0,0,0,0,0,0,0,1000,0,0,0,0,0,0,1000,0,0,0,0,0,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000};
int chase2_R5[] = {0,0,0,0,0,1000,0,0,0,0,0,0,0,1000,0,0,0,0,0,0,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000};
int chase2_R6[] = {0,0,0,0,0,0,1000,0,0,0,0,0,0,0,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000};
int chase2_R7[] = {0,0,0,0,0,0,0,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000};
int chase2_G0[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int chase2_G1[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int chase2_G2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int chase2_G3[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int chase2_G4[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int chase2_G5[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int chase2_G6[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int chase2_G7[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int chase2_B0[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int chase2_B1[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int chase2_B2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int chase2_B3[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int chase2_B4[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int chase2_B5[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int chase2_B6[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int chase2_B7[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
and a function:
void test4()
{
Tlc.set(0, chase2_R0[i]);
Tlc.set(1, chase2_R1[i]);
Tlc.set(2, chase2_R2[i]);
Tlc.set(3, chase2_R3[i]);
Tlc.set(4, chase2_R4[i]);
Tlc.set(5, chase2_R5[i]);
Tlc.set(6, chase2_R6[i]);
Tlc.set(7, chase2_R7[i]);
Tlc.set(8, chase2_G0[i]);
Tlc.set(9, chase2_G1[i]);
Tlc.set(10, chase2_G2[i]);
Tlc.set(11, chase2_G3[i]);
Tlc.set(12, chase2_G4[i]);
Tlc.set(13, chase2_G5[i]);
Tlc.set(14, chase2_G6[i]);
Tlc.set(15, chase2_G7[i]);
Tlc.set(16, chase2_B0[i]);
Tlc.set(17, chase2_B1[i]);
Tlc.set(18, chase2_B2[i]);
Tlc.set(19, chase2_B3[i]);
Tlc.set(20, chase2_B4[i]);
Tlc.set(21, chase2_B5[i]);
Tlc.set(22, chase2_B6[i]);
Tlc.set(23, chase2_B7[i]);
Tlc.update();
if(i<15) i++;
else i=0;
delay(80);
}
Regards,
Peter