TAMS / Java / Hades / applets: contents | previous | next | ||||
Hades Applets contents visual index introduction std_logic_1164 gatelevel circuits delay models flipflops adders and arithm... counters LFSR and selftest memories programmable logic state-machine editor misc. demos I/O and displays DCF-77 clock relays (switch-le... CMOS circuits (sw... RTLIB logic RTLIB registers Prima processor D*CORE MicroJava Pic16 cosimulation Mips R3000 cosimu... Intel MCS4 (i4004) image processing ... [Sch04] Codeumsetzer [Sch04] Addierer [Sch04] Flipflops [Sch04] Schaltwerke [Sch04] RALU, Min... [Fer05] State-Mac... farm-road tr... 2 Floor Elev... 5 Floor Elev... 5 Floor Elev... [Fer05] PIC16F84/... [Fer05] Miscellan... [Fer05] Femtojava FreeTTS | Animated farm-road traffic light
Circuit Description
This applet demonstrates the farm-road traffic light,
used as an example for state-machine design in many textbooks.
To motivate and illustrate the traffic-light controller design,
the applet contains a special simulation component that visualizes
the traffic on the highway (main road, horizontal) and the
farm-road (vertical).
Use the popup-menu ('edit') on the traffic-light component
to open the window with the traffic visualization.
Press the 'send car' button a few times to trigger the farm-road
contact and watch the behavior of the traffic-light controller.
You can also open the state-machine editor to watch and edit
the controller.
The following image shows a screenshot of the applet with
both the traffic-light animation and the state-machine editor open
at the same time:
"A busy highway is intersected by a little-used farmroad. Detectors are
placed along the farmroad to raise the signal C as long as a vehicle is
waiting to cross the highway. The traffic light controller should operate as
follows. As long as no vehicle is detected on the farmroad, the lights should
remain green in the highway direction. If a vehicle is detected on the
farmroad, the highway lights should change from yellow to red, allowing the
farmroad lights to become green. The farmroad lights stay green only as long
as a vehicle is detected on the farmroad and never longer than a set interval
to allow the traffic to flow along the highway. If these conditions are met,
the farmroad lights change from green to yellow to red, allowing the highway
lights to return to green. Even if vehicles are waiting to cross the higway,
the highway should remain green for a set interval.[From KATZ, Randy H.,
Contemporary Logic Design. University of California, Berkeley. 1994]"
Inputs:
C : detects vehicle on farmroad
ST: Restart Time counter (to TS and TL)
Outputs:
TS : short timer interval has expired (Yellow light)
TL : long timer interval has expired (Green or Red light)
HG, HY, HR : green, yellow, red highway lights
FG, FY, FR : green, yellow, red farmroad lights
Component written by Ulisses Chippe, Giliardo Freitas and
Ricardo Ferreira, DPI, Universidade Federal Vicosa, Brazil, cacau@dpi.ufv.br
Note: the traffic-light shown here generates the light sequence
(green, yellow, red, green) used in Brazil.
Changing the state-machine to the central European
light sequence (green, yellow, red, red+yellow, green)
makes for a good exercise.
You can also try to add extra all-red states (both roads red),
which are used for increased safety.
To edit the state-machine, activate the popup-menu on the FSM symbol and select the edit menu item. This opens the editor window for the FSM, which uses a mode-oriented user-interface.
| |||
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/95-dpi/farmroad/farmroad.html |