In: Electrical Engineering
Design an Moore FSM for an 8-interval stoplight system where the red light is ON (yellow and green lights are OFF) for 4 intervals, then yellow light is ON (red and green lights are OFF) for 1 interval and then green light is ON (red and yellow lights are OFF) for 3 intervals. After the green light has been ON for three intervals, we go back to the red light being ON for 4 intervals. Use binary encoding for states and use JK FFs for storing the state. You have report the state machine (using 8 states), state table, Boolean expression and a gate-level diagram (FFs + combinational logic).
Using binary state encoding,
S0 = Q2Q1Q0 = 000
S1 = 001
S2 = 010
S3 = 011
S4 = 100
S5 = 101
S6 = 110
S7 = 111
Moore State diagram is shown below:

Excitation Table of JK Flip Flop
| 
 PRESENT STATE Q  | 
 NEXT STATE Q+  | 
 J  | 
 K  | 
| 
 0  | 
 0  | 
 0  | 
 X  | 
| 
 0  | 
 1  | 
 1  | 
 X  | 
| 
 1  | 
 0  | 
 X  | 
 1  | 
| 
 1  | 
 1  | 
 X  | 
 0  | 
State Table
| 
 PRESENT STATE  | 
 NEXT STATE  | 
 OUTPUT  | 
 JK EXCITATION INPUT  | 
|||||||||||
| 
 Q2  | 
 Q1  | 
 Q0  | 
 Q2+  | 
 Q1+  | 
 Q0+  | 
 RED  | 
 YELLOW  | 
 GREEN  | 
 J2  | 
 K2  | 
 J1  | 
 K1  | 
 J0  | 
 K0  | 
| 
 0  | 
 0  | 
 0  | 
 0  | 
 0  | 
 1  | 
 1  | 
 0  | 
 0  | 
 0  | 
 X  | 
 0  | 
 X  | 
 1  | 
 X  | 
| 
 0  | 
 0  | 
 1  | 
 0  | 
 1  | 
 0  | 
 1  | 
 0  | 
 0  | 
 0  | 
 X  | 
 1  | 
 X  | 
 X  | 
 1  | 
| 
 0  | 
 1  | 
 0  | 
 0  | 
 1  | 
 1  | 
 1  | 
 0  | 
 0  | 
 0  | 
 X  | 
 X  | 
 0  | 
 1  | 
 X  | 
| 
 0  | 
 1  | 
 1  | 
 1  | 
 0  | 
 0  | 
 1  | 
 0  | 
 0  | 
 1  | 
 X  | 
 X  | 
 1  | 
 X  | 
 1  | 
| 
 1  | 
 0  | 
 0  | 
 1  | 
 0  | 
 1  | 
 0  | 
 1  | 
 0  | 
 X  | 
 0  | 
 0  | 
 X  | 
 1  | 
 X  | 
| 
 1  | 
 0  | 
 1  | 
 1  | 
 1  | 
 0  | 
 0  | 
 0  | 
 1  | 
 X  | 
 0  | 
 1  | 
 X  | 
 X  | 
 1  | 
| 
 1  | 
 1  | 
 0  | 
 1  | 
 1  | 
 1  | 
 0  | 
 0  | 
 1  | 
 X  | 
 0  | 
 X  | 
 0  | 
 1  | 
 X  | 
| 
 1  | 
 1  | 
 1  | 
 0  | 
 0  | 
 0  | 
 0  | 
 0  | 
 1  | 
 X  | 
 1  | 
 X  | 
 1  | 
 X  | 
 1  | 
K Map technique to derive next state boolean expression

Circuit
