Lec.1,2 ES Introduction

Download as pdf or txt
Download as pdf or txt
You are on page 1of 54

AIM413 Embedded Systems

Dr. Shimaa Mohamed


Lecture # 0
Course Overview
Course Objectives
The course aims to:
• The skills and knowledge needed to better understand embedded computing systems
• , structure and classifications.
• the difference between embedded design and general computer design.
• The microcontrollers architectures organization of embedded systems e.g. buses, CPU,
memories and Interrupts.
• Coding in the standard ANSI-C usually well known in the embedded community as ”
Embedded-C “.
• The datasheets for components, modules, and MCUs.
• Complete understanding of all serial port communication protocols (USART, SPI, I2C, and
USB) and creating practical applications.
• Cover the basics of the RTOS (Real Time Operating System) e.g.Task scheduling, RTOS
events.
Course Information
Instructor: Dr. shimaa Mohamed
Lectures: Sunday : 10:20 - 11:50
Location: 6 2 0 2
Office Hours: Sunday : 03:00 - 04:00
T.A.: Eng. Ahmed Khaled & Eng. Aisha
Materials/ • Lectures slides (PDF), available by each lecture, and found online,
Notes: • https://classroom.google.com/c/NzE5OTQzNjE3Njgw?cjc=kckmol2
Class Code: • kckmol2
7
Text book: • Introduction to Embedded Systems, Springer 2014 by Manuel Jiménez ,
Rogelio Palomera and Isidoro Couvertier.
• Embedded Software Development with C, Springer 2009 by Kai Qian,
David den Haring and Li Cao.
Course prerequisites

1. Computer architectures
2. Microprocessor
3. Circuits and electronics basics
4. Minimal knowledge of C-Programming language
Assessments Weight
Assessment Type Percentage
Quiz W9 10%
Midterm W6 20%
Project or assignments W12 10 %
Final Exam W14 60%
Total 100%
Project
• For the course project, embedded system will recieved in teams of five students.
• Projects will consist of a proposal, final report, and short presentation.
• You are encouraged to come up with your own topic for the project, but will be
provided with a list of possible ideas.
• Projects can consist of original research, and/or hardware or software
development related to embedded systems.
• Additional details on the course projects will be provided in a separate
document.
Lecture #1
Introduction to Embedded Systems
Objectives
To understand what is an Embedded System and then define it
Look at embedded systems from a historical point of view
Classify embedded systems
Look at certain applications & purposes of embedded systems
TOPICS TO BE DISCUSSED
Characteristic of ES

1. Definition of Embedded System


2. History of Embedded System
3. Embedded System & General-purpose computer
4. Characteristics of Embedded Systems
5. Classification of Embedded System
6. Application of Embedded System
7. Purpose of Embedded System
What are embedded systems and why
should we care?
A system is a way of working, organizing or doing one or many tasks
according to a fixed plan, program or set of rules.

A system is also an arrangement in which all its units assemble and work
together according to the plan or program.

◼ Systems which use computation to perform a specific function


embedded within a larger device and environment Heterogeneous &
reactive to environment
EMBEDDED SYSTEM Definitions
• Embedded system as its name suggests embedded means something that’s attached to
another thing and an embedded system can be taught of as computer hardware system
having software.
• So, the embedded system is a combination of computer hardware and software designed
for specific function.

• Definition:
➢ ES: an electronic systems containing tightly coupled hardware and software components.

➢ ES: computerized systems that have an embedded computer built within ,without being the
final product a real computer.

➢ ES: is a specific system which is a combination of hardware and software, used to perform a
set of objectives within mechanical and electrical/electronic systems.
HISTORY OF EMBEDDED SYSTEM
● The first recognized embedded system is the Apollo Guidance Computer (AGC) developed by
Charles Stark at the MIT lab.
● AGC was designed on 4K words of ROM & 256 words of RAM.
● The clock frequency of first microchip used in AGC was 1.024 MHz.

● The User Interface of AGC is known as DSKY(display/keyboard) which resembles a


calculator type keypad with an array of numerals.

● The first mass produced embedded system : Autonetics D-17 in the year 1961, it was used as
the guidance computer for the Minuteman-I missile.
● In the year 1971 Intel introduced the world's first microprocessor chip intel 4004, was designed for
use in business calculators.
EMBEDDED SYSTEM
● An embedded system is designed 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 placed.
● The hardware & mechanical components will consist all the physically
visible things that are used for input, output, etc.
● An embedded system will always have a chip (either microprocessor or
microcontroller) that has the code or software which drives the system.
Embedded processor market

◼ Processors strongly affect SW development – keeps their prices high


◼ Only 2% of processors drive PCs!
◼ ARM sells 3x more CPUs than Intel sells Pentiums
◼ 80% of all high-end processors are used in embedded systems
Source: EETimes
Embedded System & General Computer
What is the difference between a general-purpose system and an embedded system?
● If you say a general-purpose system, we can say that laptop or computers are general-purpose
systems. Whereas if you take a printer or a digital camera these are embedded system.
● Now what is the basic difference between these two …?
● General-purpose system means for example a computer it is it can be used to do a lot of
applications like can be used for playing games, watching movies, creating software, work on
documents or spreadsheets etc.
● But embedded systems you can actually use for only a specific task for example washing machine
it can be only used to wash the clothes and drain them you cannot use it for other purpose for
example a printer it can be only used for taking of printouts
● Following are certain specific points of difference between embedded systems and general-purpose
computers:
Embedded Systems Vs General Computing Systems:
Criteria General purpose Computer system Embedded system

Contents It is combination of generic hardware and a general- It is combination of special purpose hardware and
purpose OS for executing a variety of applications embedded OS for executing specific set of applications

Operating System It contains general purpose operating system It may or may not contain operating system.

Applications are programmable by the user. (it is


Applications are non- programmable by the user.
Alterations possible for end user to reinstall the OS and add and
Firmware of ES is preprogramed
remove user applications)

Performance is a key factor on the selection of the Application specific requirements (like performance, power
Key factor
system. requirement, memory usage) are key deciding factors.

Power Consumption More Less

Response Time Response Time are not Critical Critical for some applications
Characteristics of Embedded Systems
Following are some of the characteristics of an embedded system that
make it different from a general-purpose computer:

1. Application and Domain specific


An embedded system is designed for a specific purpose only. It will not do any
other task.
Ex. A washing machine can only wash, it cannot cook

2. Reactive and Real time


Certain Embedded systems are designed to react to the events that occur in the
nearby environment. These events also occur real-time.
Ex. An air conditioner adjusts its mechanical parts as soon as it gets a signal
from its sensors to increase or decrease the temperature when the user operates
it using a remote control.
An embedded system uses Sensors to take inputs and has actuators to bring out
the required functionality.
Characteristics of Embedded Systems
3. Operation in hard environment
Certain embedded systems are designed to operate in harsh environments like very
high temperature of the deserts or very low temperature of the mountains or extreme
rains.
These embedded systems have to be capable of sustaining the environmental
conditions it is designed to operate in.

4. Distributed
Certain embedded systems are part of a larger system and thus form components of a
distributed system.
These components are independent of each other but have to work together for the
larger system to function properly.
Ex. A car has many embedded systems controlled to its dashboard. Each one is an
independent embedded system yet the entire car can be said to function properly only
if all the systems work together.
Characteristics of Embedded Systems
5. Small size and weight
An embedded system that is compact in size and has light weight will be
desirable or more popular than one that is bulky and heavy.
Ex. The cell phones that have the maximum features are popular but also their size
and weight is an important characteristic.

6. Power concerns
It is desirable that the power utilization and heat dissipation of any embedded
system be low. embedded systems also require less power to perform
operations.
If more heat is dissipated, then additional units like cooling fans need to be added
to the circuit.
If more power is required, then a battery of higher power or more batteries need
to be accommodated in the embedded system.

7. Low Manufacturing Cost


As an embedded system design aims for any particular application, it
involves less manufacturing cost as compared to a general computing
system.
Characteristics of Embedded Systems
8. Processor and Memory
Depending on the type, processor and memory requirements may
vary. For instance, small embedded systems would require less
memory, but sophisticated systems demand more memory and run
on multi-core processors.

9. Tight Design Constraint


There are many design constraints to consider around the cost,
performance, size, and power of an embedded system to realize its
absolute performance. These design factors are kept to a minimum
to justify their simple function.

10. Safety-critical
Must not endanger human life and the environment
EMBEDDED SYSTEM
Advantages

Easily Customizable
Low power consumption
Low cost
Enhanced performance
High speed

Disadvantages

High development effort


Larger time to market
Lecture # 2
Classification Of Embedded System
Classification Of
Embedded System
The classification of embedded
system is based on the following
criteria's:
1. On generation
2. On complexity
3. On performance & functional
requirements
4. On Architecture
1. First generation(1G):
❖ The early ES Built around an 8bit microprocessor
& 4bit microcontroller.
❖ Simple in hardware circuit & firmware developed.

1. Classification ❖ Examples: Digital telephone keypads.

based On 2. Second generation(2G):


generation ❖ Built around 16-bit microprocessors (µp) & 8-bit
microcontrollers (µc).
❖ They are more complex & powerful than first µp

&µc.
❖ Examples: Data Acquisition Systems etc.
3. Third generation(3G):

❖ Built around 32-bit µp & 16-bit µc.


❖ Concepts like Digital Signal Processors (DSPs)
, Application Specific Integrated Circuits
1. Classification ❖
(ASICs).
Examples: Robotics, industrial process control,
based On networking, etc.

generation 4. Fourth generation (4G):


❖ Built around 64-bit µp & 32-bit µc.
❖ The concept of System on Chips (SoC), Multicore
Processors evolved.
❖ Highly complex & very powerful.
❖ Examples: Smart Phones.
Small-scale:
➔ Simple applications need
➔ Performance not time-critical.
➔ Built around low performance & low cost 8 or 16 bit µp/µc.
➔ Example: an electronic toy

Medium-scale:
➔ Little complex in hardware & firmware requirement.
2. Classification ➔ Built around medium performance & low cost 16 or 32 bit µp/µc.
based On ➔ Usually contain operating systems.
Examples: Industrial machines.
Complexity

Large-scale:
➔ Highly complex hardware & firmware.
➔ Built around 32 or 64 bit µp/µc or PLDs or Multicore Processors.
➔ It requires complex hardware and software.
➔ These system may contain multiple processors/controllers
➔ Response is time-critical.
➔ Examples: Mission critical applications.
1. SMALL SCALE EMBEDDED SYSTEM :

• These ES designed with a single 8 or 16-bit


microcontroller
• It require less power may even be activated by a
battery.
• They May even be battery operated.

2. Classification • The need to limit power dissipation when system is


running continuously.

based On
• Little hardware and software complexity.
• Programming language assembly or “C” is used for

Complexity
developing these system.
• Programming tools: Editor, Assembler, Cross
Assembler, and compiler
• Small memory
• E.g. automatic tea /coffee vending machine ,
electronic toys
2. MEDIUM SCALE EMBEDDED SYSTEM :

• These types of ES design with Single or few 16 or


32 bit microcontrollers or Digital Signal Processors
(DSP).
• Hardware and software complexity.
• Complex software design (RTOS, ASSP)

2. Classification
• Faster than small scale, better speed.
• Must have an OS

based On
• Programming are language C, C++, JAVA, and
Visual C++.
• Programming tools: RTOS, Source code
Complexity Engineering Tool, Simulator, Debugger and
Integrated Development Environment (IDE).

• E.g. Router, ATM, MUSIC System, Fax machine


3. SOPHISTICATED SCALE EMBEDDED SYSTEM :

• These Enormous hardware and software complexity


• Built around 32 or 64 bit µp/µc or PLDs or Multicore
Processors.

2. Classification
• This type need ASIPs, programming logic arrays
(PLAs), scalable processor or configurable
processor.
based On • Memory requirement, power consumption is high.
• Perform complex function
Complexity • Constrained by
available
the
in
processing speed
their hardware units.
• RTOS
• E.g. mobile system, air conditioner, washing
machine.
Embedded systems are classified into four
categories based on their performance and
functional requirements:
3. Classification 1. Standalone embedded systems
based On 2. Real time embedded systems
Performance 3. Networked embedded systems
4. Mobile embedded systems
1. Stand alone Embedded systems:
● A stand-alone embedded system works by itself. It does
not require any host system like a computer.
● It takes either digital or analog inputs from its input

3. Classification ports and processes, calculates, and converts the data,

based on and outputs the resulting data to its attached output


device, which either displays data, or controls and drives
Performance the attached devices. and gives the resulting data
through the connected device- Which either controls,
drives or displays the connected devices.
● EX: Temperature measurement systems, Video game,
MP3 players, digital cameras, and microwave ovens.
2. Real-time embedded systems:

An ES which gives the required output in a specified time, or


which strictly follows the time deadlines for completion of a task
3. Classification is known as a Real time system.

based on
● A real time embedded system is defined as, a system
which gives a required output in a particular time in
Performance addition to functional correctness, also satisfies the
time constraints.
● There are two types of Real time systems.
(i) Soft real time system
(ii)Hard real time system.
3.
Classification 2. Real-time embedded system
based On (i) Soft real time system
performance ● In these types of embedded systems
time/deadline is not so strictly followed. If
deadline of the task is passed (means the
system didn‘t give result in the defined time)
still result or output is accepted.
● Ex: A Microwave Oven, washing machine, TV
remote etc.
3.
Classification 2. Real-time embedded system
based On (ii)Hard Real-Time system:
● In these types of embedded systems time/deadline of task is strictly
performance followed. Task must be completed in between time frame (defined
time interval) otherwise result/output may not be accepted.
● A Real time system in which the violation of time constraints
will cause critical failure and loss of life or property damage,
or catastrophe is known as a Hard Real time system.
● Examples: Deadline in a rocket control embedded system,
Traffic control system, Delayed alarm during a Gas leakage,
Car airbag control system, Medical usage in health sector:
delayed response in pacemakers, and Failure in RADAR
functioning.
3. Networked embedded systems:

● These types of embedded systems are related to a network to access


the resources. The connected network can be LAN, WAN or the

3. Classification internet. The connection can be any wired or wireless.

based on
● The networked embedded system is the fastest growing area in
embedded systems applications. The embedded web server is such

Performance a system where all embedded devices are connected to a web server
and can be accessed and controlled by any web browser.
● Ex: A home security system is an example of a LAN networked
embedded system where all sensors (e.g. motion detectors, light
sensors, or smoke sensors) are wired and running on the TCP/IP
protocol.
4. Mobile Embedded systems:

3. Classification
• Mobile embedded systems are used in portable
embedded devices.
• The basic limitation of these devices is the limitation of
based on memory and other resources.

Performance • The examples for mobile embedded systems portable


embedded devices like mobile and cellular phones,
digital cameras, MP3 players, PDA (Personal Digital
Assistants).
Embedded systems are classified into
Harvard architecture & Von Neumann
Back in the late 40’s, both of Harvard and
Princeton universities were asked by the
US government to come up with an
architecture for a computer that could be
4. Classification used in military applications.
based On
Architecture
4. Classification based on
Architecture
• Princeton’s computer architecture was named
after their genius mathematician John Von
Neumann, which had a single memory to
store the program instructions as well as data
variables.
• While the Harvard architecture had two
separate memories. ROM for program
instructions and a RAM for data variables.
• The diagram shows you the difference
between those two architectures.
• Harvard architecture is the most common
option for the microcontrollers used in
embedded systems applications.
4. Classification based on Architecture
Harvard Architecture Von-Neumann Architecture
Single shared bus for Instruction and Data
Separate buses for Instruction and Data fetching
fetching
Easier to Pipeline, so high performance can be Low performance Compared to Harvard
achieved Architecture
Comparatively high cost Cheaper

No memory alignment problems Allows self modifying codes


Since data memory and program memory are Since data memory and program memory
stored physically in different locations, no are stored physically in same chip, chances
chances for accidental corruption of program for accidental corruption of program
ES Applications
The application areas and the products in the embedded domain are countless.
Major Application of Embedded Systems
1. Consumer Electronics: Camcorders, Cameras.
2. Household appliances: Washing machine, Refrigerator, , Fridge, Microwave
Oven etc..
3. Automotive industry: Anti-lock braking system(ABS), Engine Control, Ignition
Systems, Automatic Navigation Systems etc..
4. Home automation & security systems: Air conditioners
5. Telecom: Cellular phones, telephone switches, Multimedia Applications etc.
6. Computer peripherals: Printers, scanners.
7. Computer networking systems: Network routers and switches.
8. Healthcare: Different Kinds of Scanners, EEG, ECG machines.
9. Banking & Retail: Automatic teller machines(ATM), point of sales(POS).
10. Card Readers: Barcode, smart card readers.
Applications…
Automotive embedded systems
• today's high-end automobile may
have 100 microprocessors:
• 4-bit microcontroller checks seat
belt;
• microcontrollers run dashboard
devices;
• 16/32-bit microprocessor controls
engine.

Source: ASV UCB


Applications…
◼ Multiple processors networked together (~100), wide variety of CPUs:
 8-bit – door locks, lights, etc; 16-bit – most functions; 32-bit – engine control, airbags
◼ Multiple networks
 Body, engine, telematics, media, safety
◼ 90% of all innovations based on electronic systems
◼ More than 30% of cost is in electronics

© Jakob Engblom, ASV UCB


Purpose of Embedded Systems:
Any 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
Purpose of Embedded Systems…
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 systems, or it may be processed by the system, or it may be deleted
instantly after giving a meaningful representation.
▪ E.g. digital camera
Purpose of Embedded Systems…
2. Data Communication:-

• Embedded Data communication systems are deployed in


applications ranging from complex satellite communication systems to
simple home networking systems

• 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)
• E.g. Network hubs, Routers, switches, Modems etc
Purpose of 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.
• E.g. digital hearing aid
Purpose of Embedded Systems…
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

• Electrocardiogram (ECG) machine for monitoring the


heartbeat of a patient is a typical example for this
• The sensors used in ECG are the different Electrodes connected to the patient's body.
• E.g. ECG machine
Purpose of Embedded Systems…
5. Control:-
• Embedded system with control functionality contains both sensors and
actuators, they are used for imposing control over some variables
according to the changes in input variables

• Sensors are connected to the input port for capturing the changes in environmental variable or
measuring variable.
• Air conditioner contains a room temperature sensing element (sensor) which may be a thermistor
and a handheld unit for setting up (feeding) the desired temperature

• 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
• The air compressor unit acts as the actuator. The compressor is controlled according to the current
room temperature and the desired temperature set by the end user.

• E.g. Air conditioner


Purpose of Embedded Systems…
6. Application Specific User Interface:-

Embedded systems which are designed for a specific application

Contains Application Specific User interface like keypad, bottom and


switches , Display units

Mobile handsets, Control units in industrial applications etc.

E.g. Mobile phone


The summary
1. An embedded system is an electronic/electromechanical system designed to perform a specific function
and is a combination of both hardware and firmware (software).
2. A general-purpose computing system is a combination of generic hardware and general-purpose
operating system for executing a variety of applications, whereas an embedded System is a
combination of special purpose hardware and embedded OS/firmware for executing a specific set of
applications.
3. Apollo Guidance Computer (AGC) is the first recognized modern embedded system and Autonetics D-
17, the guidance computer for the Minuteman-I missile, was the first mass produced embedded system.
4. Embedded systems are designed to serve the purpose of any one or combination of data
collection/storage/representation, data processing, monitoring, control or application specific user
interface.
Embedded Systems on the Web

◼ Berkeley Design technology, Inc.: http://www.bdti.com


◼ EE Times Magazine: http://www.eet.com/
◼ Embedded.com: http://www.embedded.com/
◼ Embedded Systems Tutorial: http://www.learn-c.com/
◼ Collections of embedded systems resources
 http://www.ece.utexas.edu/~bevans/courses/ee382c/resources/
 http://www.ece.utexas.edu/~bevans/courses/realtime/resources.html
Mirjam Nilsson​
mirjam@contoso.com
www.contoso.com

You might also like