A state machine generates signals for vehicle and pedestrian traffic lights at an intersection of a main street and a side street. A blinking yellow light for the side street is generated in the reset state.
Provide a clock, hook up LEDs and generate a reset signal to reset the intersection to all-red. If your leave the reset signal enabled, a blinking yellow light is shown for the side street.
An additional inverter is required to generate the pedestrian red signals from the green output. Hookup your own LEDs for the signals.
# | Input | Output |
---|---|---|
0 | clock | main street red |
1 | reset | main street yellow |
2 | main street green | |
3 | main street pedestrian green | |
4 | side street red | |
5 | side street yellow | |
6 | side street green | |
7 | side street pedestrian green |