When I was recently speaking with my girlfriend she asked me about my job responsibilities as an Embedded Developer.
She wasn’t sure if she understood it well. Embedded programming sometimes is called a low-level one (in Polish it’s niskopoziomowy). Unfortunately.. there’s one similar word to niskopoziomowy, it’s niskopodłogowy (like low-floor, for example a low-floor bus). Just imagine.. she was telling her friends that I’m a low-floor developer! It’s the reason why I’m writing this article - to clarify what an embedded programming is 🙂
Generally speaking - applications may be divided into few groups.
- Desktop ones -that work on personal computers
- Mobile ones - that work on phones and tablets
- Server ones - that people usually use by internet
- Embedded ones - the topic of today’s article 🙂
So, the first question is - why embedded is also called a low-level programming?
Because it interfaces with electronics on the lowest level. Engineers in their application communicate with integrated circuits using interfaces like SPI UART and I2C. If you don’t know what the interfaces are, let’s say they’re like a wired phone where a processor calls peripherals and they execute the processor’s orders.
For example, in the operating system like Windows or Mac you can just ask a computer about current time and it will respond. In the embedded one, you have to configure a clock, give it the frequency and start value. You cannot forget to start timing and at the end to change the number of clock ticks to date and hour. It’s quite a big deal, isn’t it?
Behind all the operating systems stands embedded, but most people simply don’t realize it.
PCBs are usually connected with embedded. They are printed circuit board where all the elements needed by an app are connected. They are also in your computers, however in embedded they are done once. It means that an electronic engineer designed it and this element will be used in all produced devices. In your computers you can choose components processors, power supplies and memory units. In embedded components they are being chosen as the development starts. It must be done right because the PCBs have to be as cheap as possible while a device must perform all the expected and unexpected features.
Modern programming languages like Java, Python or C# are very user-friendly. They have nice features for memory management. You can perform very complicated commands in just one line and use smart features like exceptions. In embedded programming - an exception means hard fault and program crash. Still old languages are used for coding (C and C++). They are the fastest to list here but you have to write more complicated statements on your own. All lists buffers and queues are usually implemented by you. Your program has to be scheduled correctly because the operating system won’t do it for you.
And of course remember about limited resources. You have to fit in!
Have you ever updated a firmware version in your washing machine? Or maybe in a DVD player? I can assume that most of you haven’t. These are examples of an embedded stuff. As you can see, a program prepared for devices must be reliable. Usually bugs cannot be fixed easily. In modern devices with Bluetooth and Wi-Fi it’s easier, however it is said that embedded devices won’t perform a firmware update. It’s not an operating system like Windows, the program must be done right. It’s rather problematic for engineers because your application works with electronic parts. Between hardware and software there’s a place where something may fail and will be extremely hard to find. In the unit tests of code you can encounter problems with how to simulate hardware.
Embedded devices create the smart world that surrounds us.
An app must perform well without any fail. What’s more, it must be smart and user-friendly! The interesting and funny fact is - most people use devices before reading the instruction 🙂 A program has to be prepared in a way that a client, who’s unfamiliar with electronics can use a device with easiness. I hope that this article helped to understand the matter of embedded systems and showed why it’s applications are a little bit different than the others.
Author: Krzysztof Cieniawski