CSC270 Homework #6
The circuit has two inputs, activated by two switches on both sides of the street.
When nobody is around, none of the switches are pressed (and the signals are both zero in value), and the lights cycle through Green, Yellow, and Red, each one staying on for eactly 2 seconds (Green for 2 sec, then yellow for 2 sec, then red for 2 sec, then green for 2 sec again, and so on).
When a pedestrian wants to cross, all she needs to do is to press the button (i.e. set the signal to 1) that is on her side of the street, until the next clock tick (we assume that the pedestrian receives some feedback in the form of a sound so that she knows when the tick has occured.)
At this point the yellow light starts flashing, ON for a second, OFF for a second, and so on. The pedestrian can then start crossing the street, at her own pace.
When she gets to the other side of the street, she presses the switch on that side until the next tick. The result is that the traffic lights start their green/yellow/red cycle again. The cycles starts with yellow ON, to provide a nice transition between the blinking-yellow cycle and the green-yellow-red one.
Show the state diagram for this system.
Show the state table.
Derive the equations for the J-K inputs of the different flip-flops.
Draw the circuits with all the flip-flops, the two input signals, and the logic activating the Green, Yellow and Red lights.
Make sure that your pedestrian can cross the street both ways using your design!