# Synchronous (parallel) counter

Discussion in 'Homework Help' started by sdonke002, Feb 22, 2011.

1. ### sdonke002 Thread Starter New Member

Oct 12, 2010
18
0
Hello,

I am having trouble trying to design my circuit in multisim. I need to design a synchronous counter that counts in the following sequence 3,6,9,4,5. If a number other that the next in the sequnce comes up than the sequence will need to restart at 3. I have done the present and next state truth tables and come up with the j & k carnot maps for each flip flop. I do not know if I am doing this right or if I have the right outputs. Please help!!!

File size:
115 KB
Views:
92
2. ### Georacer Moderator

Nov 25, 2009
5,142
1,266
Take a look here:

I think you might want to redesign your tables. You don't actually need 4 bits for your states. Since you have 5 distinct states, you need only 3. How you will name them is arbitrary. Read the tutorial and come back with your commentary.

3. ### sdonke002 Thread Starter New Member

Oct 12, 2010
18
0
I redesigned my truth tables and K maps as you suggested and got different logarithmic expressions. I looked over the link that you sent me and I believe that I am up to the point of implementing the circuit on multisim. If you wouldn't mind, would you let me know if everything looks good and my final expressions are correct. Thank you for your time!!!!

• ###### Parallel Counter.pdf
File size:
180.4 KB
Views:
57
Last edited: Feb 23, 2011
4. ### sdonke002 Thread Starter New Member

Oct 12, 2010
18
0
Theres one more thing I do not get since my highest number in my sequence is 9, wouldn't i need 4 flip flops in order to obtain this value?
Or is it because there are 5 numbers to the sequence that I would only need 3? I am kind of confused on where to go from here.
I know that 3,6,4,5, can all be expressed in binary using 3 bits. I guess when you say I can use 3 bits to express #9 I am confused.

Last edited: Feb 23, 2011
5. ### Georacer Moderator

Nov 25, 2009
5,142
1,266
Read the link more carefully and you will see that you need only 3 bits to form the number of the different states. The states don't need to be coded with their value, but rather with an arbitrary queue numbering system.

For example, the counting 3,6,9,4,5 can be coded as 0,1,2,3,4. Your sequential circuit will loop from 0 to 5 and back again, producing a number from 0 to 4 on its 3-bit output.

It is a different circuit's job to take those 3 bits and produce a 4-bit output, through a truth table and a Karnaugh map. More specifically, you will need to build 4 Boolean functions of 3 variables each, that will represent the desired output.
For example, when input is 010, the outputs should be 1001.

Another thing to think about is that, since your circuit doesn't have any input, apart from the clock, you don't need to actually design a pure sequential circuit from scratch with Flip Flops.
You can rig a counter to count from 0 to 4 over and over, in order to produce the desired sequence of 0,1,2,3,4.

Is that clear?

Of course, this is how I would do it, and this isn't the only way.
You can actually build a sequential circuit that will produce the sequence 3,6,9,4,5 from the beginning, by using 4 flip-flops. In that case, your .pdf was on the right track, but needed 4 columns per state and 16 rows for all the combinations.

Take your pick and carry on.

6. ### sdonke002 Thread Starter New Member

Oct 12, 2010
18
0
The professor showed us how to do this using JK FF's so I would like to do this the way it was taught. I am really getting confused setting up the truth table because after the 5 present and next states there are still 11 more spots on the truth table to fill in. Do those all become X for dont cares or do they become 0011 because I want it to go to binary 3 if it goes to a number other than the next of the sequence. If you could help me setup the truth table, I think I should be able to do the K maps and implementing of the circuit.

P.S. Thank you for your help so far!!

7. ### Georacer Moderator

Nov 25, 2009
5,142
1,266
I don't think you need to worry about the counting error, as this is quite impossible to happen, but that can be arranged too.

First of all, as I said earlier, we will make a Finite State Machine that will count from 0 to 4 in loops. We will integrate the reset-on-error function too. The truth table will be like this:
$
\left[
\begin{array}{c|c|c|c|c|c}
Q_2 & Q_1 & Q_0 & Q_2^' & Q_1^' & Q_0^' \\
\hline\\
\hline\\
0 & 0 & 0 & 0 & 0 &1 \\
\hline
0 & 0 &1&0&1&0\\
\hline\\
\cdots&\cdots&\cdots&\cdots&\cdots&\cdots \\
\hline\\
1&0&0&0&0&0\\
\hline\\
1&0&1&0&0&0\\
\hline\\
\cdots&\cdots&\cdots&\cdots&\cdots&\cdots \\
\hline\\
1&1&1&0&0&0\\
\end{array}
\right]
$

Can you work with that table? Finish it, along with the Karnaugh maps and we 'll talk about the actual output next.