Hi,
I'm new about arduino(i get it yesterday) but my first project is yet ambitious. I want to control a matrix panel 32x64 within 2048 leds.
Now I only want to understand how can i do this, i tried to simulate the matrix with one led and a loop who simulate the others leds but there is a problem, led resfresh is not quite fast to keep led on.
I'm surprise about this bheavior because arduino work with 16MHz clock.
for this project i' ve planned to use some 16 line demultiplexer(2 mux rows and 4 mux columns), I suppose to select each led and turn on it with quick refresh.
I use 11 digital output, 5(2^5=32) for rows address and 6(2^6=64) for columns address.
what's wrong and what can i do?
I've seen max2219 but if possible i want to use ttl demulitiplexer 74154, it's so easy to use and much cheap.
can I write digital output in one shot?
that is the sample code who simulate the matrix.i tried to insert a delay to keep output, with this delay led is much bright but is not acceptable, however, without delay led don't turn on(only a very very little glow
void setup()
{
pinMode(13, OUTPUT); // sets the digital pin as output
pinMode(12, OUTPUT); // sets the digital pin as output
pinMode(11, OUTPUT); // sets the digital pin as output
pinMode(10, OUTPUT); // sets the digital pin as output
pinMode(9, OUTPUT); // sets the digital pin as output
pinMode(8, OUTPUT); // sets the digital pin as output
pinMode(7, OUTPUT); // sets the digital pin as output
pinMode(6, OUTPUT); // sets the digital pin as output
pinMode(5, OUTPUT); // sets the digital pin as output
pinMode(4, OUTPUT); // sets the digital pin as output
pinMode(3, OUTPUT); // sets the digital pin as output
}
void loop()
{
digitalWrite(13, HIGH); // TEST LED i turn it on to check resfresh
digitalWrite(12, LOW);
digitalWrite(11, HIGH);
digitalWrite(10, LOW);
digitalWrite(9, HIGH);
digitalWrite(8, LOW);
digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(5, HIGH);
digitalWrite(4, LOW);
digitalWrite(3, LOW);
// delay(10);
for (int i=0; i <= 2048; i++){
digitalWrite(13, LOW); // TEST LED: i turn off it to check resfresh
digitalWrite(12, LOW);
digitalWrite(11, HIGH);
digitalWrite(10, LOW);
digitalWrite(9, HIGH);
digitalWrite(8, LOW);
digitalWrite(7, HIGH);
digitalWrite(6, LOW);
digitalWrite(5, HIGH);
digitalWrite(4, LOW);
digitalWrite(3, LOW);
}
}