Go Down

Topic: M74HC164B1 shift register (Read 2490 times) previous topic - next topic


Hello all,

I'm trying to shift eight bits through my M74HC164B1 shift register (the datasheet is here: http://www.datasheetarchive.com/M74HC164B1-datasheet.html). 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?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


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. :(

Go Up