Monday, October 21, 2013

Yakindu Statechart Tools Arduino Integration

This blog has been moved: http://scholtyssek.org/blog/2013/10/21/yakindu-statechart-tools-arduino-integration/

The Yakindu Statechart Tools are predestined to describe behaviour for a system and afterwards generate code. The output code could be Java, C or C++. We would like to use the code generator in the context of embedded systems and so we decided to generate code for an Arduino Uno. Therefor we modified our statechart TrafficLight example and implemented some simple glue code to map the hardware timer and the I/O-ports. Furthermore it was necessary to built a hardware controller that represents the traffic light and so we created a simple controller (it's available as eagle plan in the appendix and could easily be reconstructed). The example is directly implemented for the AVR ATMEGA328P-PU processor (this one is on the Arduino Uno). It is possible to use the Arduino library to integrate this system, but we would like to support the whole AVR family and so it was the better way to use the AVR library directly. With this solution the Yakindu SCT could be used on many AVR based processors.