0% found this document useful (0 votes)
15 views

chapter 1 Introduction to embedded system

embedded system introduction classification and properties

Uploaded by

Bewnet Getachew
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

chapter 1 Introduction to embedded system

embedded system introduction classification and properties

Uploaded by

Bewnet Getachew
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 84

 Embedded Systems are Medical

Automotive
everywhere
 Ubiquitous, invisible
 Hidden (computer inside) Communications
Military
 Dedicated purpose

Chapter-1 Comsumer Industrial

INTRODUCTION TO Embedded
System
Embedded system
Microcontroller LM3S or TM4C Electrical,
mechanical,
Processor chemical,
I/O Ports or
RAM optical
devices
ROM DAC Analog
Bus ADC signals
SYLLABUS
1.1 History of embedded systems,
1.2 Classification of embedded systems based on
generation and complexity,
1.3 Purpose of embedded systems,
1.4 The embedded system design process-
requirements, specification, architecture design,
designing hardware and software, components,
system integration,
1.5Applications of embedded systems,
1.6 characteristics of embedded systems.
What is a system?
A system is an arrangement (interconnection of
components) in which all its units assemble and work
together
SYSTEM according
EXAMPLESto the plan or program(rules).
WATCH It is a time display
SYSTEM
Parts: Hardware, Needles,
Battery, Dial, Chassis and Strap
Rules
1.All needles move clockwise only
2.A thin needle rotates every
second
3.A long needle rotates every
minute
4.A short needle rotates every
hour
5.All needles return to the original
position after 12 hours
WASHING MACHINE It is an
automatic clothes washing
SYSTEM
Parts: Status display panel,
Switches & Dials, Motor, Power
supply
Rules & control unit, Inner water
level
1.Washsensor and solenoid valve.
by spinning
2.Rinse
3.Drying
4.Wash over by blinking
5.Each step display the process
stage
6.In case interruption, execute
only the remaining
EMBEDDED SYSTEM
Definition: An Embedded System is one that has computer
hardware with software embedded in it as one of its important
components.

Embedded system: any device that includes a programmable


computer but is not itself a general-purpose computer.
Example 1: Washing Machine
A washing machine from an embedded systems point of view
has:
a. Hardware: Buttons, Display & buzzer, electronic circuitry.
b. Software: It has a chip on the circuit that holds the software
which drives controls & monitors the various operations
possible.
c. Example
Mechanical2:Components:
Air Conditioner the internals of a washing
machine
An Air whichfrom
Conditioner actually wash the clothes
an embedded systemscontrol the
point of input
view and
has:
output of water,
a. Hardware: the chassis
Remote, itself.
Display & buzzer, Infrared Sensors,
electronic circuitry.
b. Software: It has a chip on the circuit that holds the software
which drives controls & monitors the various operations
possible. The software monitors the external temperature
through the sensors and then releases the coolant or suppresses
Anit. embedded system will always have a chip (either
microprocessor
c. or microcontroller)
Mechanical Components: the that has the
internals code
of an airorconditioner
software
which
Anthe drives the
motor,
embedded system
thesystem
chassis,isthedesigned
outlet, etc to do a specific job only.
Example: a washing machine can only wash clothes, an air
conditioner can control the temperature in the room in which it is
If we take any engineering product that needs control,
and if a computer is incorporated within that product to
undertake the control, then we have an embedded
system.
A system whose principal function is not
computational, but which is controlled by a computer
embedded within it.
• Information processing systems embedded into a
larger product.
 Main reason for buying is not information
processing
• Any device that includes a programmable processor
but is not itself a general-purpose computer
Take advantage of application characteristics to
Embedded Systems Vs General
Computing Systems:
General Purpose Computing Embedded System
System
A system which is a combination A system which is a combination
of generic hardware and General of special purpose hardware and
Purpose Operating System for embedded OS for executing a
executing a variety of applications specific set of applications
Contain a General Purpose May or may not contain an
Operating System (GPOS) operating system for functioning
Applications are alterable The firmware of the embedded
(programmable) by user (It is system is pre-programmed and it
possible for the end user to re- is non-alterable by end-user
install the Operating System, and
add or remove user applications)
Performance is the key deciding Application specific requirements
factor on the selection of the (like performance, power
system. Always „Faster is Better‟ requirements, memory usage etc)
are the key deciding factors
Response requirements are not For certain category of embedded
time critical systems like mission critical
hy Embedded Systems?
Embedded = Smart
• Computers embedded into objects
 Augment objects with programmatic control, communication,
sensing, and actuation
• Let the world know you:
 Make physical objects/phenomena accessible to digital
world
• Let you know the world:
 Give intelligence to physical objects so that they can
uture Embedded Systems
sense/react
 Put a “robot” inside everything!
onsider the Evolution of Watches
How about
Refrigerators?
The diagram of Figure 1.1, while specific for a fridge, actually represents
very well the overall concept of an embedded system. There is an
embedded computer, engaged in reading internal variables, and
outputting signals to control the performance of the system. It may have
human interaction (but in general terms does not have to) and it may
have networked interaction. Generally, the user has no idea that there’s a
Cameras
computer inside the fridge!

Glasses
COMPONENTS OF EMBEDDED
SYSTEM
• It has Hardware
Processor, Timers, Interrupt controller, I/O Devices,
Memories, Ports, etc.
• It has main Application Software
Which may perform concurrently the series of tasks or
multiple tasks.
• It has Real Time Operating System (RTOS)
RTOS defines the way the system work. Which supervise the
application software. It sets the rules during the execution of the
application
PROCESSOR program. A small scale embedded system may not
need an RTOS. is the heart of the
• A Processor
Embedded System.
• For an embedded system
designer knowledge of
microprocessor and
microcontroller is a must.
Two Essential Units:
Operations
Control Unit (CU),
Parts of an Embedded System

USER EMBEDDED SYSTEM

I/O

MEMORY PROCESSOR

ACTUATORS
SENSORS

HARDWIRED UNIT
• Application-specific logic
• Timers
• A/D and D/A conversion

ENVIRONMENT
An embedded system is a combination of 3 things, Hardware
Software Mechanical Components and it is supposed to do one
specific task only. A typical embedded system contains a single
chip controller which acts as the master brain of the system.
Diagrammatically an embedded system can be represented as
follows:
VARIOUS PROCESSOR
1. General Purpose processor (GPP)
Microprocessor Microcontroller Embedded Processor
Digital signal Processor
2. Application Specific System Processor (ASSP)
3. Multi Processor System using GPPs
MICROPROCESSOR
• A microprocessor is a single chip semi conductor device also
which is a computer on chip, but not a complete computer.
• Its CPU contains an ALU, a program counter, a stack pointer,
some working register, a clock timing circuit and interrupt circuit
on a single chip.
• To make complete micro computer, one must add memory
usually ROM and RAM, memory decoder, an oscillator and a
Microcontroller
number of serial and parallel ports.
A microcontroller (often abbreviated MCU) is a single computer chip
(integrated circuit) that executes a user program, normally for the purpose
of controlling some device, hence the name microcontroller.
The program is normally contained either in a second chip, called an
EPROM, or within the same chip as the microcontroller itself.
Microprocessor Vs
Microcontroller
Ext int Microcontrolle
r
interrupt

Address Bus (Uni dirctional)

CPU
Data Bus (Bi directional)

Control Lines

OSC
Microprocessor
Ext int

interrupt
Timer0
Timer1
ROM RAM

CPU

Bus 4 I/o Serial


control ports port
OSC
EMBEDDED SYSTEM HARDWARE
EMBEDDED SYSTEM CONSTRAINTS
An embedded system is software designed to keep in
view three constraints:
– Available system memory
– Available processor speed
– The need to limit the power dissipation .
What makes embedded systems different?
• Real-time operation
• size
• cost
• time
• reliability
• safety
• energy
• security
Characteristics of Embedded systems:
Embedded systems possess certain specific
characteristics and these are unique to each
Embedded system.
1.Application and domain specific
2.Reactive and Real Time
3.Operates in harsh environments
4.Distributed
5.Small Size and weight
6.Power concerns
7.Single-functioned
8.Complex functionality
9.Tightly-constrained
10.Safety-critical
1.Application and Domain Specific:-
Each E.S has certain functions to perform and they are developed
Single-functioned
in such a manner to do the intended functions only. •
Executes a single program,
They cannot be used for any other purpose.
• Ex – The embedded control units repeatedly
of the microwave oven cannot
be replaced with AC‟S embedded control unit because the
embedded control units of microwave oven and AC are specifically
designed to perform certain specific tasks.
2. Reactive and Real Time:-
• E.S are in constant interaction with the real world through
sensors and user-defined input devices which are connected to the
input port of the system.
• Any changes in the real world are captured by the sensors or
input devices in real time and the control algorithm running inside
the unit reacts in a designed manner to bring the controlled output
variables to the desired level.
• E.S produce changes in output in response to the changes in the
input, so they are referred as reactive systems.
• Real Time system operation means the timing behavior of the
system should be deterministic ie the system should respond to
requests in a known amount of time.
An Embedded System

Example
Digital Camera
Digital camera chip
CCD

CCD preprocessor Pixel coprocessor D2A


A2D

lens

JPEG codec Microcontroller Multiplier/Accum

DMA controller Display ctrl

Memory controller ISA bus interface UART LCD ctrl

• Single-functioned -- always a digital camera


• Tightly-constrained -- Low cost, low power, small, fast
• Reactive and real-time -- only to a small extent
3. Operates in Harsh Environment :–
• The design of E.S should take care of the operating conditions
of the area where the system is going to implement.
• Ex – If the system needs to be deployed in a high temperature
zone, then all the components used in the system should be of
high temperature grade.
• Also proper shock absorption techniques should be provided to
systems which are going to be commissioned in places subject to
high shock.

4. Distributed: –
• It means that embedded systems may be a part of a larger
system.
• Many numbers of such distributed embedded systems form a
single large embedded control unit.
• Ex – Automatic vending machine. It contains a card reader, a
vending unit etc. Each of them are independent embedded units
but they work together to perform the overall vending function.
5. Small Size and Weight:-
• Product aesthetics (size, weight, shape, style, etc) is an
important factor in choosing a product.
• It is convenient to handle a compact device than a bulky
product.
6. Power Concerns:-
• Power management is another important factor that needs to be
considered in designing embedded systems.
• E.S should be designed in such a way as to minimize the heat
dissipation by the system.
7. Single-functioned:-
Dedicated to perform a single function
8. Complex functionality: -
We have to run sophisticated algorithms or multiple algorithms in
some applications.
9. Tightly-constrained:-
Low cost, low power, small, fast, etc
10. Safety-critical:-
Must not endanger human life and the environment
Quality Attributes of Embedded System:
Quality attributes are the non-functional requirements that need
to be documented properly in any system design
Quality attributes can be classified as
I. Operational quality attributes
II. Non-operational quality attributes.
I. Operational Quality Attributes:
The operational quality attributes represent the relevant quality
attributes related to the embedded system when it is in the
operational mode or online mode.
Operational Quality Attributes are:
1. Response :- It is the measure of quickness of the system.
2. Throughput :-It deals with the efficiency of a
system.
3. Reliability :It is a measure of how much we can rely upon
the proper functioning of the system.-
4. Maintainability:-• It deals with support and maintenance
to the end user or client in case of technical issues and
product failure or on the basis of a routine system checkup.
5. Security: Confidentiality, Integrity and availability are the
three major measures of information security.-
6. Safety :-Safety deals with the possible
damages that can happen to the operator, public
and the environment due to the breakdown of an
Embedded System.
II. Non-Operational Quality Attributes:
The quality attributes that needs to be addressed for the product
not on the basis of operational aspects are grouped under this
category.
1. Testability and Debug-
ability:
Testability deals with how easily one can test the design,
application and by which means it can be done

Debug-ability is a means of debugging the product from


unexpected behavior in the system
• Debug-ability is two level process
• 1.Hardware level 2.software level
• 1. Hardware level: It is used for finding the
issues created by hardware problems.
• 2. Software level: It is employed for finding
the errors created by the flaws in the software.
2. Evolvability :-For an embedded system
evolvability refers to the ease with which the
embedded product can be modified to take
advantage
3. of isnew
Portability:-It firmware
the measure or
of system hardware
technologies
independence
An embedded product is said to be portable if the product is
capable of functioning in various environments, target
processors and embedded operating systems.
4. Time-to-Prototype and
Market:-
5. Per Unit Cost and
Revenue:-
Embedded systems have to be dependable.
Many embedded systems are safety-critical and
therefore have to be dependable. Nuclear power plants
are an example of extremely safety-critical
systems that are at least partially controlled by
software. Dependability
is, however, also important in other systems, such as
cars, trains, airplanes
etc. A key reason for being safety-critical is that these
systems
Dependability encompasses are the following aspects
directly
of a system:
connected
1 toReliability
Reliability: the environment and have
is the probability that aan immediate
system will not
fail.
impact on the environment.
2 Maintainability: Maintainability is the probability that a failing
system can be repaired within a certain time-frame.
3 Availability: Availability is the probability that the system is
available. Both the reliability and the maintainability must be high
in order to achieve a high availability.
4 Safety: This term describes the property that a
failing system will not cause any harm.
5 Security: This term describes the property that
confidential data re-
mains confidentialsystems
Most embedded and thatdo
authentic
not usecommunication
keyboards, mice
is
andguaranteed.
large computer monitors for their user-interface.
Instead, there is a dedicated user-inter-
face consisting of push-buttons, steering wheels,
pedals etc. Because of this, the user hardly recognizes
that information processing is involved. Due to this, the
new era of computing has also been characterized by
the disappearing computer.
1. Code-size efficient (especially for systems on a
chip) All the code to be run on an embedded system
has to be stored with the system. Typically, there are
no hard discs on which code can be stored.
2. Run-time efficient The minimum amount of
resources should be used for implementing the required
functionality. We should be able to meet time
constraints using the least amount of hardware
resources and energy. In order to reduce the energy
consumption, clock frequencies and supply voltages
should be as small as possible. Also, only the necessary
hardware components should be present. Components
which do not improve the worst case execution time
(such as many caches or memory management units)
can be omitted.
3. Weight efficient All portable systems must be of
low weight. Low weight is frequently an important
5. Energy efficient Many embedded systems are
mobile systems obtaining their energy through
batteries and customers are expecting long run-times
from their batteries. Therefore, the available electrical
energy must be used very efficiently.
Real-time constraints
CPS must meet real-time constraints
• A real-time system must react to stimuli from the
controlled object (or the operator) within the time
interval dictated by the environment.
• For real-time systems, right answers arriving too
late are wrong.
• “A real-time constraint is called hard, if not
meeting that constraint could result in a
catastrophe“.
• All other time-constraints are called soft.
• A guaranteed system response has to be explained
without statistical arguments.
Real-Time Systems & CPS
CPS, ES and Real-Time Systems synonymous?
For some embedded systems, real-time behavior is
less important (smart phones)
For CPS, real-time behavior is essential, hence RTS =
CPS
CPS models also include a model of the physical
system
Reactive
ES models & hybrid
typically justsystems
model IT components
CPS model
Typically, = are
CPS (ES-) IT components
reactive systems: model + physical
model
“A reactive system is one which is in continual
interaction with is environment and executes at a pace
determined by that environment“
Behavior depends on input and current state.
automata model appropriate, model of computable
functions inappropriate.
Hybrid systems = (analog + digital parts).
Dedicated systems
• Dedicated towards a certain application
Knowledge about behavior at design time can be used
to minimize resources and to maximize robustness
• Dedicated user interface (no mouse, keyboard
and screen)
•Real
Situation is slowly changing here: systems become
Time Systems
less dedicated
• Real-time systems (RTS) process events.
• Events occurring on external inputs cause other events to occur
as outputs.
• Minimizing response time is usually a primary objective, or
otherwise the entire system may fail to operate properly. Types of
Real Time System
• Hard real-time — e.g. Flight control systems.
• Soft real-time — e.g. Data acquisition system.
• Real real-time — e.g. Missile guidance system. • Firm real-
time
Types of Real Time System
• Hard real-time — systems where it is absolutely imperative
that responses occur within the required deadline. For example:
Flight control systems.
• Soft real-time — systems where deadlines are important, but
which will still function correctly if deadlines are occasionally
missed. For example: Data acquisition system.
• Real real-time — systems which are hard real-time and which
the response times are very short. For example: Missile guidance
system.
• Firm real-time — systems which are soft real-time but in
which there is no benefit from late delivery of service. A single
Multi-Tasking and
system may have all hard, soft, and real real-time subsystems. In
Concurrency
reality many systems will have a cost function associated with
• Most real-time
missing systems are also
each deadline.
embedded systems with several
inputs and outputs and multiple
events occurring independently.
• Separating tasks simplifies
programming but requires
somehow switching back and forth
CLASSIFICATIONS OF EMBEDDED
SYSTEM
❑ Based on Generation
❑ Based on Complexity & Performance Requirements
❑ Based on deterministic behavior
❑ Based on Triggering

1. Embedded Systems - Classification based on


Generation
First Generation:
The early embedded systems built around 8-bit microprocessors
like 8085 and Z80 and 4-bit microcontrollers
EX. stepper motor control units, Digital Telephone Keypads
etc.
Second Generation:
Embedded Systems built around 16-bit microprocessors and 8 or
16-bit microcontrollers, following the first generation embedded
systems
EX.SCADA, Data Acquisition Systems etc.
Third Generation:
Embedded Systems built around high performance 16/32 bit
Microprocessors/controllers, Application Specific Instruction set
processors like Digital Signal Processors (DSPs), and Application
Specific Integrated Circuits (ASICs).The instruction set is complex
and powerful.
EX. Robotics, industrial process control, networking etc
Fourth Generation:
Embedded Systems built around System on Chips (SoC’s),
Reconfigurable processors and multicore processors. It brings high
performance, tight integration and miniaturization into the
embedded device market
EX Smart phone devices, MIDs etc.
2. Embedded Systems - Classification based on
Complexity & Performance
1. Small Scale Embedded
System
• Single 8 bit or 16bit
Microcontroller.
• Little hardware and software
complexity.
• They May even be battery
operated.
• Usually “C” is usedtools:
Programming for developing
Editor, Assembler and Cross
these system.
Assembler
2. Medium Scale
• The need to limit Embedded
power dissipation
System
when
• Single system
or few 16is or 32running
bit
continuously.
microcontrollers or Digital Signal
Processors (DSP) or Reduced
Instructions Set Computers
(RISC).
• Both hardware and software
complexity. Programming tools:
RTOS, Source code Engineering
Tool, Simulator, Debugger and
3. Sophisticated Embedded
System
• Enormous hardware and software
complexity • Which may need scalable
processor or configurable processor and
programming logic arrays.
• Constrained by the processing speed
available in their hardware units.

Programming Tools: For these systems


may not be readily available at a
reasonable cost or may not be available
at all. A compiler or retargetable
compiler might have to be developed
for this.
3. Embedded Systems - Classification Based on
deterministic behavior:
It is applicable for Real Time systems. The application/task
execution behavior for an embedded system can be either
deterministic or non-deterministic These are classified in to two
types
1. Soft Real time Systems: Missing a deadline may not be
critical and can be tolerated to a certain degree
2. Hard Real time systems: Missing a program/task execution
time deadline can have catastrophic consequences (financial,
4. human
Embedded Systems
loss of life, etc.) - Classification Based on
Triggering: These are classified into two types
1. Event Triggered : Activities within the system (e.g., task run-
times) are dynamic and depend upon occurrence of different
events .
2. Time triggered: Activities within the system follow a
statically computed schedule (i.e., they are allocated time
slots during which they can take place) and thus by nature are
predictable.
Purpose of Embedded Systems:
Each Embedded Systems is designed to serve the purpose of any
one or a combination of the following tasks.
o Data Collection/Storage/Representation
o Data Communication
o Data (Signal) Processing
o Monitoring
o Control
o Application Specific User Interface
1.Data
Collection/Storage/Representation:-
❖ Performs acquisition of data from the external world.
❖ The collected data can be either analog or digital
❖ Data collection is usually done for storage, analysis,
manipulation and transmission
❖The collected data may be stored directly in the
system or may be transmitted to some other
2. Data Communication:-
Embedded Data communication systems are deployed in
applications ranging from complex satellite communication
systems to simple home networking systems
Embedded Data communication systems are dedicated for data
communication
The data communication can happen through a wired interface
(like Ethernet, RS-232C/USB/IEEE1394 etc) or wireless interface
(like Wi-Fi, GSM,/GPRS, Bluetooth, ZigBee etc) Network hubs,
Routers, switches, Modems etc are typical examples for dedicated
data transmission embedded systems
3. Data (Signal) Processing:-
Embedded systems with Signal processing functionalities are
employed in applications demanding signal processing like
Speech coding, synthesis, audio video codec, transmission
applications etc
Computational intensive systems
Employs Digital Signal Processors (DSPs)
signals –natural vs
manmade.
-- wanted vs
unwanted
--continuous vs
discrete
Any information-carrying mechanism can be called a Signal. Any
physical quantity that changes with time or pressure or temperature
etc. is a Signal.
The characteristics of the signal are amplitude, shape,
frequency, phase, etc.
Traffic signal gives the order to all the vehicles to stop. So, the
signal is an information conveying mechanism. An electric current
or energy that carries information is a signal. Data is transmitted
from one point to another as signals by using an electric quantity
(i.e., voltage or current or energy) that varies in space and time.
More generally, signal processing is an operation designed for
extracting, enhancing, storing, and transmitting useful
information.
Therefore extracting or enhancing the useful information from a mix
of conflicting information is a simplest form of signal processing.
4. Monitoring:-
Embedded systems coming under
this category are specifically
designed for monitoring purpose
They are used for determining the
state of some variables using input
sensors
They cannot impose control over
variables.
Electro Cardiogram (ECG) machine
for monitoring the heart beat of a
patient is a typical example for this
The sensors used in ECG are the
different Electrodes connected to
the patient's body Measuring
instruments like Digital CRO, Digital
Multi meter, Logic Analyzer etc used
in Control & Instrumentation
Interactive Vehicle Tracking System
It is a system which can track the vehicles for its movement through out the
trip with GPS And GPRS.
The data collected at different data points are stored at the vehicle itself and in
the computers of respective data points then to the server.
The Data are
vehicle number, started time, stop time, Fuel at, Date, Fuel
type, Qty, Amount, Balance, Driver ID …..
The Data Points are
the places where the interactive RF transmitter and receivers are
fixed say BPCL fuel stations.

At the data points

GPS & GPRS based RF transmitter and receivers (RF System) are
connected to a computer
GPS system is capable of interacting over area of 1 square metre

The GPS will transmit the data in a periodic interval continuously from the data point
Server
Block diagram of data locker

Receiver Memory

D i s p l a y
GPS & GPRS
Micro
Controller
Transmitter

sensors
Start/stop alarm

Load

Fuel
Block diagram of data point

Server

Receiver

GPS & GPRS SMS


Micro
Controller Printer
Transmitter

Pump

Pump link
circuit
5. Control:-
Embedded systems with control
functionalities are used for imposing
control over some variables according to
the changes in input variables
Embedded system with control
functionality contains both sensors and
actuators
Sensors are connected to the input port for
capturing the changes in environmental
variable or measuring variable The
actuators connected to the output port are
controlled according to the changes in
input variable to put an impact on the
controlling variable to bring the controlled
variable to the specified range
Air conditioner for controlling room
temperature is a typical example for
embedded system with „Control‟
functionality Air conditioner contains a
room temperature sensing element
6. Application Specific User
Interface:-
Embedded systems which are designed for
a specific application
Contains Application Specific User interface
(rather than general standard UI ) like key
board, Display units etc
Aimed at a specific target group of users

Mobile handsets, Control units in industrial


applications etc are examples
Application areas 1. Automotive electronics:
CONSUMER PRODUCTS
Appliances, Games, A/V,
Intelligent home devices
TRANSPORTATION
Autos, Trains, Ships,
Aircrafts
PLANT CONTROL
Manufacturing,
Chemical, Power
Generation
NETWORKS
Telecommunication,
Defense
An antilock brake system (ABS)
2. Medical systems:
For example:
• Artificial eye
• Camera attached to glasses; computer worn at belt;
output directly connected to the brain
3. Logistics
3 Logistics
Applications of embedded/cyber-physical system technology to
logistics:
Radio frequency identification (RFID) technology provides
easy identification of each and every object, worldwide.
Mobile communication allows unprecedented interaction.
The need of meeting real-time constraints and scheduling
are linking embedded systems and logistics.
The same is true of energy minimization issue
More application areas
Smart buildings: Information processing can be used
to increase the comfort level in buildings, can reduce
the energy consumption within buildings, and can
improve safety and security. There is a trend towards
integrating air-conditioning, lighting, access control,
accounting and distribution of information into a single
system. For systems:
Authentication example, Embedded
energy systems
can be be
can
saved onauthentication
used for cooling, heating and lighting of rooms which
purposes.
are empty.

The SMARTpen is a pen-like instrument analyzing physical


parameters while its user is signing. Physical parameters include
the tilt, force and acceleration. These values are transmitted to a
host PC and compared with information available about the user.
As a result, it can be checked if both the image of the signature as
well as the way it has been produced coincide with the stored
information. Other authentication systems include finger print
Consumer electronics: Many TV sets, multimedia
phones, and game consoles comprise high
performance processors and memory systems. They
represent special cases of embedded systems.
Fabrication equipment: Safety is very important
for such systems, the energy consumption is less a
problem.

Robotics: Robotics is also a traditional area in which


embedded systems have been used.
owing importance of embedded systems
79% of all the processors are used in embedded
systems . Many of the embedded processors are 8-bit
processors, but despite this, 75% of all 32-bit
processors
Accordingaretointegrated into embedded systems.
quite a number of forecasts, the
embedded system market will soon be much larger
than
The the marketnumber
growing for PC-like systems. Also,
of applications the amount
results in the
of software
need usedtechnologies
for design in embeddedsupporting
systems isthe
expected
design to
of
increase. systems. Currently available technologies
embedded
and tools still have important limitations. For example,
there is still a need for better specification languages,
tools generating implementations from specifications,
timing verifiers, real-time operating systems, low-
power design techniques, and design techniques for
dependable systems. This course should help teaching
the essential issues and should be a stepping stone for
EMBEDDED SYSTEM DESIGN PROCESS:
This section provides an overview of the embedded system design
process. First, it will give us an introduction to the various steps in
embedded
The below system design
Figure summarizes the major steps in the embedded
system design process. In this top–down view, we start with the
system requirements

Fig: Major levels of


abstraction in the
design process
Embedded System
Development
Product Life Cycle • Specifications
• Constraints
• Block diagrams
Analyze Design • Data flow graphs
Requirements
the
Constraints
problem
Development
New requirements
New constraints
• Hardware
Deployment Testing • Software
Done

Analysis (What?) Implementation(Real)


Requirements -> Hardware, Software
Specifications Testing (Works?)
Design (How?) Validation: Correctness
High-Level: Block Diagrams Performance: Efficiency
Engineering: Algorithms, Maintenance (Improve)
Data Structures, Interfacing
Requirements:
Clearly, before we design a system, we must know what we are
designing. The initial stages of the design process capture this
information for use in creating the architecture and components.
We generally proceed in two phases: First, we gather an informal
description from the customers known as requirements, and we
refine the requirements into a specification that contains enough
Requirements may be functional or nonfunctional. We must of
information to begin designing the system architecture.
course capture the basic functions of the embedded system, but
functional description is often not sufficient. Typical nonfunctional
requirements include:
■ Performance:
■ Cost:
■ Physical size and
weight:
■ Power consumption:
Example
Requirements analysis of a GPS moving map
The moving map is a handheld device that displays for the user a
map of the terrain around the user‘s current position; the map
display changes as the user and the map device change position.
The moving map obtains its position from the GPS, a satellite-
based navigation system. The moving map display might look
What requirements might we
something like the following figure.
have for our GPS moving
map? Here is an initial list:

■ Functionality: This
system is designed for
highway driving and similar
uses, not nautical or
aviation uses that require
more specialized databases
and functions. The system
should show major roads
and other landmarks
■ User interface: The screen should have at least 400_600
pixel resolution. The device should be controlled by no more than
three buttons. A menu system should pop up on the screen when
buttons
■ are pressed
Performance: The to allow
map the scroll
should user smoothly.
to make selections to
Upon power-
control
up, the system.
a display should take no more than one second to appear,
and the system should be able to verify its position and display
the current map within 15 s.
■ Cost: The selling cost (street price) of the unit should be no
more than $100.
■ Physical size and weight: The device should fit comfortably
in the palm of the hand.
Note that many of these requirements are not specified in
■Power consumption: The device should run for at least eight
engineering units—for example, physical size is measured
hours on four AA batteries.
relative to a hand, not in centimeters. Although these
requirements must ultimately be translated into something that
can be used by the designers, keeping a record of what the
customer wants can help to resolve questions about the
specification that may crop up later during design. Based on this
discussion, let‘s write a requirements chart for our moving map
system:
GPS MODULE:

REQUIREMENTS FORM OF GPS MOVING MAP MODULE:


Name : GPS moving map
Purpose: Consumer-grade moving map for driving use
Inputs : Power button, two control buttons
Outputs : Back-lit LCD display 400 _ 600
Functions : Uses 5-receiver GPS system; three user-selectable
resolutions; always displays current latitude and longitude
Performance: Updates screen within 0.25 seconds upon
movement
Manufacturing cost:$30
Power: 100mW
Physical size and weight: No more than 2” _ 6, ” 12 ounces
Specification
The specification is more precise—it serves as the contract
between the customer and the architects. As such, the
specification must be carefully written so that it accurately
reflects the customer’s requirements and does so in a way that
can be clearly followed during design. The specification should be
understandable enough so that someone can verify that it meets
system requirements and overall expectations of the customer.

A specification of the GPS system would include several


components:
▪ Data received from the GPS satellite constellation.
▪ Map data.
▪ User interface.
▪ Operations that must be performed to satisfy customer
requests.
▪ Background actions required to keep the system running,
such as operating the GPS receiver.
Architecture Design
The specification does not say how the system does things, only
what the system does. Describing how the system implements
those functions is the purpose of the architecture. The
architecture is a plan for the overall structure of the system that
will be used later to design the components that make up the
architecture. The creation of the architecture is the first phase of
what many designers think of as design. This block diagram is still
quite abstract—we have not yet specified which operations will be
performed by software running on a CPU, what will be done by
special-purpose hardware, and so on. The diagram does, however,
go a long way toward describing how to implement the functions
described in the specification. We clearly see, for example, that
we need to search the topographic database and to render (i.e.,
draw) the results for the display. We have chosen to separate
those functions so that we can potentially do them in parallel—
performing rendering separately from searching the database
may help us update the screen more fluidly.

FIG: BLOCK DIAGRAM FOR THE


MOVING MAP
The hardware block diagram clearly shows that we have one
central CPU surrounded by memory and I/O devices. In particular,
we have chosen to use two memories: a frame buffer for the pixels
to be displayed and a separate program/data memory for general
use by the CPU. The software block diagram fairly closely follows
the system block diagram, but we have added a timer to control
when we read the buttons on the user interface and render data
onto the screen. To have a truly complete architectural description,
we require more detail, such as where units in the software block
diagram will be executed in the hardware block diagram and when
operations will be performed in time.

Fig : Hardware and software architectures


for the moving map.
The architectural description tells us what components we need.
The component design effort builds those components in
conformance to the architecture and specification. The
components will in general include both hardware—FPGAs,
boards, and so on—and software modules. Some of the
components will be ready-made. The CPU, for example, will be a
standard component in almost all cases, as will memory chips and
many other components .In the moving map, the GPS receiver is
a good example of a specialized component that will nonetheless
System Integration:
be a predesigned, standard component. We can also make use of
Only aftersoftware
standard the components
modules.are built do we have the satisfaction of
putting them together and seeing a working system. Of course,
this phase usually consists of a lot more than just plugging
everything together and standing back. Bugs are typically found
during system integration, and good planning can help us find the
bugs quickly. By building up the system in phases and running
properly chosen tests, we can often find bugs more easily. If we
debug only a few modules at a time, we are more likely to uncover
the simple bugs and able to easily recognize them. Only by fixing
the simple bugs early will we be able to uncover the more
complex or obscure bugs that can be identified only by giving the
Data Flow Graph
A data flow-graph showing how the position
signal passes through the system
Position Measurement System
• Rectangles represent h/w components and
Ovals represent s/w modules
• Data flow-graphs give a high-level design of
the system showing the flow of “information”
Position Voltage Sample
0 to 2 cm 0 to +3.3V 0 to 4095
Sample
Position ADC ADC 0 to 4095
Sensor hardware driver
SysTick
ISR
SysTick
hardware Mailbox

LCD main
LCD
display driver Fixed-point
0 to 2.000
The Fork-Join construct is used in Parallel programming.
Structured Programming
This is different from multi-threading used in concurrent
(Distributed) programming. In multi-threading there may
be multiple threads that are active but at any given
instant only one of them is being executed.
 Common Constructs (as Flowcharts)
Sequence Conditional While-loop

Block 1

Block 1 Block 2 Block


Block 2

Parallel Distributed Interrupt-driven concurrent


Fork main Trigger
main1 main2 interrupt

Init1 Init2 Init

Join Body1 Body2 Body


Return from
interrupt
Flowchart
Toaster oven:

main Cook

Output heat
Input from is on
switch Too cold

Not pressed Input toast


Start temperature
Pressed
toast < desired
Cook toast desired
Output heat
is off

return

Coding in assembly and/or high-level language (C)


Flowchart
 Example 1.3. Design a flowchart for a system that performs two independent tasks.
The first task is to output a 20 kHz square wave on PORTA in real time (period is 50
ms). The second task is to read a value from PORTB, divide the value by 4, add 12,
and output the result on PORTD. This second task is repeated over and over.

main A
void SysTick_Handler(void){
Input n from B Clock PORTA = PORTA^0x01; E
< } >
PORTB
PORTA = E void main(void){ A
PORTA^1 unsigned long n;
n = (n/4)+12 C while(1){
> n = PORTB; B
n = (n/4)+12; C
PORTD = n; D
Output n to }
PORTD D
}
< : Hardware Interrupt causing the main program to be suspended and the corresponding ISR
to execute
> : Return from Interrupt causing the control to be returned to the point where the main
program was suspended.

The execution sequence of this simple system might be something like:


ABCDB<E>CDBC<E>DBCD<E>BCD…

We say this code is multi-threaded because we have two threads: The foreground thread
computes the primes and the background thread issues a pulse. They are both active at the
same time.
Embedded systems are special, offering special
challenges to developers. Most embedded software
engineers develop a toolkit for dealing with the
constraints. Before we can start building yours, let's
look at the difficulties associated with developing an
embedded system. Once you become familiar with
how your embedded system might be limited, we'll
start on some principles to guide us to better solutions.
Debugging
Embedded systems aren't like that. In addition to a
cross compiler, you'll need a cross debugger. The
debugger sits on your computer and communicates
with the target processor through the special processor
interface. The interface is dedicated to letting
someone else eavesdrop on the processor as it works.
This interface is often called JTAG (pronounced "jay-
tag"), whether it actually implements that widespread
standard or not.
Writing software for an embedded system can be
tricky, as you have to balance the needs of the system
and the constraints of the hardware. Now you'll need
to add another item to your to-do list: making the
software debuggable in a somewhat hostile
environment.
SW Development
Environment
Editor Keil uVision TM ®
Simulated
Source code Processor
Start Microcontroller
Start
; direction register Debug
LDR R1,=GPIO_PORTD_DIR_R Session Memory
LDR R0,[R1]
ORR R0,R0,#0x0F
; make PD3-0 output I/O
STR R0, [R1]

Build Target (F7)

Object code Real Processor


Microcontroller
0x00000142
0x00000144
4912
6808
Download
0x00000146 F040000F Memory
0x0000014A 6008 Start
Debug
Session I/O
Address Data
An embedded system is designed to perform a
specific task, cutting out the resources it doesn't
need to accomplish its mission. The resources under
consideration include:
 Memory (RAM)
 Code space (ROM)
 Processor cycles or speed
 Battery life (or power savings)
 Processor peripherals
Compilers, Languages, and Object-Oriented
Programming
Embedded software compilers often support only C, or C and C+
+. In addition, many embedded C++ compilers implement only a
subset of the language (commonly, multiple inheritance,
exceptions, and templates are missing). There is a growing
popularity for Java, but the memory management inherent to the
language works only on a larger system.

Taken as a whole, an embedded system can be considered


equivalent to an object, particularly one that works in a larger
Burger
Burglaralarm
alarm system
system hardware
hardware
8051 Chip
,
+ 5 volts

10 kOhms

P3.0 P1.0 a a
P3.1 P1.1 b
f b
P3.2 P1.2 c g

PORT 1 (P1)
PORT 3 (P3)
P3.3 P1.3 d
c
P3.4 P1.4 e e

.5 P1.5 f
d
.6 P1.6 g

.7 P1.7
+ volts

Internal Memory

7 6 5 4 3 2 1 0

SFRs
Zone
Zone
Zone
Zone

B0h
1
2
3
4

90h

I-RAM
Input circuit , Output circuit ,
+ 5 volts a

f b
g

input x e c

d
normally closed
Switches are

e.g. 200 Ohm


a

If any switch is opened Internal circuit within 7-segment


Input x goes high to indicate an display device. (Common cathode
alarm condition i.e. +5v input causes LED to light)
Burger alarm Flow chart
,
Initialise I/O
ports P1 and P3

Read port P3

YES
Are all
P3 inputs at 0

NO

Sound alarm
Bell
ALARM_1 Program source code

ORG 0000h ; define memory start address 000


; Initialise the I/O ports
MOV P3, #0ffh ; write all ones to P3 to use as an input port
MOV P1, #00 ; all zeros to put P1 in a known output state
POLL:
MOV A, P3 ; read P3 to accumulator
CJNE A, #00h, ALARM ; if not all zeros then jump to
ALARM
LJMP POLL ; else loop back to POLL
ALARM:
SETB P1.7 ; enable the BELL by setting P1.7
high
END_LOOP:
LJMP END_LOOP ; program just loops around here
END ; end of program

You might also like