Go Down

Topic: Possible to operate a shift register manually with switches? (Read 5 times) previous topic - next topic

gonzogeek

Hello

Is it possible to operate a shift-register manually if you get my meaning with a row of switches? Why on Earth would I want to do that I hear you ask? Only out of curiosity and as a learning exercise and oh well isn't there something just a little bit perverse and sexy about doing such a thing? Like I was programming the ENIAC or some other arcane device? Oh Ok, just me then.

The shift register I have in mind is a 74HC595. The sequence is I believe

1. latch pin LOW
2. data pin HIGH
3. clock pin LOW
4. data pin {desired pin state for bit N}
5. clock pin HIGH
6. data pin LOW
7. repeat from 3 until N=8
8. clock pin LOW

So I'd have 8 LEDs connected to Q1-Q8 of the 595 with 220R current limiting resistors to GND and I'd have three ON/OFF switches for the latch, data and clock pins. I'd go through the sequence for a given binary pattern reach the final step and hey presto my LEDs will light in the given pattern.

Makes sense no? I am a noob so I may well be way off piste. The only reason this might not work - it occurs to me - is if the various things are time critical. I was pretty good at Track'n'Field back in the day but I don't think I can flick switches at a millisecond rate :)

retrolefty

In theory you could operate a shift register with manual switches, the SR doesn't care how slow the sequence operates, just that it has the correct sequence steps. The problem you will have in reality is that manual switches have 'contact bounce' which will cause false stepping unless you design hardware contact debouncing components. That will make the whole circuit fairly component 'busy' and possibly frustrating to get working properly.

Lefty


Graynomad

Quote
various things are time critical

There's nothing particularly time critical in what you are doing, the only issue is switch bounce as retrolefty said, and that only matters on the clock pin.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

CrossRoads

And since only the clock pin matters, you could have a switch trigger a 555 to make pulse for you, nice & wide so when you fatfinger the switch you only get 1 clock signal out of it.
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.

Nick Gammon

See below:



That is the bounce on a little switch press. There are so many bounces there it would probably clock out all 8 bits, and you would be left thinking it didn't work. You definitely need to address that or it won't be educational.

Go Up