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.

Need help with a "Counter"

Status
Not open for further replies.

Iceman217

New Member
Me and my friend is making a Binary Counter that uses 3 bit, and we can't figure out how to make it reset when it goes 1,2,3,4,5,6 and then reset so it doesnt count 7 with the 3 bit and it must repeat it self all over. Counter.png
 
hi,
I see the diodes are detecting the 7's count OK but they are wired as an OR gate, it should be an AND gate. the output of AND Gate should go to the RESET pins , not the SET
 
Last edited:
You would normally take the signal from when it gets to 6 and take it to all reset pins of the counters, so it goes 123456 and resets then 123456-reset.

Pete.
 
thx but can you draw exactly how it should be connected then? because im not sure how to make them go to reset because my program says it does not work :/
 
thx but can you draw exactly how it should be connected then? because im not sure how to make them go to reset because my program says it does not work :/


hi,
This will detect '7' and RESET to '0'

The circuit you have posted will give you problems with switch bounce causing multiple clocking.

EDIT:
If you are trying for a 1 to 6 counter this is one option.
 

Attachments

  • Counter.png
    Counter.png
    144.1 KB · Views: 292
  • One2Six.png
    One2Six.png
    16.9 KB · Views: 284
Last edited:
So i should delete the other Diodes and the 220 R? and you said +V?

You have drawn LED's with the 220R, I assume you want the LED's to light as you press the clock button.??

The +V means your projects +V supply.

Are simulating this circuit or building it.??
 
Note that when a counter is reset, it goes to state ZERO (000), not ONE (001). If you want six states, the normal counting sequence is 0,1,2,3,4,5,0,...

After all that, do you want a six state counter or a seven state counter?

Or do you want a counter that explicitly counts 1,2,3,4,5,6,1,...? If so, then when state 7 is detected, then you have to preset the counter to 001, not 000.

Note that decoding that an asynchronous counter has reached some state you dont want it to normally go to, and then forcing it to some other state is intrinsically a bad way to do this, because it is fraught with hazards. A much better way of doing this is to build a true finite state machine that progresses only through the valid states without entering any invalid states along the way.
 
Last edited:
im building it ^^

When you build it, ensure that you use a switch contact bounce filter circuit connected to the first 4013 clock input.

For driving leds at 20mA, I would also add a led drive transistor for each of the 3 leds.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top