Hades logo    Hades applet banner

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

simple counter

simple counter screenshot

Description

This applet is the first in a series of applets that demonstrate simple finite state-machines (FSM) realized with the Hades interactive state-machine editor, called JavaFSM.

The state machine shown here is a simple counter with seven states, named S0, S1, S2, ..., S6 which correspond to the counter values (zero, one, two, ..., six). Naturally, any number of states could have been chosen instead of seven.

Every state machine realized with the JavaFSM editor includes a clock input and an asynchronous reset input, as well as a default 'state' output. A rising edge of the clock input will trigger a state transition, while a low level on the reset input resets the state machine to its starting state (defined in the machine description). The 'state' output transmits a string value with the name of the current state of the state machine.

Any number of additional inputs and outputs can be defined in the state machine editor. The basic counter shown here has no additional inputs, but uses three outputs called (A2,A1,A0) to transmit the binary encoded counter value. Standard Hades components can be connected to those inputs and outputs.

Note that the graphical symbol for the state machine shows an interactive miniature version of the FSM, highlighting the current state and the currently active transition. Click the 'clock' and 'reset' input switches, or type the 'c' and 'r' bindkeys to control the simulation and watch the counting process.

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.

For detailed documentation of the JavaFSM editor, please visit its home page.

Run the applet | Run the editor (via Webstart)


Impressum | 24.11.06
http://tams.informatik.uni-hamburg.de/applets/hades/webdemos/45-misc/05-fsm-editor/counter_print.html