I tried to describe my problem in subject, but so, i managed to buil code & of course circuit for 8x8 matrix, no big deal there (thought it was bothersome without using libraries.....) but now then, i'd like to use bigger strings of text. if i increase size of array, sure, but counter won't count up enought to display changes. If i increase value of that counter, columns array overshoots then. of course i could just make bigger display but that seems pointless if display string takes only half....and that only shifsts problem further, soon i must make again bigger display, i know it's possible to make long chains of text but can't figure it out. So, help & advice greatly appreciated! screen shows just an arrow that slides along the display, if that makes any difference. And, i use 74595's to drive display along with darlington arrays
i don't have any max's ic's.
int dataPin = 2; //IC 14 //Define which pins will be used for the Shift Register control
int latchPin = 3; //IC 12
int clockPin = 4; //IC 11
//OE-GND
//MR-VCC
int const t = 2000;
byte x [8] =
{
B00001000,
B00001100,
B00001110,
B01111111,
B01111111,
B00001110,
B00001100,
B00001000,
};
byte columns [8] =
{
B00000001,
B00000010,
B00000100,
B00001000,
B00010000,
B00100000,
B01000000,
B10000000,
};
void setup()
{
DDRD = DDRD | B00011100; //set pins as output
}
void loop()
{
int a, hold, shift;
for ( shift = 0 ; shift < 7 ; shift++ ) //amount to shift
{
for (hold = 0; hold < 25; hold++) //time for shifting
{
for (a = 0; a < 8; a++) //how many arrays to load?
{
PORTD = B00000000; //turn latch low
shiftOut(dataPin, clockPin, MSBFIRST, columns[a]); //Send the data #2 (what columns to power)
shiftOut(dataPin, clockPin, LSBFIRST, x[a]>>shift); //Send the data #1 ( what data to draw)
PORTD = B00001000; //turn latch on->show screen
delayMicroseconds (t);
}
}
}
}