# sequential circuits

Discussion in 'Homework Help' started by renegadegas, Feb 27, 2013.

Dec 2, 2012
89
0
Hi everyone,

I am stuck on the attached homework and i'm stuck on TASK 2. I have also attached the beginning of my solution but i'm stuck.

I know i have to find the minterms and create a karnaugh map.

Can anyone please start off by showing me how to go about
getting the minterms, then the karnagh maps please?

Thanks.

File size:
269.5 KB
Views:
56
File size:
264.2 KB
Views:
60
2. ### tshuck Well-Known Member

Oct 18, 2012
3,531
675
I feel I can best explain this by showing what the steps are, so, I will do a portion so that I may explain the reasoning behind the choices made....

First, we need the excitation table for a JK flip flop:

Given this, we know that when the output of the flip flop is 0, J controls the next state with a don't care on K, conversely, when the output is 1, K controls the next state with J being a don't care.

That being said, you have three variables: Q0, Q1, and Q2, representing the current count with Q0 being the LSB. In addition to this, you have another variable that determines what the next state is, Count. This means you will need a four input K-map for each of your flip flop inputs(J & K). We need to determine next-state logic.

I will show you the K-maps for the first flip flop(Q0):
For J0(J on Q0)
 Q2 Q1\Q0 Count 00 01 11 10 00 0 1 X X 01 0 1 X X 11 0 0 X X 10 0 1 X X

The left-most column contains the information when Q0 is 0 and Count is not enabled(active-high input), this means the state should not change, which is determined by J.

The next column is determined by the count, what the next count should be.
The following two columns are determined while D0 is 1, which isn't determined by J, so they are don't cares.
For K0(J on Q0)
 Q2 Q1\Q0 Count 00 01 11 10 00 X X 1 0 01 X X 1 0 11 X X 1 0 10 X X 1 0

**I have made it so that if caught in a state outside of 0-5, it will return to 0**

So far, the next state logic can be determined for Q0. Applying the same idea, finish the rest of the K-maps...

Dec 2, 2012
89
0
Thanks very much for taking the time to reply. Ill be digesting them and get
back to you ASAP. Thanks again.

4. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
It actually looks like you've got most of it done. The only thing that you haven't included is the Count input. Follow tshuck's suggestion and that will be taken care of.
This is backwards from they way you normally do it. You do a K-map in order to find the minterms (or maxterms). Again, tshuck has you started down the right road.

One good exercise to consider before you go any further. See if you can design the logic for the LSB (Q0) by inspection. If you think about how it behaves when Count is HI and how it behaves when Count is LO, you'll see that the logic is trivial (so trivial, in fact, that it requires no gates at all for a JKFF implementation).

5. ### t06afre AAC Fanatic!

May 11, 2009
5,939
1,222

Dec 2, 2012
89
0
I remember you helped me with my previous assignment.
I'm in a daze at the moment with the replies iv had. I'll hopefully
get them all right.
Thanks again

Dec 2, 2012
89
0

Hello,

Iv'e come up with the attached but i don't think the solutions from the K map is right. It looks weird. The bottom cells of each k-map have nothing.

File size:
255.6 KB
Views:
35
• ###### K-Maps.jpg
File size:
265.8 KB
Views:
38

Dec 2, 2012
89
0
Hello,

Iv'e come up with the attached but i don't think the solutions from the K map is right. It looks weird. The bottom cells of each k-map have nothing.

File size:
264.2 KB
Views:
32
File size:
265.8 KB
Views:
33
9. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
Your K-map construction is incorrect. The whole concept of the K-map requires that only one input change and you move form one cell to an adjacent cell. This means that the input ordering HAS to be in a Gray code sequence and you have them in a binary sequence.

Dec 2, 2012
89
0
I did one before in grey code and it looked weird as well which is why i tried the binary method. I attach the grey code type i did before.

File size:
265.4 KB
Views:
43
11. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
No matter how weird it might look, you can't just go using a binary encoding on a K-map. It simply will not work. The fact that you were even tempted to try it is a strong indicator that you don't understand what a K-map is or why/how it works.

Why do you have the 11 rows either blank or scribbled out? Each cell is either a 0, a 1, or an X. Blank is not an option.

You also can't group an odd number of cells. Your groupings have to be rectangular with each side being an integer power of two in length. Again, a strong indicator that you don't understand what a K-map is.

Look at your top left K-map. Underneath it you claim that J2=Q0. But your K-map has an entry for Q0=1 in which J2 is 0 (the top right cell). So J2=Q0 clearly is not correct.

Take a step back and go look into what a K-map is and WHY it works; don't just look at the cookbook recipe steps on how to use it.

12. ### tshuck Well-Known Member

Oct 18, 2012
3,531
675
Here is some information I wrote in another post, but it seems relevant here also:
Now, as WBahn said, and I simply want to reiterate/stress this, K-Map states cannot be blank. The output of a flip flop is not blank. The don't care states are eventually broken into either a 1 or 0, depending on whether or not it is grouped in the minimization. Grouping is only valid for 2^n states(where n > 0), this means you can group 1,2,4,8,16, etc. and is only valid for rectangles.

This thread and some others made me realize the counters section of the e-book is lacking, so I wrote an section explaining counters from a design perspective and took on the modulus counter design. I will have it up in a thread for review in the next few days or so...

Dec 2, 2012
89
0
Yes I know I cant group 3 cells. I know its not allowed. I know I can group 1, 2, 4, 6, 8. Im thinking maybe those empty cells are dont cares. You know ive done it before in mu previous assignment. May be I missed something in my lectutre.

14. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
Then why did you do it?

Then why did you do it?

Then why didn't you do it?

"Maybe" they are don't cares?

They either are or they aren't.

Until you are sure which of the three possibilities (0,1,X) each cell is, then there is absolutely no point going on because the validity of any result is entirely dependent on the correctness of the cells in map.

I'm thinking so. If you've been this sloppy in previous assignments and gotten "correct" answers, then either you were lucky or the grader was pretty bad. Actually, even if you got lucky, the grader was still pretty bad to let you get away with it, because it set you up for your current state of confusion.

So go back and for each on of those blank cells, examine what you want that signal to be for that set of input conditions and then make it a 0, a 1, or an X.

Dec 2, 2012
89
0
Thanks very much. I'll go right back to basics.

16. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
Good. Post you work after that and we'll see where it leads. You are pretty close to the answer, so I won't be surprised if your next shot hits the mark fully.

Dec 2, 2012
89
0
Fogive me for my typing error as im using my phone to do them at work.

Dec 2, 2012
89
0
I hope iv'e done them all right.
I worked out out why i was having the empty cells.
And it was because for a modulo 6 counter it toggles to
000 next state after present state 101. So the empty cells on the K-map
become Don't Cares.

Fingers crossed.

Is there any link here for making donations to this website?
Because there are lots of people here all the time trying to help others but i'm sure it costs money to run this site.

File size:
253.6 KB
Views:
31
File size:
278.2 KB
Views:
29
• ###### JK3.jpg
File size:
264.6 KB
Views:
29
Last edited: Mar 9, 2013

Dec 2, 2012
89
0
Thanks very much. I appreciate your guidance. The info you provided has been very useful.

Is there any link here for making donations to this website?
Because there are lots of people here all the time trying to help others but i'm sure it costs money to run this site.

20. ### tshuck Well-Known Member

Oct 18, 2012
3,531
675
Looks like you understand the Karnaugh maps a little better now. I would suggest you learn to check your work. A simulator can help figure out the way your circuit behaves. I find that visualizing the behavior helps with the understanding. LogiSim is a good, easy-to-use simulator designed for digital circuits, and open-source to boot. That way, instead of crossing your fingers, you can know that the circuit works the way you expect it to!

Looking at your circuit, it appears to work and your logic sound. The circuit works in simulation. Good job!