Let’s dive a little deeper into the components that make up an embedded system. The Introduction To Embedded Systems post gave a broad definition of an embedded system, along with some real-world examples. All embedded systems have hardware components and firmware. Rarely, for larger embedded systems, there may also be a software component. While technically firmware is software, for this post and the posts on this site, we will distinguish between firmware and software.
The CPU or micro-controller in any embedded system provides the foundation for the entire design. The selection must satisfy all the design requirements listed in the Introduction. There are literally thousands of options for CPUs. Designers typically pay close attention to new offerings from chip manufacturers.
The application may require additional peripherals beyond the CPU. The designer will select other devices that fit within the overall design plan and support communications compatible with the CPU. Instruments exist to measure or sense almost anything. It is up to the designer to identify the right device and create the circuit for their application.
Firmware is a hardware-specific program that is closely coupled to the hardware and essential for proper operation of the system. It is stored on the hardware portion of the system and is loaded when the system is powered on. The firmware programs must be compiled (translated) into chip level instructions (machine code) that is specific to the hardware platform. Because we are talking about compact systems optimized for a specific application, the firmware typically only contains the logic required to complete the required task. Optimizing the firmware to the minimum required functionality can pay dividends by minimizing the memory used.
As I mentioned above, the firmware is software designed specifically to manipulate the hardware of the embedded system. For most embedded systems, the firmware is the only software. A few larger embedded systems use general-purpose programs to complete their task. Obviously, any program that runs on a CPU or micro-controller must run in chip-specific instructions at its base level. On this site, we will differentiate Software as a program written without platform-specific hardware knowledge.
Putting It All Together
Now that we understand each of the components of an embedded system let’s look at how they fit together. The diagram below shows a pictorial representation of all these pieces and how they fit together. The hardware provides the foundation, the firmware acts as an interface to the hardware, and software sits on top of the firmware.