M74HC164B1 shift register

Hello all,

I'm trying to shift eight bits through my M74HC164B1 shift register (the datasheet is here: M74HC164B1 datasheet & application notes - Datasheet Archive). It has two data output pins and one clock output pin. I have shift register pins 1, 14, and 9 wired to HIGH on my breadboard, pin 7 wired to LOW on my breadboard, pin 2 (data output) wired to digital pin 9 on my arduino, pin 8 (clock output) wired to pin 2 on my arduino, and the output pins on the shift register wired to their respective LEDs. The 5V and GND pins are wired to the correct power rails on my breadboard.

I then tried uploading this program:

int data = 9;
int clock = 2;

void setup()
{
pinMode(clock, OUTPUT); // make the clock pin an output
pinMode(data , OUTPUT); // make the data pin an output
shiftOut(data, clock, LSBFIRST, B10101010); // send this binary value to the shift register
}

void loop(){} // empty loop for now

Nothing lit up though. Could someone please help me out? I want to shift a bit through and have it show up on my LEDs. Thanks!

Your description seems to match the part.
How are the LEDs and their current limit resistors wired up?

ahhreeyell, try putting the shift out in the main loop. I was working on a timer recently that did initial animation of the time in the setup, but when I left the loop blank, it did the animation, but then just displayed 0 when it hit the loop.

The LEDs are wired to the output pins (3 through 4 and 10 through 13) on the shift register. I used various resistors, but mostly 1Ks.

I tried putting the shiftOut() function in loop(), but no results. :frowning: