I want to connect 4x 7 Segmented displays with 2 Shift registers both connected to 2 7447's each. I have done all the connections. But I'm a little stuck on the software part.
So I want to insert a code, 6241 for example. That means 41 should be in one shift register and 62 into the other. With the binary code: B01000001 and B01100010. However, I'm not sure how to generate this code.
Right now I have this:
digitalWrite(latchPin, LOW); data = shift_1; shiftOut(dataPin,clockPin,MSBFIRST,dataArray[data]); data = shift_1; shiftOut(dataPin,clockPin,MSBFIRST,dataArray[data]); digitalWrite(latchPin, HIGH);
Which doesn't work. I don't know the actual theory behind it but I'm guessing arduino enters 4 0's behind it automatically.
I could write down 100 different instances 00,01,02..10,11,12 etc. etc. but I'm curious if there is another way to do this, any suggestions?
Also I can't seem to find any guides using shift registers in combination with 7447's. Is there a reason for that?
Many thanks in advance,