IAR Information Center for Visual State

Example projects

Getting started

Getting started

User guides

User guides

Example projects

Example projects

Resources

Resources

Tutorials

Tutorials

Support

Support

Release notes

Release notes

My pages

My pages

Example projects

The IAR Visual State product package comes with a number of different example designs and sample applications, as well as reusable code examples for things like events queues and using the IAR Visual State API. This page provides a brief overview and description of each example as well as pointers to example-specific documentation. The examples are divided into these sections:

A CD player example

This is an example model showing a simplified CD player. The example is available in two versions:
  1. A simplified model with several C and C++ implementation projects for different implementation environments. The implementations share code as far as possible with only small target-specific adaptations.
    • Open a copy of the workspace in the IAR Visual State Navigator.
    • Browse the files on disk.
    • The documentation includes a simple 4-step procedure on how to get up and running with the example. Additional steps show how you can make changes to the model logic and immediately test them.
    The following environments are available:
    • Several IAR Embedded Workbench projects for different architectures, including ARM, AVR, MSP430, AVR32, and STM8.
    • A Cygwin/gcc based console project that plays your CD's on your PC's CD drive.
    • A Microsoft Visual Studio console project that plays your CD's on your PC's CD drive.
    • A Microsoft Visual Studio GUI project that plays your CD's on your PC's CD drive.
  2. A slightly more complex CD player model.
    • Open a copy of the workspace in the IAR Visual State Navigator.
    • Browse the files on disk.
    • There are also example source files in the hardware-independent example code section showing how to turn this model into a running application.

A CD player example with Altia Design prototyping support

This is the same example as the second example above, but it is augmented with a prototype 'front panel' that emulates the user interface of a car CD player that can be manipulated on-screen to exercise the state machine model, including graphically inserting and ejecting the compact disc! The front panel is created with Altia Design. Such a front panel design can optionally be code generated for virtually any LCD based embedded system. The example uses a free Altia run-time engine that lets you run the example, but not modify the front panel design. If you want to try the full Altia tool suit, you can visit Altia's web site to get your own evaluation version of the toolset.

A mobile phone call control design

This example is a very simplified handset design that shows how call control can be implemented as a graphical state machine.

Hardware-independent example code

This is a collection of more or less hardware-independent source files and sample models.