Hades logo    Hades applet banner

TAMS / Java / Hades / applets (print version): contents | previous | next

Traffic light controller (4/4, ROM-based)

Traffic light controller (4/4, ROM-based) screenshot


Yet another traffic light controller, realized as a Moore-type state-machine. This time, however, both the next-state encoding as well as the output data are stored in a ROM addressed by the current state (via the flipflop outputs) and three switches that control the traffic light behaviour:

The bindkeys 'b', 'g', and 't' are used for the blink, long-green, and long-red switches, with 'r' and 'c' use for the nreset switch and the clock generator.

Use edit-component command from the popup-menu to open the memory editor and view the ROM contents. Note that both the next-state output (four bits) and the LED output values (three bits) fit into one word of the 1Kx8 bit ROM. Obviously, using a ROM of size 1Kx8 bits is wasteful, a ROM of size 128x8 bit would have been sufficient to store the traffic-light data in this example.

Run the applet | Run the editor (via Webstart)

Impressum | 24.11.06