Pages: [1]   Go Down
Author Topic: Shift register woes  (Read 492 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey guys - I wired up a simple circuit with a shift register - the eventual goal is to connect it to Ardunio.

But I'm having some troubles with the test circuit. First of all, here's the datasheet: http://www.st.com/stonline/books/pdf/docs/1910.pdf

I've wired up the register with 8 LEDs on the 8 outputs, 5v to the Vcc, reset, and two switches - one at the clock pin and one for the two inputs. The LEDs are wired to ground in-series with a resistor

When I switch on my power supply, all the LEDs turn on. Switching the switches doesn't do anything. What I'd like to see is: switch on input and toggle clock, one light comes on. Toggle clock, light advances and finally disappears.

I've gone over the circuit and I can't figure out what could possibly be wrong. Am I misunderstanding something about this component?

Any help is greatly appreciated...
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the 2 inputs are part of an AND gate, if you just want to toggle tru it try putting one of the 2 inputs (your choice) connected to +5

you should be able to toggle the clock and the remaining input and get the desired effect

I wrote a fairly crappy article on it if your interested

http://www.instructables.com/id/The-74HC164-Shift-Register-and-your-Arduino/
« Last Edit: February 26, 2010, 05:36:24 pm by Osgeld » Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, at the moment I've tied both inputs together with a jumper so they're both on or both off. I'm going to add some tracing LEDs to make sure the switches are doing what I want, and I'll read that article as well.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK now I'm really confused.

Since it wasn't working anyway, I wired it up to the Arduino - simply replacing my switches with digital pins. shiftOut worked like a dream, as well as bit-banging (digitalWrite(signal, HIGH); digitalWrite(clock, HIGH); delay(10); digitalWrite(clock, LOW)smiley-wink. Again, I didn't have to change anything about the circuit itself.

So I replaced the switches with buttons, in place of the Arduino pins, and got the same problems. Pushing 'clock' with no 'signal' does nothing, but pushing 'signal' then 'clock' turns on all the lights.

Is my finger's "rise time" not fast enough? Is it counting a single button push as a bunch of rises?

Now that I have it working with Arduino I guess I'm in good shape, but I'd like to understand why my circuit isn't working.
« Last Edit: February 26, 2010, 07:36:11 pm by slimjim8094 » Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

could be, switches are very noisy
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK... that was the only reasonable explanation I could come up with for what I was seeing.

I'll try throwing a capacitor between the switch and the clock
Logged

Pages: [1]   Go Up
Jump to: