State table for a single traffic light using JK-flip flops

Thread Starter

Yoshio

Joined Mar 9, 2016
4
Hey guys, I'm working on a simple project where we have to use JK-flip flops for a single traffic light, that goes from:
Green-Yellow-Red-Red+Yellow...and repeats.
We have been given a guide-line where we have to fill out 6 karnaughdiagrams. The thing I dont understand is how am I supposed to use an 8 states for a single traffic light, I wrote up a 4 state table, where I put in 1 in the lights that are supposed to light up, but apparantly I need to use 8 states. Do I just repeat the 4 first states?

States - Q2Q1Q0 - R Y G
0 --- 0 0 0 --- 0 0 1
1 --- 0 0 1 --- 0 1 0
2 --- 0 1 0 --- 1 0 0
3 --- 0 1 1 --- 1 1 0

Am I completely out in the forest with this logic?
Thanks for the help.
 

WBahn

Joined Mar 31, 2012
25,240
Are the 6 k-maps you are referring to the maps for the J and K inputs to the JKFFs?

If so, how many JKFFs does that imply?

Where are you getting the "8 states" requirement from?
 

WBahn

Joined Mar 31, 2012
25,240
My guess is that they are leading you to a solution where the output of each JKFF exactly matches the on/off state of one of the LEDs.
 

Thread Starter

Yoshio

Joined Mar 9, 2016
4
What role does the present state play, like I just wrote up all the different possibilities in the present state table, and then put in the color changing in the new state table...I'll try googling a little about it.
Thank you for reply
 

WBahn

Joined Mar 31, 2012
25,240
Which lights are on is completely dependent on the present state. If you are in state X the only the brown light is on, while if you are in state Y both the blue and the orange lights are on.
 

Thread Starter

Yoshio

Joined Mar 9, 2016
4
Hmm, alright. So if I assign the green light to q0, yellow to q1, and red to q2. Then the first state where the green light is supposed to be on would be:
q2q1q0
0 0 1
right? What do I put in the new state then, the color that comes after green, or?
 

WBahn

Joined Mar 31, 2012
25,240
Hmm, alright. So if I assign the green light to q0, yellow to q1, and red to q2. Then the first state where the green light is supposed to be on would be:
q2q1q0
0 0 1
right? What do I put in the new state then, the color that comes after green, or?
Well, ask yourself what state it needs to go to after the state in which the green light is on. The color that comes after green (i.e., the state in which only the yellow light is one) would seem to fit the bill.
 
Top