I agree that a microcontroller is the simplest and cheapest way to perform the function. I believe the limitation is that microcontrollers are daunting to most beginners in electronics. Understanding the operation of a microcontroller and learning even simple programming is far from a trivial task. They may seem simple, once you understand them, but achieving that understanding and learning programming takes a serious amount of effort. Don't misunderstand, I believe microcontrollers are amazing devices and should be used wherever it makes the most sense to do so. They just may not be appropriate for something who's beginning to learn electronics.
I looked up the 40194 data sheet but I don't understand some pin functions.
There are two inputs S0 and S1 determining the shift direction. There are also two inputs "shift left and shift right", which are not described in detail in the data sheet.
I attached a small circuit which should work according to the info obtained from the data sheet.
If you have any experience working with that chip, please advise. I will try to work out a "wired logic" logic circuit for the OP.
Your second circuit is closer than the first. The "Shift Left" and "Shift Right" inputs are the serial data inputs for the serial shift. For this application you would tie SH/R high and SH/L low. That way when you select SO and S1 to "Shift Right" it will sequentially load a "1" into the FF registers QO, Q1, Q2, and Q3 for each clock pulse. When you select S0 and S1 to "Shift Left" it will sequentially load a "0" into Q3, Q2, Q1, and Q0. Thus you rather neatly have the desired sequence for the LED lights.
EDIT: To use more than one chip in series for more bits you connect Q3 of the first chip to SH/R of the second chip. You connect Q0 of the second chip to SH/L of the first chip. And so on for each additional chip. The first chip has SH/R tied high and the last chip has SH/L tied low.
If you envision the bits traveling through the shift register in either direction it should make sense. Does it?
The advantage of a microcontroller is this:
You only have to stock one item. You can produce a result to suit your customer and alter it to suit the new requirements, every time he rings up and changes his mind.
On top of this you have a project that no-one can copy.
Even a simple project like this will take less time to create with code than fiddle around with logic gates.
No matter which kind of MCU you use, you will have to know programming and of course you will have to have a programmer.
If the OP has neither one wired logic is the cheapest way for him.
Cascading three 74LS194 twelve LEDs can be driven the desired way. I simulated counting forth and back. To switch direction a cheap way is using a KULI.
BTW, fuse setting can be manipulated to enable chip readout. Not sure about copy protected.
That doesn't sound right. Each chip should work with the same clock. The "1" bit should sequentially go from the first S/R to the next. There's no reason for the second chip to act differently then the first.
Can you post a schematic of the circuit you simulated?
That doesn't sound right. Each chip should work with the same clock. The "1" bit should sequentially go from the first S/R to the next. There's no reason for the second chip to act differently then the first.
Can you post a schematic of the circuit you simulated?
Conceptually you could use a set-reset latch (Flip-Flop) to control the direction. When the "1" reaches the last output you reset the latch to count left. When the "0" reaches the first output you set the latch to count right. Sort of a game of ping-pong.
I'll try using an AND gate in place of the switch. I'm thinking that if I connect the inputs to the first and last LED then I can control a relay with that.
I'll have to order some parts Monday, Radio Shack doesn't offer much in the way of IC's anymore. Thanks for all your help everyone, especially Boncuk.
Colin55 mentioned the use of a microcontroller. I priced a programmer a few years back. It was around $700 for the burner and software. I'll look around again tonight and see if I can find something better. Does anyone here know of a good kit that is geared for beginners? Parallax sells a microcontroller kit but it looks like it's a stamp, not an actual PIC programmer.
"Colin55 mentioned the use of a microcontroller. I priced a programmer a few years back. It was around $700 for the burner and software. I'll look around again tonight and see if I can find something better. Does anyone here know of a good kit that is geared for beginners? Parallax sells a microcontroller kit but it looks like it's a stamp, not an actual PIC programmer."
I sell a PIC burner for $15.00 and the software is free. A chip will cost $10.00
The microchip PICkit3 is out and they are selling off the stock of PICkit2's for $30. Microchip makes sure the software is up to date, it works with MPLAB, and it is inexpensive.