SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By giuseppe
Hello everyone! Finally got around to register on the Sparkfun forum.

So I recently obtained a 74h595 shift register and am a little puzzled about the clock pins. Why is there two of them!?
What is the difference between the shift register clock input and the storage register clock input? I am not using a microcontroller, instead I am just wiring the parallel outputs (Q0 - Q7) to a 7-segment display (through resistors of course) and just wanted to clock it on my own by tapping a N/O tactile switch. Both clock pins are tied to ground through a 10K resistor. I attached two separate N/O switches to +5V and the other side to the respective clock pin so when I want like to clock a bit in, all I would do is just pulse it HIGH by briefly pressing the switch. But when I try to do this, either all of the LEDs go on or all of them go off. SOOOOO that is why I need a little help understanding how exactly the two clock pins work. In my ECE class, we only discussed FFs and other ICs with only one clock pin so I am a little stuck. Here is a list of my connections and data sheet:

Data sheet:

My pin connections:

pin 1 - Q1 -- connected to a segment
pin 2 - Q2 -- connected to a segment
pin 3 - Q3 -- connected to a segment
pin 4 - Q4 -- connected to a segment
pin 5 - Q5 -- connected to a segment
pin 6 - Q6 -- connected to a segment
pin 7 - Q7 -- connected to a segment
pin 8 - Gnd -- connected to ground
pin 9 - Q7'(serial output) -- not connected
pin 10 - MR (bar) -- connected to +5V
pin 11 - SH_CP -- grounded through a 10K resistor until tapped with +5V
pin 12 - ST_CP -- grounded through a 10K resistor until tapped with +5V
pin 13 - OE (bar) connected to ground
pin 14 - DS -- connected to +5V or ground
pin 15 - Q0 -- connected to a segment
pin 16 - Vcc -- connected to +5V
By waltr
My first guess is that switch bounce is producing many low to high transitions therefore many clock pulses.

Try debouncing the switches.
By asdf35
I agree that you need to de-bounce the clock inputs. You need to be really careful with any signal you send to a clock pin.

But to answer your original question take a look at the block diagram on page 4. The shift register actually has 2 registers each with a clock. The first is the shift register and the second is an output latching register. The idea is that you shift 8 bits into the shift register (with 8 clock pulses). Then you clock the output register and the value of the shift register appears on the output pins. This prevents the outputs from changing while you're shifting in the new 8-bit value.