Hades logo    Hades applet banner

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

Traffic light controller (1/4)

Traffic light controller (1/4) screenshot

Description

A very simple traffic light controller, realized as a Moore-type state-machine with two flipflops and a few gates. (Click the clock and nreset switches, or type the 'c' and 'r' bindkeys).

The state table looks like follows:

 state     encoding   next state
           z1  z0      z1*  z0*
---------------------------------
 red        0   0        0   1
 red+ylw    0   1        1   0
 green      1   0        1   1 
 yellow     1   1        0   0
This results in the following logic equations:
 z1* = (z1 & |z0) | (!z1 & z0)
 z0* = !z0

 led_red    = !z1
 led_yellow = z0
 led_green  = (z1 & !z0)
(Note that the schematics above uses the (z1 & !z0) AND gates twice for better clarity.)

Run the applet | Run the editor (via Webstart)


Impressum | 24.11.06
http://tams.informatik.uni-hamburg.de/applets/hades/webdemos/18-fsm/10-trafficlight/ampel_41_print.html