Embedded Digital Control with Microcontrollers
by Cem Unsalan, Duygun E. Barkana, H. Deniz Gurhan
3Software to be Used in the Book
We will approach digital control algorithm implementation in three levels as high, middle, and low. Python running on PC will be the medium for high-level implementation. It will allow the reader to implement and test the desired control algorithm offline. Besides, it will help the reader to visualize the system and signal of interest. Hence, they can be analyzed easily. MicroPython (Python for microcontrollers) will be the medium to be used in middle-level implementation. We can think of MicroPython as the intermediate step between PC and STM32 microcontroller implementations. Here, we will benefit from properties of the Python programming language on the microcontroller. However, this implementation will not be optimal in terms of microcontroller resource usage. Therefore, low-level implementation of digital control algorithms will be done by C language on the STM32 microcontroller. To do so, we will benefit from Arm Mbed Studio to program and debug the C code on the microcontroller. Neither MicroPython nor Mbed Studio is specific to the STM32 microcontroller. Hence, the reader can migrate the codes given in this book to another hardware platform that support MicroPython or Mbed Studio. Therefore, the book content has a wide range of implementation options.
In the following sections, we will cover Python, MicroPython, and C-based implementation steps in detail. We expect the reader to master them. Hence, methods introduced in this chapter ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access