© D. Thiebaut 2003

Design a traffic light sequencer as in the homework except now design the sequence so that the Green light stays on for two periods of the clock, while the Yellow and Red lights for one only period. How many states does this require (and so, how many flip flops)?
You will be using 7474 D-Flip-Flops to implement this sequencer
| Current State |
Green | Yellow | Red |
|---|---|---|---|
| |
|
|
|
| |
|
|
|
| |
|
|
|
| |
|
|
Number of states = N = _______
Number of flip-flops = F =______
Make sure that the following property holds:
2F >= N
| State | QA | QB |
|---|---|---|
| |
|
|
| |
|
|
| |
|
|
| |
|
| Current QA |
Current QB |
Next QA |
Next QB |
Current Green |
Current Yellow |
Current Red |
|---|---|---|---|---|---|---|
| |
|
|
|
|
|
|
| |
|
|
|
|
|
|
| |
|
|
|
|
|
|
| |
|
|
|
|
|
DA = Next QA = ___________________
DB = Next QB = ___________________
G = ______________________
Y = ______________________
R = ______________________
Figure 1. Timing diagram for first sequencer.

Same experiment, but this time add a switch that is normally 0. When it is pressed, though, the sequencer remains stuck in the state that activates the Red light. When the switch is released, the sequencer goes back through its regular cycle. Think about what state each of the flip flops must be in to ensure a 'red' output, and what logic gates you need to add to achieve this.
Your new design might be close enough to the previous one that you might be able to use most of your wiring, so do not remove any wires yet!
Record the state table, circuit diagram (additions), and timing diagram of the variation of the clock signal, Q1, Q2, Green, Yellow, and Red, when the switch is activated (first timing diagram), and when it is not (second timing diagram).
What might this "stuck at red" switch represent for an actual traffic light?
Figure 2. Timing diagram for second sequencer.