What Are Embedded Systems?
What Are Embedded Systems?
As the term defines embed means “to integrate or incorporate an object into
another” and system can be defined as “a group of interdependent items that
interact with each other to perform a task.”
Examples of such systems are digital cameras, mobile phones, PDAs, MP3 players,
airline systems, home automation etc.
1
History
In the earliest years of computers in the 1940–50s, computers were sometimes
dedicated to a single task, but were far too large and expensive for most kinds of
tasks performed by embedded computers of today.
One of the first recognizably modern embedded systems was the Apollo Guidance
Computer, developed by Charles Stark Draper at the MIT Instrumentation
Laboratory. At the project's inception, the Apollo guidance computer was
considered the riskiest item in the Apollo project as it employed the then newly
developed monolithic integrated circuits to reduce the size and weight.
Ubiquitous Computing
Ubiquitous computing is essentially the term for human interaction with
computers in virtually everything we do. This is future phase beyond the desktop
and notebook environment that we are currently in. Ubiquitous computing would
involve objects interacting all around you providing feedback or adjusting based
upon previously configured settings. It is possible by the use of Embedded
Systems.
2
Classification of ES
Autonomous systems
They function in standalone mode. Many embedded systems used for
process control in manufacturing units& automobiles fall under this
category.
Real-time embedded systems
These are required to carry out specific tasks in a specified amount of time.
These systems are extensively used to carry out time critical tasks in
process control.
Networked embedded systems
They monitor plant parameters such as temperature, pressure and
humidity and send the data over the network to a centralized system for on
line monitoring.
Mobile gadgets
Mobile gadgets need to store databases locally in their memory. These
gadgets imbibe powerful computing & communication capabilities to
perform real-time as well as non-real-time tasks and handle multimedia
applications.
Structure of ES
3
Components
Processor / Microcontroller / DSP
Memory
Convertors
Sensors
Actuators
Firmware i.e. program instructions
User interface
Processor
A processor is the logic circuitry that responds to and processes the basic
instructions that drives a computer. In an embedded system there are three types
of processors as following:
Microprocessor
A microprocessor incorporates most or all of the functions of a computer's
central processing unit (CPU) on a single integrated circuit (IC, or
microchip). It basically consists of the processing core. Embedded systems
use 4 bit or 8 bit microprocessors whereas the 16 bit and 32 bit are used for
general purpose computing.
Microcontroller
A microcontroller (sometimes abbreviated µC or uC) is a small computer on
a single integrated circuit containing a processor core, memory, and
programmable input/output peripherals. Microcontrollers are designed for
embedded applications, in contrast to the microprocessors used in personal
computers or other general purpose applications. Microcontrollers are
used in automatically controlled products and devices, such as automobile
engine control systems, implantable medical devices, remote controls,
office machines, appliances, power tools, and toys. By reducing the size and
cost compared to a design that uses a separate microprocessor, memory,
4
and input/output devices, microcontrollers make it economical to digitally
control even more devices and processes.
Architectures of processors
Major architectures used by embedded systems are:
Von Neumann
The von Neumann architecture is a design model for a stored-program
digital computer that uses a central processing unit (CPU) and a single
separate storage structure ("memory") to hold both instructions and data.
5
Harvard Architecture
The Harvard architecture is computer architecture with physically separate
storage and signal pathways for instructions and data.
6
to poor performance. The performance can be improved by executing
different sub-steps of sequential instructions simultaneously (this is
pipelining), or even executing multiple instructions entirely simultaneously.
Implementation
ASIC
An application-specific integrated circuit (ASIC) is an integrated circuit (IC)
customized for a particular use, rather than intended for general-purpose
use. For example, a chip designed solely to run a cell phone is an ASIC. As
feature sizes have shrunk and design tools improved over the years, the
maximum complexity (and hence functionality) possible in an ASIC has
grown from 5,000 gates to over 100 million. Modern ASICs often include
entire 32-bit processors, memory blocks including ROM, RAM, EEPROM,
Flash and other large building blocks. Such an ASIC is often termed a SoC
(system-on-a-chip). Designers of digital ASICs use a hardware description
language (HDL), such as Verilog or VHDL, to describe the functionality of
ASICs.
FPGA
A field-programmable gate array (FPGA) is an integrated circuit designed
to be configured by the customer or designer after manufacturing—hence
"field-programmable". The FPGA configuration is generally specified using a
hardware description language (HDL), similar to that used for an
application-specific integrated circuit (ASIC). FPGAs can be used to
implement any logical function that an ASIC could perform. The ability to
update the functionality after shipping, partial re-configuration of the
portion of the design and the low non-recurring engineering costs relative
to an ASIC design (not withstanding the generally higher unit cost), offer
advantages for many applications.
7
Memory
An embedded system uses a memory for storing the instructions, data, software,
temporary values etc. The types of memories used are as follows:
Flash Memory
Flash memory is a non-volatile computer storage technology that can be
electrically erased and reprogrammed. It is primarily used in memory cards,
USB flash drives, and solid-state drives for general storage and transfer of
data between computers and other digital products. It is a specific type of
EEPROM (electrically-erasable programmable read-only memory) that is
erased and programmed in large blocks.
8
Converters
ADC (Analog to Digital Converter)
An analog-to-digital converter (abbreviated ADC, A/D or A to D) is a device
that converts a continuous quantity to a discrete digital number. The
reverse operation is performed by a digital-to-analog converter (DAC). The
input to an analog-to-digital converter (ADC) consists of a voltage that
varies among a theoretically infinite number of values. Examples are sine
waves, the waveforms representing human speech, and the signals from a
conventional television camera. The output of the ADC, in contrast, has
defined levels or states. The number of states is almost always a power of
two -- that is, 2, 4, 8, 16, etc. The simplest digital signals have only two
states, and are called binary. All whole numbers can be represented in
binary form as strings of ones and zeros. Digital signals propagate more
efficiently than analog signals, largely because digital impulses, which are
well-defined and orderly, are easier for electronic circuits to distinguish
from noise, which is chaotic. This is the chief advantage of digital modes in
communications. Computers "talk" and "think" in terms of binary digital
data; while a microprocessor can analyze analog data, it must be converted
into digital form for the computer to make sense of it. A typical telephone
modem makes use of an ADC to convert the incoming audio from a twisted-
pair line into signals the computer can understand. In a digital signal
processing system, an ADC is required if the signal input is analog.
9
analog signal input. Binary digital impulses, all by themselves, appear as
long strings of ones and zeros, and have no apparent meaning to a human
observer. But when a DAC is used to decode the binary digital signals,
meaningful output appears. This might be a voice, a picture, a musical tune,
or mechanical motion. Both the DAC and the ADC are of significance in
some applications of digital signal processing. The intelligibility or fidelity of
an analog signal can often be improved by converting the analog input to
digital form using an ADC, then clarifying the digital signal, and finally
converting the "cleaned-up" digital impulses back to analog form using a
DAC.
User Interface
In information technology, the user interface (UI) is everything designed into an
information device with which a human being may interact -- including display
screen, keyboard, mouse, light pen, the appearance of a desktop, illuminated
characters, help messages, and how an application program or a Web site invites
interaction and responds to it. In early computers, there was very little user
interface except for a few buttons at an operator's console. The user interface
was largely in the form of punched card input and report output.
Later, a user was provided the ability to interact with a computer online and the
user interface was a nearly blank display screen with a command line, a keyboard,
and a set of commands and computer responses that were exchanged. This
command line interface led to one in which menus (list of choices written in text)
predominated. And, finally, the graphical user interface (GUI) arrived, originating
mainly in Xerox's Palo Alto Research Center, adopted and enhanced by Apple
Computer, and finally effectively standardized by Microsoft in its Windows
operating systems.
The user interface can arguably include the total "user experience," which may
include the aesthetic appearance of the device, response time, and the content
that is presented to the user within the context of the user interface.
10
The different interface devices are as follows:
Buttons
Menu System
LEDs
Graphics (GUI)
Character LCDs
Peripheral Devices in an ES
A peripheral is a device attached to a host computer but not part of it, and is
more or less dependent on the host. It expands the host's capabilities, but does
not form part of the core computer architecture.
11
devices such as smart phones, PDAs and video game consoles, and as a
power cord between a device.
12
GPIO (General Purpose Input/Output)
Network Controller
Embedded Debugging
Embedded debugging may be performed at different levels, depending on the
facilities available. From simplest to the most sophisticated they can be roughly
grouped into the following areas:
13
Interactive resident debugging, using the simple shell provided by the
embedded operating system (e.g. Forth and Basic)
Reliability
Embedded systems often reside in machines that are expected to run
continuously for years without errors and in some cases recover by themselves, if
an error occurs. Therefore the software is usually developed and tested more
carefully than that for personal computers, and unreliable mechanical moving
parts such as disk drives, switches or buttons are avoided.
14
Specific reliability issues may include:
1. The system cannot safely be shut down for repair, or it is too inaccessible to
repair. Examples include space systems, undersea cables, navigational
beacons, bore-hole systems, and automobiles.
2. The system must be kept running for safety reasons. "Limp modes" are less
tolerable. Often backups are selected by an operator. Examples include
aircraft navigation, reactor control systems, safety-critical chemical factory
controls, train signals, engines on single-engine aircraft.
3. The system will lose large amounts of money when shut down: Telephone
switches, factory controls, bridge and elevator controls, funds transfer and
market making, automated sales and service.
Watchdog Timer
Redundant Subsystems
Some subsystems have an exact copy of the system. Thus, if one fails then
the other one is present to fulfill the work of the failed one.
The trusted computing base (TCB) of a computer system is the set of all
hardware, firmware, and/or software components that are critical to its
security, in the sense that bugs or vulnerabilities occurring inside the TCB
might jeopardize the security properties of the entire system. By contrast,
parts of a computer system outside the TCB must not be able to misbehave
15
in a way that would leak any more privileges than are granted to them in
accordance to the security policy.
16
Embedded Hypervisor
Firmware
Firmware is a term often used to denote the fixed, usually rather small, programs
and/or data structures that internally control various electronic devices. Typical
examples of devices containing firmware range from end-user products such as
remote controls or calculators, through computer parts and devices like hard
disks, keyboards, TFT screens or memory cards, all the way to scientific
instrumentation and industrial robotics. Also more complex consumer devices,
such as mobile phones, digital cameras, synthesizers, etc., contain firmware to
enable the device's basic operation as well as implementing higher-level
functions.
17
Embedded Software Architectures
There are several different types of software architecture in common use.
In this design, the software simply has a loop. The loop calls subroutines,
each of which manages a part of the hardware or software.
These kinds of systems are used if event handlers need low latency and the
event handlers are short and simple.
Usually these kinds of systems run a simple task in a main loop also, but this
task is not very sensitive to unexpected delays.
Sometimes the interrupt handler will add longer tasks to a queue structure.
Later, after the interrupt handler has finished, these tasks are executed by
the main loop. This method brings the system close to a multitasking kernel
with discrete processes.
Cooperative multitasking
The advantages and disadvantages are very similar to the control loop,
except that adding new software is easier, by simply writing a new task, or
adding to the queue-interpreter.
18
Preemptive multitasking or multi-threading
As any code can potentially damage the data of another task (except in
larger systems using an MMU) programs must be carefully designed and
tested, and access to shared data must be controlled by some
synchronization strategy, such as message queues, semaphores or a non-
blocking synchronization scheme.
19
drivers and codecs will be present in the system. In the case of the monolithic
kernels, many of these software layers are included. In the RTOS category, the
availability of the additional software components depends upon the commercial
offering.
Development Process of ES
The development phase consists of the following:
1. Requirement Analysis
A thorough study is done for the requirements by the analyst using various
information gathering tools like interview, manuals, questionnaires etc.
2. Specification
During this phase the informal requirements are transformed into the formal
specifications using SDL.
3. System Architecture
The system’s architecture is decided and the architecture of the peripherals and
other devices is also decided.
4. Design
The architected system is designed. Each component is designed. This consists of
the various circuit diagrams, graphs and logic diagrams.
5. Implementation
The designed system is implemented i.e. the SDL specifications are translated into
VHDL (VHSIC hardware description language; VHSIC: very-high-speed integrated
circuit) for hardware modules.
6. Testing
Various testing techniques are used to check whether the system is working
properly or not.
7. Integration
All the designed components are then fabricated into a single unit.
8. Maintenance
The maintenance is to enhance or check for proper working of the system after it
is being used by the end-user.
20
Diagrammatic view of the Development phase
Requirement Analysis
Specification
System Architecture
Design
Implementation
Testing
Integration
Maintenance
21
Requirements of ES
• Reliability
Embedded systems have to work without the need for the rebooting or
resetting typical of many desktop systems. This calls for very reliable hardware
and software. If, for example the embedded system comes to a halt because of
a hardware error, the system should reset itself without the need for human
intervention. Certainly, reliability is critical in any system, but we are used to
resetting our desktop systems once in a while, thanks to the unpredictability of
operating system software. However, embedded software developers must
make the reliability of the hardware, as well as that of the software, of
paramount importance because the system is not readily accessible to human
intervention.
• Cost effectiveness
If an embedded system is designed for a very special purpose, such as for a
deep space probe or for use in a nuclear plant, cost may not be an issue.
However, if the embedded system is for the mass market, such as those used
in CD players, toys, and mobile device cost is a major consideration. Choosing
the right processor, memory device, and peripherals of critical importance. In
such cases, the designers will develop an Application Specific Integrated Circuit
(ASIC) or an Application Specific Microprocessor to reduce the hardware
components and hence the cost. Typically, a developer first creates a
prototype by writing the software for a general purpose processor and
subsequently develops an ASIC to reduce the cost.
22
• Low power consumption
Many embedded systems are powered by batteries, rather than a main supply.
In such cases, the power consumption should be minimized to avoid draining
the batteries. Hardware designers must address this issue-for example, by
reducing the number of hardware components, or by designing the processor
to revert to low power or “Sleep” mode when there is no operation to
perform.
Embedded Applications
Embedded systems are found in a wide range of application areas. Originally they
are used only for expensive industrial control applications, but as technology
brought down the cost of dedicated processors, they began to appear in
moderately expensive applications such as automobiles, communications and
office equipment and televisions. Today’s embedded systems are so inexpensive
that they are used in almost every electronic product in our life.
24
Application Area Examples
25
Advantages of ES
1. Design and Efficiency
2. Cost
3. Accessibility
Embedded systems are difficult to service because they are inside another
machine, so a greater effort is made to carefully develop them. However, if
something does go wrong with certain embedded systems they can be too
inaccessible to repair. This concern is sometimes addressed in the design
stage, such as by programming an embedded system so that it will not affect
related systems negatively when malfunctioning.
4. Maintenance
5. Redundancies
26
Bibliography
www.about.com
www.docstoc.com
www.slideshare.net
www.ehow.com
www.howstuffswork.com
www.studentyogi.com
www.ercim-news.eu
www.answers.yahoo.com
www.wiki.answers.com
www.wikibooks.org
www.wikipedia.org
Fundamentals of Embedded Software
Architecture of Embedded System
27