FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
Architecture & Design
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
May 24, 2006
UML Statecharts at $10.99

You don’t need big UML tools to take full advantage of the hierarchical state nesting

(Page 1 of 9)
Miro Samek
UML-style state machines can help you produce efficient, maintainable, testable systems--and you don't need big UML tools to use them.
Miro Samek is the Founder and President of Quantum Leaps, a provider of real-time, state machine-based application frameworks for embedded real-time systems, and author of "Practical Statecharts in C/C++" (CMP Books, 2002).

Too many embedded developers believe that UML is all about using big tools and that the UML concepts, such as the advanced form of state machines (UML statecharts), are too heavy for most embedded designs, let alone small microcontrollers. In this article I describe a method and software for implementing UML statecharts in C, small enough to fit a low-end 8-bit microcontroller. More specifically, I present a nontrivial UML statechart example that runs on the USB Toolstick from Silicon Laboratories with room to spare. The USB Toolstick (Figure 1) is a complete evaluation board for the C8051F300 microcontroller (256 bytes of RAM, 8KB of Flash, 11 pins).

Figure 1: The USB Toolstick from Silicon Labs combines the USB debugger (left part) and the C8051F300 microcontroller (the smaller chip to the right). The "F300" controls the two LEDs at the right edge of the Toolstick (green LED at the top and red LED at the bottom).

The Toolstick is available online from the Silicon Labs web site for just $10.99. Actually, you can even start without the Toolstick, because I provide a Toolstick software emulation that uses the same state machine code, but runs on a Windows PC.

1 Introduction | 2 Why Bother? | 3 Designing a Statechart | 4 The Next Step | 5 Coding a Statechart in C | 6 It's All About Me | 7 Declaring State Machine Objects | 8 Initializing State Machine Objects | 9 Deploying the Application on the Toolstick Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK