Tecnico Electronico

Páginas: 17 (4011 palabras) Publicado: 16 de octubre de 2012
Statemate®

MicroC Tutorial

Before using the information in this manual, be sure to read the “Notices” section of the Help or the PDF file available from Help > List of Books.

This edition applies to Telelogic Statemate 4.5 and to all subsequent releases and modifications until otherwise indicated in new editions. © Copyright IBM Corporation 1997, 2008. US Government Users RestrictedRights—Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

ii

Contents

Creating a Traffic Light in MicroC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Tutorial Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Exercise 1 -Constructing an Activity Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Draw the Internal Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Name the Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . Drawing Flow Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Labeling and Placing Flow Line Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 10 12 12

Exercise 2 - Defining Textual Elements. . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . 13 Exercise 3 - Defining Design Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Exercise 4 - Constructing Statecharts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Drawing States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Naming States. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Drawing Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Labeling Transitionsand Placing Labels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 25 25 26

Exercise 5 - Constructing a Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Exercise 6 - MicroC Code Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 41 Exercise 7 - Using the Test Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

Statemate

iii

iv

MicroC Tutorial

Creating a Traffic Light in MicroC

This tutorial walks through the process of creating MicroC code using Statemate. The example project is a traffic light with red, yellow, and green indicators. Thedesign is simple so you can fully concentrate on MicroC code generation, rather than on the design problem itself. This tutorial contains the following topics:
Tutorial Setup Exercise 1 - Constructing an Activity Chart Exercise 2 - Defining Textual Elements Exercise 3 - Defining Design Attributes Exercise 4 - Constructing Statecharts Exercise 5 - Constructing a Panel Exercise 6 - MicroC CodeGeneration Exercise 7 - Using the Test Driver

Statemate

1

Creating a Traffic Light in MicroC

Tutorial Setup
Prior to starting the exercises, you must set up your system and create a project within Statemate following these steps: 1. Create a folder/directory called “stm_projects” on your system in which to store your project data. 2. To begin to create a project prior to starting the lab...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Tecnico Electronico
  • tecnico electronico
  • tecnico electronico
  • Técnico Electrónico
  • Tecnico Electronico
  • tecnico en electronica
  • tecnico electronico
  • tecnica electronica

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS