Hey Guys,
I'm creating a project which has seven separate Texas Instruments 74HC595 Shift Registers daisy chained. In addition, I have ten 7-segment displays connected to those shift registers. I would include a diagram, but there is SO much wiring to it. I have checked the wiring and everything seems to be working correctly.
I have searched google up and down, and I haven't been able to get a straight answer. How would you go about sending data in binary to the shift registers (in this case my setup is 56 Bits). I need to be able to control each pin separately. I created a test sketch:
//Pin connected to ST_CP of 74HC595
int latchPin = 11;
//Pin connected to SH_CP of 74HC595
int clockPin = 10;
////Pin connected to DS of 74HC595
int dataPin = 12;
void setup() {
//set pins to output because they are addressed in the main loop
pinMode(latchPin, OUTPUT);
digitalWrite(latchPin, 0);
shiftOut(dataPin, clockPin, MSBFIRST, B00000000);
shiftOut(dataPin, clockPin, MSBFIRST, B00000000);
shiftOut(dataPin, clockPin, MSBFIRST, B00000000);
shiftOut(dataPin, clockPin, MSBFIRST, B00000000);
shiftOut(dataPin, clockPin, MSBFIRST, B00000000);
shiftOut(dataPin, clockPin, MSBFIRST, B00000000);
shiftOut(dataPin, clockPin, MSBFIRST, B00000000);
digitalWrite(latchPin, 1);
}
void loop() {
}
This should light up all of the segments of the 7-segment displays, however it is only lighting up the first 6 or so. And I can only get it that far after resetting it ten times.
Any help is greatly appreciated, and thanks in advance!
Hakan Saplakoglu