Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Switch counter

Status
Not open for further replies.

RPAE

New Member
Hi everyone im looking for suggesting on how to design a circuit which will turn on an LED with the pushing of a switch, Pushing it again will turn on another and pushing it a third time will turn on a third etc. perhaps to 10 LEDs coming on after 10 pushes. I'm stumped as to what chip to use i have been looking at the night rider design and the 12bit binary counter, but as you will know it does not do the job required.

Any solutions or recommendations would be greatly appreciated
 
Look up a 4017 CMOS decoded decade counter. You will need a separate circuit to debounce the switch to create a clock for the counter.
 
I agree with Mike. I'd use a 4017 decade counter and some latches to keep the LEDs on once they're turned on.
 
Thanks Mike,

I had looked at this chip earlier in the chasing circuit Im finding it difficult to hold the output on keeping a singular Led on and then Holding another on with another pulse.
 
Thanks Mike,

I had looked at this chip earlier in the chasing circuit Im finding it difficult to hold the output on keeping a singular Led on and then Holding another on with another pulse.

That's what the latch would be for. You can make a simple latch with some resistors and a couple transistors:

21b9cd757dd378606ddcd20d58863c4807a02f46_large.jpg

Or if you have some JK Flip-Flop chips, you can use those instead.
 
Ok, if you want to light up the LEDs progressively, and possibly turn them off the same way, you need an 8bit shift register like the 4014. Cascade two to get more bits. Switching the input from high to low will progressively turn off the LEDs.
 
you need an 8bit shift register like the 4014. Cascade two to get more bits

Hi MikeML,
Can the 74LS164 shift register (8-Bit Serial In/Parallel Out Shift Registers) do this???
I have added also the circuit......74164.jpg
 
Yes the chip is capable, but I have not analyzed your circuit.

Wouldn't the goal be to make a self-completing state machine which you feed a single pulse to start it, and then it runs through this sequence, and then shuts itself off:

1000000000
1100000000
1110000000
...
1111111111
0111111111
...
0000000001
0000000000 final and stopped state...
 
Yes the chip is capable, but I have not analyzed your circuit.

Wouldn't the goal be to make a self-completing state machine which you feed a single pulse to start it, and then it runs through this sequence, and then shuts itself off:

1000000000
1100000000
1110000000
...
1111111111
0111111111
...
0000000001
0000000000 final and stopped state...

have to feed the data 8 clock cycle high and then as low????
 
Take the tenth bit output, invert it, and feed it back to the ShiftIn of the first bit. However, that will run the sequence forever You would also have to force all ten bits to zero initially.
 
Take the tenth bit output, invert it, and feed it back to the ShiftIn of the first bit. However, that will run the sequence forever You would also have to force all ten bits to zero initially.

74164 switch included....jpg
in this circuit I'm able to do what is required but with 8 bits..... please check this......
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top