Design Sequential Circuit Counter (Earn $5)

Thread Starter

mitchmitch555

Joined Mar 2, 2015
5
Hello all, this is my first post on All About Circuits. I need some help understanding a project assigned in my computer architecture class. Successful help earns a $5 tip through paypal.

The problem description: Design a sequential circuit with three flip-flops and one input x. When x = 0, count 0, 2, 3, 5, 6 and repeat. When x = 1, count 6, 5, 3, 2, 0 and repeat.

My problem is that I don't know how to turn this information into boolean expressions for each flip flop, which I can then turn into state diagrams and tables. I know how to write an expression once I have the circuit drawn out in front of me, but I don't understand flip-flops and counters well enough to move through this problem. Some guidance would be greatly appreciated as this problem is due in class tomorrow morning.

Thanks a lot, if you help me I'll pay you $5 on paypal.
 

MrChips

Joined Oct 2, 2009
30,712
Last edited:

Thread Starter

mitchmitch555

Joined Mar 2, 2015
5
Sorry. That is not how AAC works.

No one here is going to do your homework for money. You have to show your own efforts.
Draw a truth table of all possible states and the next state after a clock pulse.

Take a look at this:

http://forum.allaboutcircuits.com/threads/submission-another-look-at-synchronous-counters.82082/
Thanks, I don't want my homework done for me. I needed guidance as my textbook didn't cover this type of problem and I couldn't find a solution on the internet. So thanks for the link, it's exactly what I needed.
 

WBahn

Joined Mar 31, 2012
29,978
Thanks, I don't want my homework done for me. I needed guidance as my textbook didn't cover this type of problem and I couldn't find a solution on the internet. So thanks for the link, it's exactly what I needed.
Huh? You don't want your homework done for you? Let's see. You don't show any work and you want to pay someone to design the circuit and draw it out for you because you couldn't find someone else's solution on the internet that you could copy. Yet you claim with a straight face that you don't want your homework done for you. That's rich.
 

Thread Starter

mitchmitch555

Joined Mar 2, 2015
5
Huh? You don't want your homework done for you? Let's see. You don't show any work and you want to pay someone to design the circuit and draw it out for you because you couldn't find someone else's solution on the internet that you could copy. Yet you claim with a straight face that you don't want your homework done for you. That's rich.
Alright well thanks for the help guys
 

WBahn

Joined Mar 31, 2012
29,978
If you will show your work, we'll be more than willing to help you. But "help" means looking at YOUR attempt to solve YOUR homework and then making observations, asking leading questions, or offering hints and suggestions that will enable YOU to move forward with YOUR solution to YOUR homework problem. We can't even begin to do that until you show us YOUR attempt, because that is what allows us to see where you are going right and where you are going wrong and what your approach is.
 

Thread Starter

mitchmitch555

Joined Mar 2, 2015
5
If you will show your work, we'll be more than willing to help you. But "help" means looking at YOUR attempt to solve YOUR homework and then making observations, asking leading questions, or offering hints and suggestions that will enable YOU to move forward with YOUR solution to YOUR homework problem. We can't even begin to do that until you show us YOUR attempt, because that is what allows us to see where you are going right and where you are going wrong and what your approach is.
I really only needed a point in the right direction as far as teaching myself how to come up with a circuit based on that information, the article that Mr Chips linked me was exactly that. I really didn't want my homework done for me; I still have to take an exam over it. Sorry if I came off like an ignorant lazy student. I offered $5 in hopes it would entice someone to answer me sooner rather than later. That's all.
 

tshuck

Joined Oct 18, 2012
3,534
You needn't offer money as incentive, most that would offer you help wouldn't be motivated any more by $5.

Most of the regulars are here because they enjoy helping.

To get a quality reply, all you need is a problem statement, your work (however complete/correct), a decent title, and a little bit of patience.
 

Thread Starter

mitchmitch555

Joined Mar 2, 2015
5
You needn't offer money as incentive, most that would offer you help wouldn't be motivated any more by $5.

Most of the regulars are here because they enjoy helping.

To get a quality reply, all you need is a problem statement, your work (however complete/correct), a decent title, and a little bit of patience.
I'm currently reading your Synchronous Counters article, tshuck. Extremely helpful. I now understand that I'm supposed to combine the three flip flops' outputs in order to get the "count" number, and that the output of a D flip flop is determined by the state of the D input at every positive edge of the clock update. However, I don't know how to control the output of a flip flop. To me it seems random based on the clock input. I don't understand the workings of the clock well enough to know what to do next so I can actually draw this circuit. My current "work" that I've completed is just converting the outputs I need to get from the flip flops to binary so I at least know what actual outputs I'm looking for.
 

tshuck

Joined Oct 18, 2012
3,534
I'm currently reading your Synchronous Counters article, tshuck. Extremely helpful. I now understand that I'm supposed to combine the three flip flops' outputs in order to get the "count" number, and that the output of a D flip flop is determined by the state of the D input at every positive edge of the clock update. However, I don't know how to control the output of a flip flop. To me it seems random based on the clock input. I don't understand the workings of the clock well enough to know what to do next so I can actually draw this circuit. My current "work" that I've completed is just converting the outputs I need to get from the flip flops to binary so I at least know what actual outputs I'm looking for.
I'm glad you found it useful. That article was intended to formalize what was already in the eBook for a basic synchronous counter. You have a little more complex circuit.

What you have is a finite state machine. Have you learned about them? If not, that's fine, this is a good bridge between counters and FSMs.

One major difference between the article and your design is that you have to have an input (x). To account for this, your state table must reflect the addition of the input.

This means that the part where we list the current state and next state, the input must be present. There are a few ways to do this, here's one:

You should have an extra column for the input, much like the following image from Georacer's article on Finite State Machines:
(disregard the output column)

Note on the image: The current state would be the two bits A and B, where I have listed them as their binary count value in the following table.

Then fill in the table for your design:
Current State | Input (x) | Next State
000|0|010 = 2
000|1|110 = 6
001|0|xxx = not valid state
001|1|xxx = not a valid state
010|0|011 = 3
010|1|000 = 0
...|...|...
This table captures the behavior of the counter, including the behavior as a result of x. Notice that a current count of 0 is listed twice - once when x=0 and again for when x=1.

Try to fill in the table on your own, here's the code for the table:
Code:
[Table=head] Current State | Input (x) | Next State
000|0|010 = 2
000|1|110 = 6
001|0|xxx = not valid state
001|1|xxx = not a valid state
010|0|011 = 3
010|1|000 = 0
...|...|...
[/table]
_____________________________
Another way to do this might be to count up and down 0-4 and map the count value to the appropriate output, e.g.:
Count => Mapped Output
0 => 0
1 => 2
2 => 3
3 => 5
4 => 6
Then you only have to worry about a mod-5 up/down counter.
 
Last edited:
Top