Hades logoHades applet banner
Traffic light controller (1/4)

applet icon

The image above shows a thumbnail of the interactive Java applet embedded into this page. Unfortunately, your browser is not Java-aware or Java is disabled in the browser preferences. To start the applet, please enable Java and reload this page. (You might have to restart the browser.)

Circuit 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.)

Print version | Run this demo in the Hades editor (via Java WebStart)
Usage | FAQ | About | License | Feedback | Tutorial (PDF) | Referenzkarte (PDF, in German)
Impressum http://tams.informatik.uni-hamburg.de/applets/hades/webdemos/18-fsm/10-trafficlight/ampel_41.html