Pages: [1]   Go Down
Author Topic: M74HC164B1 shift register  (Read 2088 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 158
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 536
Posts: 27061
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Derby
Offline Offline
Newbie
*
Karma: 0
Posts: 40
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 158
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley-sad
Logged

Pages: [1]   Go Up
Jump to: