Iar Visualstate 78K0R - Save It! Sample Project; Hardware Setup; Functionality Of The Sample Project; Table 11: Iar Vs 78K0R - Save It! Sample Project Hardware Setup - NEC 78K0R - Save It! User Manual

Hide thumbs Also See for 78K0R - Save It!:
Table of Contents

Advertisement

78K0R – Save It!
12. IAR visualSTATE 78K0R – Save It! sample project
IAR visualSTATE is a Windows-based software package of integrated tools for developing, testing, and
implementing embedded applications based on state-chart diagrams. It includes a graphical design
environment, test tools, a code generator, and a documentation facility.
IAR visualSTATE has been developed in accordance with the Unified Modeling Language notation (UML).
For more information please refer to the UserGuide.pdf included to the 78K0R –Save It! CD-ROM in the
"\doc\visualSTATE" folder or to the
The in the following described sample project can be found on the 78K0R - Save It! CD-ROM in the
"\samples\IAR visualSTATE sample project" folder.

12.1 Hardware setup

To run the program it is necessary to set up the TK-78K0RKE3L board in the following way.

12.2 Functionality of the sample project

The example implements a reaction timing measurement application that measures your reaction time a
fixed number of times and then displays the average reaction time in hundredths of a second. The
application
works in the following way:
When the application is started it displays two '-' characters on the display and waits for a press on
any of the two buttons.
A timer with a fairly random interval is now started and when the timer times out a '[' or ']' symbol is
displayed on the left or right digit respectively. A new timer is also started for the measurement of
your reaction time.
You should now as fast as possible press the left button if the '[' is shown or the right button if the ']'
is shown. The time for you to react is read from the timer and added to a running sum.
After a button press the process is repeated until 10 trials has been performed. Your average
reaction time is now displayed and you can press a button to get back to the initial state and restart
the measurement if you want to.
The state machine is implemented with 3 input events (button presses and an expired timer) and 10 small C
functions for the interface to the hardware. There are 5 states to keep track of what is currently going on in
the application. This is not the only plausible state machine implementation for this application. An
alternative
could for example be to have separate, parallel and communicating state machines for time measurement
and display updates.
Further details on the sample project can be found in the index.html file available in the 78K0R – Save It!
CD-ROM "\samples\visualSTATE\doc" folder.
_______________________________________________________________________________________________
visualSTATE homepage
Switch / Jumper
SW1
SW2
SW3.1 – SW3.3
SW3.4 – SW3.8
JP1
JP2
Table 11: IAR VS 78K0R – Save It! sample project hardware setup
User's Manual
Mode position
Debug
EXT
ON
Any
Short
1-3 shorted
U19663EE1V0UM00
43

Advertisement

Table of Contents
loading

Table of Contents