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.

2-bit up/down counter using gates

Status
Not open for further replies.

EngIntoHW

Member
Hey,

I was trying to design a 2-bit up/down counter using gates, and came up with the following design:

When SEL = 0 & CLK = 1 : Output <- Output + 1
When SEL = 1 & CLK = 1 : Output <- Output - 1
When CLK = 0 : Output remains unchanged.
*The DELAY block comprises even number of INV gates.
2-bit-up-down-counter-using-gates-png.46041


What is your opinion?
Will it work?

I'd also love to hear any other suggestions you might have.

Thank you :)
 

Attachments

  • 2-bit up-down counter using gates.png
    2-bit up-down counter using gates.png
    25.9 KB · Views: 1,791
Last edited:
Here is how I would do it. I used a modified Johnson counter. It is synchronous, and Grey-code, so can be decoded glitchlessly. It counts up as long as UP is true, and counts down as long as UP is false. It changes state on rising edges of Clk.
 

Attachments

  • 2BitUPs.png
    2BitUPs.png
    332.4 KB · Views: 568
  • 2BitUD.png
    2BitUD.png
    43.8 KB · Views: 754
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top