0% found this document useful (0 votes)
308 views19 pages

Embedded Systems

An embedded system is a combination of computer hardware and software designed to perform a dedicated function within a larger mechanical or electrical system. Embedded systems can range from simple to complex. They are designed to perform real-time monitoring and control of devices and processes. Common examples of embedded systems include fire alarms, microwave ovens, and automotive cruise control systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
308 views19 pages

Embedded Systems

An embedded system is a combination of computer hardware and software designed to perform a dedicated function within a larger mechanical or electrical system. Embedded systems can range from simple to complex. They are designed to perform real-time monitoring and control of devices and processes. Common examples of embedded systems include fire alarms, microwave ovens, and automotive cruise control systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

What is an Embedded System?

Embedded System is a combination of computer software and hardware which is either fixed in
capability or programmable. An embedded system can be either an independent system, or it can
be a part of a large system. It is mostly designed for a specific function or functions within a
larger system. For example, a fire alarm is a common example of an embedded system which can
sense only smoke.

History of Embedded system


Here, are important milestones from the history of embedded system:

 In 1960, embdded system was first used for developing Apollo Guidance
System by Charles Stark Draper at MIT.
 In 1965, Autonetics, developed the D-17B, the computer used in the
Minuteman missile guidance system.
 In 1968, the first embedded system for a vehicle was released.
 Texas Instruments developed the first microcontroller in 1971.
 In 1987, the first embedded OS, VxWorks, was released by Wind River.
 Microsoft’s Windows embedded CE in 1996.
 By the late 1990s, the first embedded Linux system appeared.
 The embedded market reach $140 billion in 2013.
 Analysts are projecting an Embedded market larger than $40 billion by 2030.

Characteristics of an Embedded System

Performs specific Function


All embedded systems are designed to execute a specific function repeatedly. For
example, if you consider a washing machine, its function is only to wash clothes.
Washing is its dedicated functionality and it cannot be used for any other purposes
like cooling or heating.

Similarly, an ATM machine is used to withdraw money and do transactions but it


cannot be used for controlling room temperature. Similarly, pagers, microwave oven,
automotive cruise control systems, modems are some of the applications which
perform specific functions.

Tightly Constraint system

Whatever system is being designed, they have certain constraints. In the same way, an
embedded system has several constraints like product cost, performance, size and
power. In fact, these four parameters decide the success of any embedded System.

Consider an example of buying a mobile phone. If the mobile phone costs in lakhs,
would you buy it? No, instead you look for different options for low-budget phones.

If it takes half an hour for making a call and if it also hangs frequently, would you opt
it? No Way, the frustration level will rise if the phone hangs continuously.

What would you do, if the phone is weighing 3 kilograms, will you prefer it? No, you
always prefer less-weight products. The mobile phone should also be capable of
retaining the charge for some reasonable amount of time. Else the battery will drain
faster and you have to keep the charger handy all the time.

What does it mean? The cost of the product, its performance, size and power always
matter the most while designing an embedded system.

Real Time and Reactive behavior

A real-time system is a system intended to serve real-time applications which process


the data as it comes in, typically without any buffering delays. If there occurs any
delay in responding, then the result might be dangerous.

Let us take an example of a person traveling in a car. Unfortunately, a lorry seems to


be coming opposite to the car. What would the driver do?

The driver would apply the brake. Immediately after applying the brake, the car
should stop without delay. This is a real-time and reactive behavior of the system. The
brake may be applied at any point in time. So, when an embedded system is operating
in real-time, it must be in a situation to respond to its input without any delay in
execution.

An automotive cruise control system, flight landing gear control, ECG machine
output, GPS tracking device are some of the examples of real-time embedded systems.

Perform Complex function

The processor inside the embedded system should perform operations that are
complex in nature. Let us consider an example of a washing machine. It is used to
wash clothes at different temperatures and at different timings. It is also used to dry
the clothes, drain the water in tub, clean the tub, etc.

To perform these functions, it needs a lot of complex algorithms. Many embedded


systems are distributed into smaller units to perform complex functions.

Minimal user Interface

Generally, embedded systems have a simple user interface, an interesting


characteristics of embedded systems. In older days, mobile phones with keypads are
available in the market. But look at the phone available in our hands now. Todays’
phone has become smarter with the least interfaces.

So designing a system with an easier and comfortable interface is most important. At the
same time, it should have options required for the operation of the device.

A fully automatic washing machine works on its own, which has a minimal user
interface. In other examples like ATM machines, microwave ovens, etc you can look at
the compact interface provided for the user for its operation.

Operates in Harsh environment

The embedded system is designed to operate in different environments where humans


cannot enter, whether it is a cold or hot condition. Whatever may be the condition, the
systems designed to work in that condition should withstand that environment.

The designers should always remember the operating environment while designing an
embedded system. For example, if a system is designed to operate in a rainy condition,
then there should not be any compromise for the formation of corrosion in the system.
Some environments may have vibrations, shock, power fluctuations, etc. These factors
are to be considered while designing an embedded system for that condition.

Requires less power


For most embedded systems, power management is one of the critical factors in its
design. The design should be in such a way that the heat dissipation should be minimized.
If not, we have to install cooling equipment to reduce the heat produced. But that will
lead to a bulky product.

Also, embedded systems like digital cameras, digital watches, space rovers operate
independently. These systems are operated with a battery mounted inside the system.
Hence choosing the low-power components with power-saving modes is important while
designing a system.

Following are important characteristics of an embedded system:

 Requires real time performance


 It should have high availability and reliability.
 Developed around a real-time operating system
 Usually, have easy and a diskless operation, ROM boot
 Designed for one specific task
 It must be connected with peripherals to connect input and output devices.
 Offers high reliability and stability
 Needed minimal user interface
 Limited memory, low cost, fewer power consumptions
 It does not need any secondary memory  in computer.

Important terminologies used in embedded system


Now in this Embedded Systems tutorial, we will cover some important terms used in
embedded system.

Reliability:
This measure of the survival probability of the system when the function is critical
during the run time.

Fault-Tolerance:
Fault-Tolerance is the capability of a computer system to survive in the presence of
faults.

Real-Time:
Embedded system must meet various timing and other constraints. They are imposed
on it by the real-time natural behavior of the external world.

For example, an airforce department which keeps track of incoming missile attacks
must precisely calculate and plan their counter-attack due to hard real-time deadline.
Otherwise, it’ll get destroyed.

Flexibility:
It’s building systems with built-in debugging opportunities which allows remote
maintenance.

For example, you are building a spacecraft which will land on another planter to
collect various types of data and send collected detail back to us. If this spacecraft
went insane and lost the control, we should be able to make some important
diagnostic. So, flexibility is vital while designing an embedded systems.

Portability:
Portability is a measure of the ease of using the same embedded software in various
environments. It requires generalized abstractions between the application program
logic itself and the low-level system interfaces.

Microcontroller
A microcontroller is a single-chip VLSI unit which is also called
microcomputer. It contains all the memory and I/O interfaces needed, whereas a
general-purpose microprocessor needs additional chips to offered by these necessary
functions. Microcontrollers are widely used in embedded systems for real-time control
applications.
Microprocessor
A microprocessor is a single chip semiconductor device. Its CPU contains a program
counter, an ALU a stack pointer, working register, a clock timing circuit. It also
includes ROM and RAM, memory decoder, and many serial and parallel ports.

Classification of Embedded System


Embedded systems are classified based on different criteria like complexities, performance
behavior, deterministic behavior, etc.

Based on Generation
The classification of embedded systems is based on the generation in which they are evolved
from its initial version to the latest version.
First Generation
The earlier first-generation embedded systems were built around 8-bit microprocessors and 4-bit
microcontrollers. Such embedded system possess simple hardware and firmware developed
using assembly code.
Digital telephone keypads, stepper motor control units are examples of the first-generation
embedded system.
Second Generation
After the evolution of the second generation embedded systems, the 8-bit processor and 4-bit
controllers are replaced by 16-bit microprocessors and 8-bit microcontrollers. They are more
powerful and complex compared to previous generation processors.
Data acquisition systems, SCADA systems are examples of second-generation embedded
systems.
Third Generation
During this period, domain-specific processors/controllers like Digital Signal Processors (DSP),
Application-Specific Integrated Circuits (ASICs) and the concept of instruction pipelining,
embedded real-time operating system evolved into the embedded system industry.
The embedded system of this period has powerful 32-bit microprocessors and 16-bit
microcontrollers. Hence, its operation has become much more powerful and complex than the
second generation.
Robotics, industrial process control, embedded networking are examples of the third-generation
embedded system.
Fourth Generation
The recent development of microprocessors and microcontrollers has evolved during these
modern days. New concepts like System-on-Chip(SOC), reconfigurable processors, multicore
processors, coprocessors also emerged into the embedded market to add more powerful
performance in the embedded system.
These systems also make use of the high-performance real-time operating system for their
operation. Smart devices, digital cameras, etc are examples of fourth-generation embedded
systems.
Architecture of the Embedded System

1) Sensor:
Sensor helps you to measures the physical quantity and converts it to an electrical signal. It also
stores the measured quantity to the memory. This signal can be ready by an observer or by any
electronic instrument such as A2D converter.
2) A-D Converter:A-D converter (analog-to-digital converter) allows you to convert an analog
signal sent by the sensor into a digital signal.
3) Memory:
Memory is used to store information. Embedded System majorly contains two memory cells 1)
Volatile 2) Non volatile memory.
4) Processor & ASICs:
This component processes the data to measure the output and store it to the memory.
5) D-A Converter:
D-A converter (A digital-to-analog converter) helps you to convert the digital data fed by the
processor to analog data.
6) Actuator:
An actuator allows you to compare the output given by the D-A converter to the actual output
stored in it and stores the approved output in the memory.

Classification of Embedded System


Based on complexity
The embedded systems are classified into three types based on the complexity of the systems.

Small Scale Embedded Systems


Small Scale Embedded Systems are built with a single 8 or 16-bit microprocessor or controller.
The main programming tools used are an editor, assembler, cross assembler and integrated
development environment (IDE).
The hardware and software complexities in small-scale embedded system are very low. It may or
may not contain an operating system for its functioning. An electronic toy is an example for a
small-scale embedded system.
Medium Scale Embedded Systems
The Embedded system with medium performance 16-bit or 32-bit microprocessor or controller,
ASICs or DSPs fall under the medium scale embedded systems. They have both hardware and
software complexities. The main programming tools used are C, C++, JAVA, Visual C++,
RTOS, debugger, source code engineering tool, simulator and IDE.
Large scale Embedded Systems
The embedded systems have highly complex hardware and software, built around 32-bit or 64-
bit processors/controllers, RISC processors, SoC, scalable and configurable processors. They are
also called sophisticated embedded systems.
They are used for cutting-edge applications that need hardware and software Co-design, where
components have to be assembled into the final system. They also contain a high-performance
real-time operating system for task scheduling, prioritization and management.
Based on performance and functional requirements
This classification of embedded systems is based on performance and functional requirements.
Under this classification, there are four types of embedded systems.

Standalone Embedded Systems


Standalone embedded systems are independent systems that do not depend on other systems.
They work by themselves. It takes the input either in analog or digital form, processes and
produces the output. It may either control or drive the connected devices.
Examples of stand-alone embedded systems are mp3 players, digital cameras, video game
consoles, microwave ovens and temperature measurement systems.
Real Time Embedded Systems
A real-time embedded system is a system that gives a required output within a specified time.
These systems follow the time deadlines for the completion of a task. Real-time embedded
systems are classified into two types such as soft real-time embedded systems and hard real-time
embedded systems. Automotive airbag control systems, flight control systems are examples of
real-time embedded systems.
Networked Embedded Systems
These types of embedded systems are related to a network to access the resources from one
place. The connected network can be LAN, WAN or the internet. The connection can be either
wired or wireless. It is also the fastest growing area in embedded system applications.
For example, the embedded web server is a type of system wherein all embedded devices are
connected to a web server, accessed and controlled by a web browser. Home security system,
ATM machines, card swipe machines are examples of networked embedded systems.

Mobile Embedded Systems


Mobile embedded systems are compact, easy to use and require fewer resources. They are used
in portable embedded devices like mobile phones, digital cameras, mp3 players and personal
digital assistants, etc.
Based on deterministic behavior
The embedded system under this classification is based on the deterministic behavior of an
embedded system. Based on this execution behavior, the embedded systems are classified into
hard real-time systems and soft real-time systems.
Hard Real time system
A real-time operating system should strictly adhere to the timing constraints for a task. A hard
real-time system must meet the timing deadlines without any delay. Missing the deadline would
cause serious failure to the system or user.
The airbag control system and antilock braking system of vehicles are typical examples for hard
real-time systems. When a vehicle is met with an accident, the airbag control system should
operate immediately without any delay to safeguard the passenger. If there is any delay in the
deployment of airbags, it will lead to the death of passengers in the vehicle.
So for a hard real-time system, “A late answer is always a wrong answer”.
Soft Real time system
In these types of embedded systems deadline is not strictly followed. Missing deadlines for tasks
are acceptable for soft real-time systems, but the frequency of deadlines missing should be
within the compliance limit.
ATM is a typical example of a soft real-time system. While withdrawing money from ATM, if it
takes a few seconds more than the normal operating time, it may not cause any serious problem.
In this case, “a late answer is an acceptable answer”, but it could have been done a bit faster.
Based on triggering
The embedded systems are classified into two types based on the triggering of the systems: time-
triggered and event-triggered. If a system is activated or triggered based on the pre-defined task
or preset time, then such a system is said to be the time-triggered embedded system.
On the other side, if the system is triggered based on some activity like change in temperature or
change in pressure, such system is said to be an event triggered embedded system.

Difference between Microprocessor and Microcontroller


Microprocessor Microcontroller
It uses functional blocks like register, ALU, It uses functional blocks of microprocessors like RAM,
timing, and control units. timer, parallels I/O, ADC, and DAC.
In Microprocessor, bit handling instruction is Microcontroller offers many kinds of bit handling
less, One or two types only. instruction.
Offers rapid movements of code and data Offers rapid movements of code and data in the
between external memory and microprocessor. microcontroller.
Helps you to design general purpose digital Helps you to design application-specific dedicated
computers system. systems.
It allows you to do multitasking at a time. It is a single task oriented system.
In Microcontroller system, the fixed number for
In Microprocessor system, you can decide the
memory or I/O makes a microcontroller ideal to
number of memory or I/O ports needed.
complete the specific task.
Offers support for external memory and I/O
This type of system is lightweight and cheaper
ports, which makes it heavier and costlier
compares to the microprocessor.
system.
External devices need more space, and their This type of system consumes less amount of space,
power consumption is quite higher. and power consumption is also very low.

Applications of Embedded Systems


Following are the important applications of Embedded system:

Robotic science
Ground Vehicles
Drones
Underwater Vehicles
Industrial Robots

Medical
Dialysis Machine
Infusion Pumps
Cardiac Monitor
Prosthetic Device

Automotive
Engine Control
Ignition System
Brake System

Networking
Router
Hubs/Switch
Access point
IOT

Home Devices
TVs
Digital Alarm
Air Conditioner
DVD Video Player
Cameras

Automobiles
Fuel Injection
Lighting System
Door Locks
Air Bags
Windows
Parking Assistant System
Anti-stealing Alarms Whippers Motion

Industrial Control
Robotics
Control System
Missiles
Nuclear Reactors
Space Stations

Components of embedded system


The main components of an embedded system are hardware and software.

Hardware Components

There are different type of hardware used in embedded systems.

Processor:

The processor is of two types. One is a microprocessor and the other is a microcontroller. The
microprocessor is used for processing larger tasks while the microcontroller is commonly used
for some specific smaller tasks. Processors may be 8 bit, 16 bit, 32 bit and 64 bit. Most of the
time 8 bit or 16-bit processors are used in embedded systems. But for large embedded systems
32 bit or 64-bit processors are also used.

Power supply:

The power supply is to provide electricity to the embedded system. The power supply can be
provided in the form of a battery or wall adapter. The voltage of the power supply range from 1.8
volts to 5 volts.

Timers/counters:
In programming, we often use a timer or delay to wait for some code to run or for any event to
generate. But in programming timers is overhead and consumes computing power. So we need
separate timers/counters unit which helps the embedded system to perform work at a specific
interval. The timers can be used in the washing machine, oven etc.

Input and output:

Any machine that works needs some type of input or output. For example, music player in a car
needs input from the user to make volume up or down or play the next song. The input/output
reads data from the register or memory of the device.

Memory:

Memory is used to store temporary or permanent data. There are 3 types of memory used in
embedded systems i.e. RAM, ROM, EEPROM. RAM (Random access memory) is a volatile
memory where data is stored temporarily. RAM is used when the device or machine is running
and data is gone when the device is turned off.  RAM helps to store/read data used by the
embedded system. ROM (Read-only memory) is a type of memory in which data is stored
permanently and it helps to boot the embedded system. EEPROM (Electrically Erasable
Programmable Read-Only Memory) is an advancement of ROM in which data is stored and also
can be erased and rewritten.

Communication ports:

Communication ports help one embedded system to communicate with another embedded
system. Most of the microcontrollers have built-in ports. Some examples of communication ports
are CAN, SPI, USB, Ethernet, UART etc.

Software Components

There are some software components used in the embedded system which are below:

Emulator:

The emulator is a software or hardware component which behaves the same as any another
system. If you want to copy features of another system then you can do so by attaching emulator
to your system. Your system will behave the same at the target system.

Compiler:

A compiler is a program that converts high-level programming language code like C++, Java,
and Python into low-level language code like machine language, assembly language or machine
code. Program is first written in the high-level language than before transferring code to
embedded systems it is first converted to machine language by a compiler.

Debugger:
A debugger is a program that identifies and help to fix errors in the program. Sometimes the code
not works as expected so errors are detected by the debugger.

Assembler:

Assembler is used to convert assembly language to hex code. If you are a programmer who
writes the program in assembly language then you have to convert your code to hex code or
machine code which can be understood by the embedded system.

Embedded System Programming & Its Languages


A system is an arrangement of multiple units, assembled together to function
according to the given instructions. An embedded system is a combination of both
hardware and software, which performs a particular task within the specified period
(which means it should perform only one specific task like a washing machine). The
main advantage of using an embedded system in an application is that it can minimize
the size and the cost and also improves the reliability and efficiency of the task. This
article overviews embedded software languages, embedded system programming, and
their functions.

Components of Embedded Systems


The following are the components of embedded systems

 Embedded Hardware: The micro-controller is the heart of the embedded


system, where multiple peripherals are interfaced to embedded hardware for
communication purposes.
 Embedded RTO’s: An embedded real-time operating system is used to
perform all complex (ar operations.
 Device Drivers: It acts as a bridge between the operating systems and
peripheral devices.
 Communication stacks: It is used for communicating with external devices.
 Embedded applications: It performs the predefined function of the
embedded device.
Embedded System Components

Embedded Software
An embedded software or embedded system programming is computer software,
which is used to control devices by providing a set of instructions. It is also
named firmware, various devices with various functionalities can be programmed
using embedded software, by maintaining design constraints (like response time
constraints, strict deadlines, and processed data) and storing the final data
in memory (Ram/ Rom).
Software is controlled or initiated by a machine interface. The embedded software is
inbuilt in all electronics like cars, telephones, robots, security systems, etc which is
simple to run on an 8-bit microcontroller using memory up to a few KB. It helps in
processing complex operations and determines the accurate computation framework.

Embedded System Programming Languages


Embedded software uses an operating system, which is a real-time operating system
that performs multiple tasks at a time. The embedded programs are programmed using
in C / C++, Phyton, and Java Scripts languages and are processed on operating
systems like Linux OS, VxWorks, Fusion RTOS, Nucleus RTOS, micro C/OS, OSE,
etc. Selection of programming language plays a vital role in developing embedded
software, which is based on certain factors as shown below,
 Size: The amount of memory required by a program plays an important role,
as embedded processors (microcontrollers) have a specific amount of ROM
(Read Only Memory) based on its application.
 Speed: The speed of program execution must be fast
 Portability: Different processors can be compiled using one program.
 Implementation is difficult
 Maintenance is difficult.

Programming of an Embedded System in Assembly Language


Programming of an embedded system in assembly language (input) and converting it
into the machine-level language (output) using an assembler can be explained using
the following example, where we perform the addition of two numerics using two
separate registers and store the result in an output register.

Input
HERE: MOV R0,#01H

MOV #1,#02H

MOV A,R0

ADD A,R1

MOV P0,A

SIMP HERE

Output
Address         Opcode     Operand
0000                   78               01
0002                   79               02
0004                   E8                –
0005                   29                –
0006                   F5              80
0008                   80             00
Assembly code is used for developing efficient code in terms of size and speed.
Developing larger code in assembly language becomes difficult which may lead to
higher software development cost and the code portability is absent. Hence in order to
overcome this disadvantage we use high-level language such as embedded C.

About C, C++, Java, and Embedded C


C Programming
C language is a structure-oriented language, developed by Dennis Ritchie. It provides
less memory access using the simple compiler and delivers the data efficiently
according to machine instructions. They are applicable in wide ranges from embedded
systems to supercomputers.

Embedded C
Embedded C is an extension of the C language, which is used for developing an
embedded system. The syntax is similar to C language (like the main function,
functions declaration, data types declaration, loops, etc). The main difference between
embedded C and standard C language are input-output addressing of hardware, fixed-
point operations, and processing address spaces.

The use of C in the embedded system due to the following advantages

 It is small and easy to learn, understand and debug the program.


 All the C compilers are compatible with all embedded devices
 It is a processor-independent (that is, it is not specific to a particular
microprocessor or microcontroller).
 C language uses the combination of assembly language and features of the
high-level language
 It is fairly efficient, more reliable, more flexible, more portable between
different platforms.
 The programs developed in C are easier to understand, debug and maintain.
Compare to other high-level language C offers more flexibility because it is a
relatively small structure-oriented language and supports low-level bitwise data
manipulations.
C++
Object-oriented language like C++ is not optional for developing an efficient program
in research constraint environments like embedded devices. Virtual functions and
exception handling of C++ are some specific features that are not efficient in terms of
space and speed of the system.

JAVA
An embedded system can be programmed in JAVA language, using JAVA virtual
machine (JVM) which accesses lots of resources. It primarily finds usage in high-end
applications (like mobile phones) and offers portability across systems to process the
applications.  It is not preferred for smaller embedded devices.

Embedded C Programming Architecture and Example

Embedded C programming architecture can be understood with an example of


using 8051 micro-controllers, where its function is to blink the LED bulb which is
connected to PORT1 of the controller and the compiler used is Keil C Compiler. The
following is the code for the LED blink.
#include<reg51.h>            // directive of pre-processor
Void delay (int)                //declaration of delay function
Void main(void)             // Main function
{
P1 = 0x00;                    // port1 is off so LED is off and stored in reg51.h
while(1)                       // loop of infinity
{
P1 =OxFF;                //// port1 is on so LED is on
delay(1000);           // assigning delay
P1 = 0X00;            // port1 off
delay(1000);
}
}
Void delay (int d)  // assigning delay function
{
unsigned int i=0; // variables assigned locally
for (; d>0 ; d-)
{
for (i=250 ; i>0;i–);
for (i=248 ; i>0;i–);
}
}
Advantages

The following are the advantages of Embedded Software

 Loading of data is faster


 Cost is low
 Utilizes less resources.

Disadvantages
The following are the disadvantages of Embedded Software

 Upgrading is complex
 Every time resetting is necessary if any problems occur
 Scalability for small values is difficult.
Applications
The following are the applications of Embedded Software

 Banking
 Automobiles
 Home appliances
 Car
 Missiles, etc.

You might also like