Modulo 10 up/down counter

Thread Starter

Earl Vickery

Joined Sep 1, 2019
10
I am not sure how i should wire up the counting down part of the circuit. Currently when it is counting down it starts at 5 because of the AND gate that resets the illegal states. I've tried to figure it out myself. I know some more logic gates are needed so it starts at 9 but im stuck.


Thanks for any help in advance.
I am new to circuits
 

Attachments

Last edited:

Thread Starter

Earl Vickery

Joined Sep 1, 2019
10
I didn't reset the others because it doesn't seem to count down at all then. I know there is something wrong with my reset logic but just cant think of it.
 

Thread Starter

Earl Vickery

Joined Sep 1, 2019
10
I've been stuck on this for the past couple of days. I know its something simple, but i cant think of it. I will take a break and come back to it.
 

MrAl

Joined Jun 17, 2014
11,389
Hi again,

Normally what you do is make up a logic state diagram and work from that.
To get into an implementation you study each flip flop section until you know how each individual stage works and translates into the state diagram.
Look up "logical state diagram" and see if that helps.
 

dl324

Joined Mar 30, 2015
16,839
Currently when it is counting down it starts at 5 because of the AND gate that resets the illegal states. I've tried to figure it out myself. I know some more logic gates are needed so it starts at 9 but im stuck.
Show your work and post the entire text of the problem.
 

MrAl

Joined Jun 17, 2014
11,389
You seem to be on the right track, but what is happening with the set 's' inputs? Take a look at that first.
 

Thread Starter

Earl Vickery

Joined Sep 1, 2019
10
I have been playing around with set and reset inputs of the FFs. I think i have made some progress with it though it does seem a bit messy. Will post what i changed soon.
Thanks for the help
 

Picbuster

Joined Dec 2, 2013
1,047
I am not sure how i should wire up the counting down part of the circuit. Currently when it is counting down it starts at 5 because of the AND gate that resets the illegal states. I've tried to figure it out myself. I know some more logic gates are needed so it starts at 9 but im stuck.


Thanks for any help in advance.
I am new to circuits
First off all identify what you want
1:up/down counter
2:controlled by push buttons.
3:Startup value 0 5 9

What do we need a counter:
are there decimal counters available?
if not we have to use a binary counter.
can we use a 0-15 counter with a set and reset?
and so on
never start thinking in components start with what functions you want and even more important what you don't want to happen.
The produce a simple flow chart
next step is to identify components based on previous finding and definitions.

But it's your brain to solve this. We only can help you to discover the technical parts of your own brains.

Picbuster
 

MrChips

Joined Oct 2, 2009
30,707
I am not sure that you are taking the correct approach.
You are attempting to create a finite state machine
Do you know anything about Karnaugh maps?
Read up about Moore machine and Mealy machine.
 

MrAl

Joined Jun 17, 2014
11,389
I have been playing around with set and reset inputs of the FFs. I think i have made some progress with it though it does seem a bit messy. Will post what i changed soon.
Thanks for the help
Hi,

Well it looked like you were either at or near the solution so it must be something silly wrong that's why i pointed out that the set inputs were not grounded.
 

dl324

Joined Mar 30, 2015
16,839
I have been playing around with set and reset inputs of the FFs. I think i have made some progress with it though it does seem a bit messy. Will post what i changed soon.
It seems that you've taken a binary up/down counter and you're trying to make it a decade counter by adding reset logic. Is that what the problem requires?

I've designed a decade up/down counter with JK flip flops and it required about a dozen gates.
 

Thread Starter

Earl Vickery

Joined Sep 1, 2019
10
The current course i am doing has not taught us anything advanced or even of something of an intermediate level. All i have been given for this task is the very basic fundamentals of flip flops like a JK or a D and how they are used in shift registers or ripple counters. From what i have seen so far from everyone's input is that i am lacking in so many skills that could help me.

For anyone that wants to know the whole story i am basically making a decade counter because that is what will help me make a counter that goes from 0-99 on a hex display. I was given this task only 3 weeks in. See attached image as well/
 

Attachments

RBR1317

Joined Nov 13, 2010
713
For anyone that wants to know the whole story i am basically making a decade counter because that is what will help me make a counter that goes from 0-99 on a hex display.
However the attachment provided gives the following requirement: "... showing the track number(between 1 and 99)."

Apparently you will need to use the set & reset inputs to the flip-flops to set the initial state to "1". Also, the clock signal and the UP/DOWN state will be generated by the same push-buttons; that will be an interesting problem to solve in Logisim.
 

Thread Starter

Earl Vickery

Joined Sep 1, 2019
10
At this point in time i am more interested in getting a 0-9 up/down counter working than anything else. Also a 0-99 counter is being accepted for the task since everyone is finding it so difficult to get a 1-99 counter working. I haven't done much work on my current circuit but will continue during the weekday.
Thank you everyone for your help and input. Not entirely sure what the end result will be but i will be happy as long as i can get a 0-9 counter working
 

dl324

Joined Mar 30, 2015
16,839
Also a 0-99 counter is being accepted for the task since everyone is finding it so difficult to get a 1-99 counter working.
7 variable Kmaps would be a bit much to solve. I do 6 without much thought, but I'd prefer not to do 7.

It still isn't clear from stage3.PNG how you're supposed to design the counter. The usual way is to make a truth table and generate the boolean equations for the gating logic from that.
 

RBR1317

Joined Nov 13, 2010
713
At this point in time i am more interested in getting a 0-9 up/down counter working than anything else.
There are several approaches to digital design of counters/state-machines, but one of the easiest is to find a circuit that functions close to what is needed and modify it. For instance, take a modulo-16 up/down counter and convert it into a 1-9 up/down counter (as shown in the attachment). The comparison diagram shows that the mod-16 counter works the same as the mod-9 counter except when the down-count reaches "1" & when the up-count reaches "9". The yellow-shaded transitions indicate the differences where the individual flip-flop toggling needs to be forced or inhibited to achieve the desired operation. And note that the set/reset FF inputs are only used to set the initial state.
Comparison 16_vs_9.png Modulo-9_UpDown_Counter.png
 

dl324

Joined Mar 30, 2015
16,839
The current course i am doing has not taught us anything advanced or even of something of an intermediate level. All i have been given for this task is the very basic fundamentals of flip flops like a JK or a D and how they are used in shift registers or ripple counters. From what i have seen so far from everyone's input is that i am lacking in so many skills that could help me.
You still haven't posted the entire text of the problem. Without more context, we have no idea how your instructor expected you to solve this problem.

The typical way an up/down counter is designed is to start with a truth/transition table, draw some Kmaps, and solve for the boolean equations. When you use this method, you don't need to use the set/reset inputs on the flip flops.

Your first circuit already has 11 gates and you're still struggling. I did an up/down mod 10 counter with JK flip flops and it took 15 logic gates.
 
Top