Embedded Systems are everywhere but what are the components of embedded systems?. Embedded systems are amazing if we are into programming and making circuits, boards and robots.
The embedded system’s components are basically divided into two parts:
As we know embedded systems are the combination of hardware and software. There are different hardware components like power supply, processor, memory, timers and counters that make the embedded hardware.
The power supply is an essential part of any embedded systems circuits. An embedded system may need a supply of 5 volts or if it is low power then maybe 3.3 or 1.8v. The supply may be provided with the help of battery or we can use any wall adapter. It will depend on the application need.
The power supply circuit can be designed with the help some little knowledge of electronics. For that, we need a bridge rectifier circuit, capacitor as a filter and a voltage regulator that provides constant output supply.
You may find a different circuit on the internet or you may try below circuit.
It is a very common circuit that produces 5 Volt at the output. You can change the voltage regulator to 7808,7812 depending upon the output required.
A processor is the main brain inside any embedded systems. This is a major factor that affects the performance of the system. There are different processors available in the market. An embedded system may use microprocessor or microcontroller.
The processor comes in different architecture like 8-bit, 16-bit and 32-bit. The 8-bit processor is generally used in a small application where we need some basic computation like input and output no heavy processing.
For higher-end application where performance matters and need some graphical user interface, we use 16 or 32-bit processor.
If we are using a microcontroller like AT89s51, AT89s52 or ATmega. The memory is available on-chip. We generally talk about two types of memory in the embedded systems
RAM memory is volatile memory and used for temporary storage of the data. And the selection of it depends on the user need and the application.
The ROM memory or Code Memory. This is used for the storage of the program. Once system powered, the system fetches the code from the ROM memory.
The EEPROM is a unique memory. The content can be erased and reprogrammed by a high voltage pulse input. This is used to store the data by the program itself. Suppose we have a temperature data logger. And it needs to store the data every one hour. It means we need the data at runtime after the system is started.
The system will read temperature and store in the EEPROM memory. And it will be permanent. And you can retrieve the data later.
So an embedded system developer decide which memory to use for its application.
If you are working in embedded systems you must have heard about
In some application, we need to generate some delay. Like for blinking an LED, we need a delay. For making square pulse we need a delay.
But there is some issue when we generate the delay from the normal coding style by making any loop running for a particular time. Definitely, this will give you some delay but the code after this loop remains in waiting for state and delayed.
So it is not the best approach to generate the delay. For such kind of application where we need a delay for a specific time interval without affecting the normal code execution, we use timer and counter.
By setting some register for timer and counter using the programming we get the desired delay. The amount of delay depends on the system frequency and crystal oscillator.
Embedded systems hardware has different types of communication ports to communicate with the other embedded devices.
But for a small level of embedded systems microcontroller has on-chip communication ports.
For example, popular Arduino UNO board has ATmega328 IC and it has following communication port:
For sending data from one board to other we can use these serial protocols. But for that, we need to program it.
To interact with the embedded systems we need input. The input may be provided by the user or by some sensor. Sometimes some systems need more input or output. So the processor selection will be based on I/O.
These input and output are generally divided into ports like P0, P1, P2 and P3 in 8051microcontrollersr. And PA, PB, PC and PD in ATmega series of the microcontroller.
The I/O need to be configured for input or output based on the provided register. And for that, we need to refer the datasheet of the manufacturer.
Some hardware components are common while designing the embedded systems. But some are different and depends on the application need. Like a temperature sensor need a temperature sensor for sensing the temperature. While others hand an alcohol detector has a sensor to detect the alcohol level.
But the remaining hardware components might be the same like
Once the hardware is completed we need to build the software for the embedded devices. There are different software tools for programming and coding. These software tools are referred to as software components.
We need a program written in assembly or in embedded c language. And then we compile it. This compiled code converted into HEX code. This hex code is programmed or burned into the ROM of the system using some programmer.
These are the tools that are generally used in embedded system development
When you program in assembly language. This assembly language program is converted into the HEX code using this utility. Then using some hardware called as a programmer we write the chip.
An emulator is hardware or software tool that has a similar functionality to the target system or guest system. It enables the host system to execute the functionality and other components. It is a replica of the target system. And used for debugging the code and issues.
Once program or code is fixed at the host system. It is transferred to the target system.
Sometimes we are not getting expected results or output due to errors or bug. There are certain tools that are specifically used for the debugging process. Where we can see the controls flow and register value to identify the issue.
A compiler is a software tool that converts one programming language into target code that a machine can understand. The compiler basically used for translating the high-level language into the low-level language like machine code, assembly language or object code.