Introduction to Embedded System
Contents
What is Embedded System
An Embedded System is mostly a microcontroller-based computer hardware system with software (firmware) and some attached peripherals designed to perform a specific task, either as an independent system or as a part of a larger system.
Block Diagram of a Generic Embedded System.
Embedded System Architecture
1. Sensor:
Sensors helps to measure the physical quantity of the environment and converts it to an electrical signal. It also act as input to the system.
​
2. A-D Converter:
A-D converter (analog-to-digital converter) converts the analog signal signal gotten from sensors to digital signals which is what the processor understands.
​
3. Processor & ASICs:
The Processor and ASICs (Application Specific Integrated Circuit) can be said to be the brain of the system. This component processes the data from the sensor and sends it to the memory for storage.
​
4. Memory:
Memory is used to store unprocessed data and processed information.
​
5. D-A Converter:
D-A converter (digital-to-analog converter) helps to convert digital data from the processor to analog data which is what the actuators work with.
​
6. Actuators:
The actuator is what compares the output given by the D-A converter to the actual expected output stored in it. The actuator lets the user know if a particular condition the system was program to do is satisfied.
Characteristics of an Embedded System
Important characteristics of an embedded system include:
-
Speed (bytes/sec): should have a high speed.
-
Size and Weight: should be small in size and low in weight as far as possible.
-
Power: should consume and dissipate low power.
-
Accuracy (% error): must have high accuracy.
-
Adaptability: must have high adaptability and accessibility.
-
Reliability: must be reliable over a long period of time.
-
Cost: must be low cost.
-
Efficiency: should be highly efficient.
-
Function: must be task specific.
​
According to the points listed above, an embedded system must perform operations at a high speed which makes it suitable for real time applications, must consume very low power, must have high accuracy with minimum error, and the size of the system must be as small as possible. Also, the system must be easily adaptable for different applications.
Classification of Embedded Systems
Embedded Systems can be classified into the following categories based on their functional and performance requirements.
Embedded System
Functional
-
Stand-alone embedded system
-
Realtime embedded system
-
Networked embedded system
-
Mobile embedded system
Performance
-
Small scale embedded system
-
Medium scale embedded system
-
Large scale or Sophisticated E.S
Classification based on functions
1. Stand-alone Embedded Systems:
A stand-alone embedded system works by itself. It is a self-contained device which does not require any host system like a computer. It takes either digital or analog inputs from its input ports, calibrates, converts, processes the data, and outputs the resulting data to its output device, which either displays data or drives the devices they are being attached to.
Example: Temperature measurement systems, MP3 players, Video game consoles, microwave ovens etc.
2. Real-time embedded systems:
A Real-time embedded system gives the required output in a specified time, i.e in addition to its functional correctness, it also satisfies the time constraints.
​
There are two types of Real-time systems:
- Soft real-time system
- Hard real-time system
-
Soft Real-time System:
This is a real-time system in which the violation of time constraints will cause only the degraded quality, but does not stop the system from operating. In soft real-time systems, the design focuses in delivering guaranteed bandwidth to each real-time task and distribution of resources to tasks.
Example: washing machine, microwave oven, TV remote etc.
-
Hard Real-time system:
This is a real-time system in which the violation of time constraint will cause critical failure, property damage, or even loss of life. These systems usually interact directly with physical hardware instead of through human beings. The hardware and software of hard real-time systems must permit a worst-case execution (WCET) analysis that guarantees the execution be completed within a strict deadline. The chip and real-time operating system (RTOS) selection become important factors for hard real-time system design.
3. Networked embedded systems:
The networked embedded systems are connected to a network with network interfaces to access the resources. The connected network can be a Local Area Network (LAN) or a Wide Area Network (LAN), or the Internet. The connection can either be wired or wireless. The networked embedded system is the fastest growing area in embedded systems applications known today as the Internet of Things (IoT). The IoT is such a system were all embedded devices are connected to a web server and can be accessed and controlled by any web browser.
Example: A home security system is an example of a LAN networked embedded system where all sensors (e.g. light sensors,motion detectors, smoke sensors etc.) are wired and run on the TCP/IP protocol.
4. Mobile Embedded systems:
The portable embedded devices like mobile and cellular phones, digital cameras, MP3 players, Personal Digital Assistants (PDA) are examples of mobile embedded systems. The basic limitation of these devices is the limitation of memory and other resources.
Based on their microcontroller performance, they are also classified into:
- Small scale embedded system
- Medium scale embedded system
- Large scale embedded system
Classification based on performance
1. Small Scale Embedded Systems:
These systems are designed with a single 8-bit or 16-bit microcontroller; they have little complexities and involves board-level design. They may even be operated on battery. During the development of embedded software for these class of system, an editor, assembler and cross assembler specific to the microcontroller or processor used are the main programming tools. Usually, C is used for developing the software for these systems. The C program is then compiled into Assembly and appropriately located in the system memory.
2. Medium Scale Embedded Systems:
These systems are usually designed with a single or few 16-bit or 32-bit microcontrollers or Digital Signal Processors (DSPs) or Reduced Instruction Set Computers (RISCs). These systems have both hardware and software complexities. For complex software design, the following programming tools are used: Real Time Operating Systems (RTOS), Source code engineering tool, Simulators, Debugger and Integrated Development Environment (IDE). For these systems, an assembler is of little use as a programming tool. These systems may also employ the readily available Application Specific System Processors (ASSPs) and IPs (explained later) for the various functions; for example, for bus interfacing, encrypting, deciphering, discrete cosine transformation and inverse transformation, TCP/IP protocol stacking and network connecting functions.
3. Large Scale or Sophisticated Embedded Systems:
Sophisticated embedded systems have enormous hardware and software complexities and may need scalable processors or configurable processors and programmable logic arrays. They are used for cutting edge applications that need hardware and software co-design and integration in the final system; however, they are constrained by the processing speed available in their hardware units and certain software functions are implemented in the hardware to obtain additional speeds by saving time. Development tools for these systems may not be readily available at a reasonable cost or may not be available at all. In some cases, a compiler or retargetable compiler might have to be developed for these systems.
Advantages and Disadvantages
Advantages of Embedded System
1. It is used specially to perform specific task.
2. Embedded Systems are small in size and has fast response time.
3. It is easy to manage.
4. Low cost.
5. Requires few resources to operate.
​
Disadvantages of Embedded System
1. Difficult to upgrade.
2. Limited hardware to suit specific tasks.
3. Difficult to troubleshoot.
4. Transfer of data from one system to another is difficult.
5. Less power durability in battery operated devices.
Host and Target machine
Introduction
Because of the unique characteristics each embedded system has, the components and functions of the hardware and software can be different from each system. The embedded software used in these systems are similar to general programming but the embedded hardware is unique. The method of communication between interfaces can vary from processor to processor which leads to complexity in software. Engineers need to be aware of the developing process and tools.
Host machine (PC) connected to a Target machine (Arduino board) through a USB cable
Host machine
The application program developed runs on the host computer. The host computer is also known as Development Platform. It is a general-purpose computer that has a higher processing capability and more memory. It has different inputs and output devices. The compiler, linker, and locator run on a host computer rather than on the embedded system itself. Once a program has been written, compiled, assembled and linked, it is moved to the target platform.
Target machine
The target hardware platform is used to execute the output binary image (the compiled program). It consists of two entities: the target hardware (processor) and runtime environment (OS). It is needed only for final output.
-
Target system differs from a final system. The target system is used to test if everything is working perfectly before committing to the final system.
-
Target system interfaces with the computer as well as a standalone system.
-
In target system, codes might be repeatedly downloaded during the development phase.
-
If everything works fine on the target system, the designer copies it into final system or product.
-
Final system may employ ROM in place of flash, EEPROM or EPROM in embedded system.
Example of some Target machines:
-
Arduino development boards.
-
Raspberry Pi development boards.
-
MSP 430 development boards.
-
Phillips LPC21xx development boards etc.
Arduino Uno R3 board
Raspberry Pi4
Program Development Tool Kit or IDE
​
-
Integrated Development Environment (IDE) consists of an editor used for writing C codes, Assembly mnemonics, C++, Java or Visual C++ using the host machine (PC).
-
It uses Graphical User Interfaces (GUIs) to allow the entry, addition, deletion, insertion, appending previous lines or files, merging record and files at the specific positions etc.
-
Also consists of different programing tools such as compiler, cross compiler, assemblers etc.
Examples: Arduino IDE, keil uVision, Flash Magic, etc.
Embedded System Application
Embedded systems used in various applications are listed in the table below. It shows that embedded systems have rapidly emerged as important computing discipline because of the technology convergence in computers, consumer electronics, communications, entertainment etc.