Hi Paul,
Thanks for you reply. I do not intend to go beyond 10 cm at this point of time because currently i am trying out breadboard circuits. But I personally felt 10cm is too short. Because if we do any circuit, the loops wire required for mounting the components will be more than 10cm quite often. So wanted to confirm if there is any problem.
When i am waiting for the 7219 to arrive, I bought a 74HC595 from a local shop and tried to drive the 7 segment display. I tried to have 2 individual 7 seg display counting 0-9. One with 500 ms delay and another with 1000 ms delay.
Now three more things 
-
To do that, do i need 2 595 or I can achieve this through single chip itself ? (I just wanted to use only 3 lines from arduino latch, data and clock.)
-
I tried out the below program to control 7 seg display. It works like a charm. I tried removing them. As expected the ckt stopped working. But one thing that i cannot understand is we manipulate the latch pin to high and low. But we do not do any manipulation with clock and data pins. How is it working here ??
int latchPin=2;
int dataPin=3;
int clockPin=4;
int animate[9]={63,95,126,125,63,111,119,123,63};
int hello[5]={9,6,71,71,64};
int n;
void setup()
{
pinMode(latchPin, OUTPUT);
pinMode(dataPin, OUTPUT);
pinMode(clockPin, OUTPUT);
animation();
hellog();
}
void hellog()
{
for (n=0; n<=4; n++)
{
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, 127);
digitalWrite(latchPin, HIGH);
delay(50);
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, hello[n]);
digitalWrite(latchPin, HIGH);
delay(1000);
}
}
void animation() {
for (n=0; n<=8; n++)
{
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, animate[n]);
digitalWrite(latchPin, HIGH);
delay(200);
}
}
void loop()
{
//0
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, 64);
digitalWrite(latchPin, HIGH);
delay(1000);
//1
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, 121);
digitalWrite(latchPin, HIGH);
delay(1000);
//2
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, 36);
digitalWrite(latchPin, HIGH);
delay(1000);
//3
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, 48);
digitalWrite(latchPin, HIGH);
delay(1000);
//4
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, 25);
digitalWrite(latchPin, HIGH);
delay(1000);
//5
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, 18);
digitalWrite(latchPin, HIGH);
delay(1000);
//6
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, 2);
digitalWrite(latchPin, HIGH);
delay(1000);
//7
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, 120);
digitalWrite(latchPin, HIGH);
delay(1000);
//8
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, 0);
digitalWrite(latchPin, HIGH);
delay(1000);
//9
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, 24);
digitalWrite(latchPin, HIGH);
delay(1000);
}
- This is even more interesting.. I compiled the program and ensured it is working 2 days back. Once I see it working, i switched off the complete ckt and my laptop. After 2days (today) i was expecting the ckt to work on just giving the power. But it do not. I flashed the same program again and it started working (without doing any kind of hardware changes). Up to my understanding, arduino do not forgets the program on power off.
Any suggestions of why this happens so.??
Regards,
S.Sudharsan