Journal "Software Engineering"
a journal on theoretical and applied science and technology
ISSN 2220-3397

Issue N7-8 2019 year

DOI: 10.17587/prin.10.311-316
Design and Implementation of Multitasking Embedded Control Systems on Microcontrollers: Operating System or State Machines?
A. A. Skvortsov, skvalexei@mail.ru, Vyatka State University, Kirov, 610000, Russian Federation
Corresponding author: Skvortsov Aleksey A., Associate Professor, Vyatka State University, Kirov, 610000, Russian Federation, E-mail: skvalexei@mail.ru
Received on June 06, 2019
Accepted on June 17, 2019

The article presents a comparison of two ways of designing and implementing multitasking embedded control systems on microcontrollers: using a real-time operating system and using finite state machines. With the growth of computing power of microcontrollers (MC), real-time operating systems are becoming increasingly popular. But the application of real-time OS takes up a substantial part of the program memory of the MC, and the CPU time for task switching. In this regard, the use of real-time OS is justified only in multitasking control systems. However, for such control systems there is an alternative approach that can significantly save MC resources — automata-based programming. The purpose of this study is to choose the method of design and implementation of embedded multitasking control systems on the MC: on the basis of real-time OS or using finite state machines. An example of the development and implementation of a simple multitasking embedded control system consisting of five typical tasks is given: receiving commands from the serial port; displaying symbols on the liquid crystal display; producing sound of a given duration; scanning the keyboard and transmitting the code of the pressed button to the port; led alarm. The efficiency of design and implementation of this multitasking system with the help of real-time OS and with the help of several finite state machines was investigated. The study showed that the use of finite state machines with a small increase in design time significantly reduces the amount of programs memory of MC, the amount of data memory, as well as the implementation time of simple control systems. With a high degree of confidence, we can assume that the presented method of designing and implementing embedded multitasking control systems using finite state machines will be effective for many similar example developments.

Keywords: embedded control system, microcontroller, design, implementation, real-time operating system, automata-based programming, finite state machine, switch-technology
pp. 311–316.
For citation:
Skvortsov A. A. Design and Implementation of Multitasking Embedded Control Systems on Microcontrollers: Operating System or State Machines? Programmnaya Ingeneria, 2019, vol. 10, no. 7—8, pp. 311—316.