Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
15 views

Week 1 Introduction to Embedded System

Embedded system course

Uploaded by

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

Week 1 Introduction to Embedded System

Embedded system course

Uploaded by

umer shahbaz
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 57

Week 1

Introduction of Embedded
System

1
Introduction

Outline
 Class and Course Introduction
Embedded System Design
 Embedded System Architecture
 Embedded System Classification
 Application
 Important Terminology of Data
Size
 Internal Organization of Computers
 ELEMENTS OF EMBEDDED
SYSTEMS
 Text Book 2
Your
Responsibilities

As a Student
 Attend classes regularly – No Attendance shortage issue
 Ask questions if you have any queries regarding course material or

anything
 Submit assignments on time

 Don’t miss quizzes, assignments, mid term and final examinations – Can

get
good result 
 No Plagiarism is allowed in any sort of a written material – Write in

your own words

3
Course Policy
Assignments
 Assignments are due at the beginning of class
 Late assignments will not be accepted
 All works have to be done independently except in case of group assignments
 Students handing in similar assignments will receive a grade of 0 (ZERO) and
face possible disciplinary actions

Mobile Phones
 Cell phones are restricted during class. Cell phones must be turned off during
the lecture. If your cell phone rings during the class, you may be asked to leave

4
Course
Policy
Attendance
 Students are expected to attend all classes
 If a student misses 10 classes or 10 hours in total without an acceptable reason,
the student will not allowed to appear in the final exams
Code of Conduct
 The assignments, quizzes and exams need to be done individually. Copying of
another student's work or code, even if changes are subsequently made, is
inappropriate, and such work or code will not be accepted

5
INTRODUCTION TO
EMBEDDED
SYSTEMS

6
What is an Embedded
System?
• An embedded system is one that has computer hardware with
software embedded in it as one of its components.
Or
• We can define an embedded system as “A microprocessor based
system that does not look like a computer”.
Or
• We can say that it is “A combination of computer hardware and
software, and perhaps additional mechanical or other parts, designed
to perform a dedicated function. In some cases, embedded systems
are part of a larger system or product, as is the case of an antilock
braking system in a car ”.
• An embedded system is a special-purpose computer system
designed to perform certain dedicated functions. It is usually
embedded as part of a complete device including hardware and
mechanical parts.
7
Significance
• Due to their compact size, low cost and simple
design aspects made embedded systems very
popular and encroached into human lives and have
become indispensable.

• They are found everywhere from kitchen ware to


space craft. To emphasize this idea here are some
illustrations.

8
Embedded Systems
Everywhere
Embedded systems span all aspects of modern life and there are
many examples of their use.
• Biomedical Instrumentation – ECG Recorder, Blood cell
recorder, patient monitor system
• Communication systems – pagers, cellular phones, cable TV
terminals, fax and transreceivers, video games and so on.
• Peripheral controllers of a computer – Keyboard controller,
DRAM controller, DMA controller, Printer controller, LAN
controller, disk drive controller.
• Industrial Instrumentation – Process controller, DC motor
controller, robotic systems, CNC machine controller, close
loop engine controller, industrial moisture recorder cum
controller.
• Scientific Instruments – DMM, digital storage system, CRT
display, Spectrum Analyzer. 9
Were the Embedded
Systems Existing Earlier ?
• Yes, We have been enjoying the grace of embedded system
quite a long time. But they were not so popular because in
those days most of the embedded systems were designed
around a microprocessor unlike today’s systems which were
built around a microcontroller.

• As we know a microprocessor by itself do not possess any


memory, ports etc. So everything must be connected
externally by using peripherals like 8255, 8257, 8259 etc.

• So the embedded system designed using microprocessor was


not only complicated in design but also large in size. At the
same time the speed of microprocessor is also a limitation for
high end applications.
10
Why a Microcontroller ?
• A microcontroller is a single silicon chip with memory and all Input /
Output peripherals on it. Hence a microcontroller is also popularly
known as a single chip computer.
• Normally, a single microcontroller has the following features :
• Arithmetic and Logic Unit
• Memory for Storing Program
• EEPROM for Nonvolatile Data Storage
• RAM for storing variables and special function registers
• Input / Output ports
• Timers and Counters
• Analog to Digital converter
• Circuits for reset, Power up, Serial programming, Debugging
• Instruction decoder, Timing and Control unit

• Serial Communication port


• So, its no wonder to say that the Microcontroller is the most wanted
device for designing an efficient Embedded System. 11
What is inside an
Embedded System ?
• Every embedded system consists of custom-built hardware around a Central
Processing Unit (CPU). This hardware also contains memory chips onto which
the software is loaded. The software residing on the memory chip is also called
the ‘Firmware’.
• The operating system runs above the hardware, and the application software
runs above the operating system. The same architecture is applicable to any
computer including a desktop computer. However, there are significant
differences. It is not compulsory to have an operating system in every
embedded system.
• For small appliances such as remote control units, air-conditioners, toys etc.,
there is no need for an operating system and we can write only the software
specific to that application. For applications involving complex processing, it is
advisable to have an operating system.
• In such a case, you need to integrate the application software with the
operating system and then transfer the entire software on to the memory chip.
Once the software is transferred to the memory chip, the software will continue
to run for a long time and you don’t need to reload new software .

12
Layered Architecture of an Embedded System
13
Hardware Architecture of an
Embedded System

14
Features of an Embedded
system
Embedded systems do a very specific task, they cannot be programmed to do
different
things:
• Embedded systems have very limited resources, particularly the memory.
Generally, they do not have secondary storage devices such as the memory card or
CDROM.
• Embedded systems have to work against some deadlines. A specific job has to be
completed within a specific time. In some embedded systems, called Real Time
Systems, the deadlines are stringent. Missing a dead line may cause a catastrophe
– loss of life or damage to property.
• Embedded systems are constrained for power, As many embedded systems operate
through a battery, the power consumption has to be very low.
• Embedded systems need to be highly reliable. Once in a while, pressing ALT-CTRL-
DEL is OK on your desktop, but you cannot afford to reset your embedded system.
• Some embedded systems have to operate in extreme environmental conditions
such as very high temperatures and humidity.
• Embedded systems that address the consumer market (for example electronic toys)
are very cost-effective. Even a reduction of Rs.10 is lot of cost saving, because
thousands or millions systems may be sold.
• Unlike desktop computers in which the hardware platform is dominated by Intel and
the operating system is dominated by Microsoft, there is a wide variety of
processors and operating systems for the embedded systems. So, choosing 15 the
right platform is the most complex task .
Classification of Embedded
Systems

Based on functionality and performance requirements,


embedded systems classified as :

• Stand alone Embedded Systems

• Real time Embedded Systems

• Networked Information Appliances/Systems

• Mobile Devices

16
Stand alone Embedded
Systems

• As the name implies, stand-alone systems work in stand alone


mode. They take inputs, process them and produce the desired
output.

• The input can be electrical signals from transducers or commands


from a human being such as the pressing of a button.

• The output can be electrical signals to drive another system, an


LED display or LCD display for displaying of information to the
users.

• Embedded systems used in process control, automobiles,


consumer electronic items etc. fall into this category.

17
Real time Embedded Systems

• Embedded systems in which some specific work has to be done in a


specific time period are called real-time systems.

• For example, consider a system that has to open a valve within 30


milliseconds when the humidity crosses a particular threshold. If the
valve is not opened within 30 milliseconds, a catastrophe may occur.
Such systems with strict deadlines are called hard real time
systems.

• In some embedded systems, deadlines are imposed, but not adhering


to them once in a while may not lead to a catastrophe. For example,
consider a DVD player. Suppose, you give a command to the DVD
player from a remote control, and there is a delay of a few
milliseconds in executing that command. But, this delay won’t lead
to a serious implication. Such systems are called soft real time
systems .
18
• Must be able to respond
predictably and in a known
amount of time

• Environment cannot wait for


microcontroller to respond.

19
Networked Information
Appliances
• Embedded systems that are provided with network interfaces
and accessed by networks such as Local Area Network or the
Internet are called networked information appliances.

• Such embedded systems are connected to a network, typically


a network running TCP/IP (Transmission Control
Protocol/Internet Protocol) protocol suite, such as the Internet
or a company’s Intranet.

• These systems have emerged in recent years.

• These systems run the protocol TCP/IP stack and get connected
through Ethernet to network and communicate with other
nodes in the network.
20
Cont…
Here are some examples of such systems

• A networked process control system consists of a number of


embedded systems connected as a local area network. Each
embedded system can send real-time data to a central location from
where the entire process control system can be monitored. The
monitoring can be done using a web browser such as the Internet
Explorer

• A web camera can be connected to the Internet. The web camera can
send pictures in real-time to any computer connected to the Internet.
In such a case, the web camera has to run the HTTP server software in
addition to the TCP/IP protocol stack.

• The door lock of your home can be a small embedded system with
TCP/IP and HTTP server software running on it. When your children
stand in front of the door lock after they return from school, the web
camera in the door-lock will send an alert to your desktop over the
Internet and then you can open the door lock through a click of the
mouse.

21
Cont…

• A weather monitoring system connected to the Internet. TCP/IP


protocol suite and HTTP web server software will be running on
this system. Any computer connected to the Internet can
access this system to obtain real-time weather information.

• The networked information appliances need to run the


complete TCP/IP protocol stack including the application layer
protocols. If the appliance has to provide information over the
Internet, HTTP web server software also needs to run on the
system.
22
Embedded Systems Applications

23
Embedded Systems Applications

24
Embedded Systems Applications

25
Embedded Systems Applications

26
Embedded Systems Applications

27
Embedded Systems Applications

28
Mobile Devices

• Mobile devices such as mobile phones, Personal Digital Assistants (PDAs),


smart phones etc. are a special category of embedded systems. Though the
PDAs do many general purpose tasks, they need to be designed just like the
‘conventional’ embedded systems.
• The limitations of the mobile devices – memory constraints, small size, lack
of good user interfaces such as full fledged keyboard and display etc. are
same as those found in the embedded systems discussed above. Hence,
mobile devices are considered as embedded systems.
• However, the PDAs are now capable of supporting general purpose
application software such as word processors, games, etc.

29
Languages for Programming
Embedded Systems
• Assembly language was the pioneer for programming embedded systems
till recently. Nowadays there are many more languages to program these
systems. Some of the languages are C, C++, and Java together with its new
enhancement J2ME.
• The majority of software for embedded systems is still done in C language.
• C++ is also increasing its presence in embedded systems. As C++ is based
on C language, thus providing programmer the object oriented
methodologies to reap the benefits of such an approach.
• C is very close to assembly programming and it allows very easy access to
underlying hardware. A huge number of high quality compilers and
debugging tools are available for the C language.

30
Cont…
• Though C++ is theoretically more efficient than C, but some of its compilers
have bugs due to the huge size of the language. These compilers may cause
a buggy execution.

• C language can definitely claim to have more mature compilers then C++.
Now in order to avail the extra benefits of C++ and plus to avoid buggy
execution, experts are doing efforts to identify a subset of C++ that can be
used in embedded systems and this subset is called Embedded C++ .

31
Important Terminology of Data Size

• The unit of data size


Bit : A binary digit that can have the value 0 or 1
Byte : 8 bits
Nibble : Half of a byte, or 4 bits
Word : Two bytes, or 16 bits
• The terms used to describe amounts of memory in IBM PCs and
compatibles
Kilobyte (K) : 210 bytes
Megabyte (M) : 220 bytes, over 1 million
Gigabyte (G): 230 bytes, over 1 billion
Terabyte (T) : 240 bytes, over 1 trillions
32
Internal Organization of Computers

CPU (Central Processing Unit)


• Execute information stored in memory
I/O (Input/output) devices
• Provide a means of communicating with CPU
Memory
• RAM (Random Access Memory)
• Temporary storage of programs that computer is running
• The data is lost when computer is off
• ROM (Read Only Memory)
• Contains programs and information essential to operation of the computer
• The information cannot be changed by use and is not lost when power is of
• It is called nonvolatile memory 33
Cont…

Address Buses

Central Peripherals
Processing Memory
(Monitor, Printer,
Unit (CPU) (RAM & ROM) etc)

Data Buses

34
Cont…
•For a device (memory or I/O) to be recognized by the CPU, it must be assigned an
ddress.
•The address assigned to a given device must be unique.
•The CPU puts the address on the address bus, and the decoding circuitry finds the
device

The CPU is connected to memory and I/O through strip


of wire called a “ bus ”, It carries information from place
to place
Address Bus

RAM ROM Printer Disk Monitor Keyboard


CPU

Read Data Bus


/ Write
Control Bus
Provides read or write signals to the
The CPU either gets data from the device or device to indicate if the CPU is asking
35
sends data to it for information or sending it
information
Data Bus
• The more data buses available, the better the CPU
• Think of data buses as highway lanes
• More data buses mean a more expensive CPU and
computer
• The average size of data buses in CPUs varies between 8 and 64
• Data buses are bidirectional
• To receive or send data
• The processing power of a computer is related to
the size of its buses.

36
Address Bus

• The more address buses available, the larger the number of devices that
can be addressed

• The number of locations with which a CPU can communicate is always


equal to 2x, where x is the address lines, regardless of the size of the data
bus

• For example a CPU with 24 address lines and 16 data lines can provide a total of
224 or 16M bytes of addressable memory
• Each location can have a maximum of 1 byte of data, since all general-purpose
CPUs are byte addressable

• The address bus is unidirectional

37
CPU’s Relation to RAM & ROM

• The data must be stored in RAM or ROM, which are referred to as


primary memory

• ROM provides information that is fixed and permanent


• Tables or initialization program

• RAM stores information that is not permanent and can change with
time

• Various versions of OS and application packages


• CPU gets information to be processed
• first form RAM (or ROM)
• if it is not there, then seeks it from a mass storage device, called secondary
memory, and transfers the information to RAM
38
Inside CPU’s

• Registers
• The CPU uses registers to store information temporarily
• Values to be processed
• Address of value to be fetched from memory

• In general, the more and bigger the registers, the better


the CPU
• Registers can be 8-, 16-, 32-, or 64-bit
• The disadvantage of more and bigger registers is the increased
cost of such a CPU
39
ELEMENTS OF EMBEDDED
SYSTEMS

• 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.

40
Embedded System

41
Embedded system

• Embedded systems are basically designed to regulate a physical variable (such Microwave Oven) or to manipulate the state
of some devices by sending some signals to the actuators or devices connected to the output port system (such as
temperature in Air Conditioner), in response to the input signal provided by the end users or sensors which are connected
to the input ports.

• The control is achieved by processing the information coming from the sensors and user interfaces and controlling some
actuators that regulate the physical variable.
• Keyboards, push button, switches, etc. are Examples of common user interface input devices and LEDs, LCDs,
Piezoelectric buzzers, etc
• Some embedded systems do not require any manual intervention for their operation. They automatically sense the input
parameters from real world through sensors which are connected at input port. The sensor information is passed to the
processor after signal conditioning and digitization. The core of the system performs some predefined operations on input
data with the help of embedded firmware in the system and sends some actuating signals to the actuator connect connected
to the output port of the system
• The memory of the system is responsible for holding the code (control algorithm and other important configuration
details).

42
The Core of the Embedded
Systems
The core of the embedded system falls into any one of the following
categories.
•General Purpose and Domain Specific Processors
o Microprocessors
o Microcontrollers
o Digital Signal Processors

•Programmable Logic Devices (PLDs)

• Application Specific Integrated Circuits (ASICs)

• Commercial off the shelf Components (COTS) 43


GENERAL PURPOSE AND
DOMAIN SPECIFIC
PROCESSOR
• Almost 80% of the embedded systems are processor/
controller based.

• The processor may be microprocessor or a microcontroller


or digital signal processor, depending on the domain and
application.

44
Microprocessor:
• A silicon chip representing a Central Processing Unit (CPU), which is
capable of performing arithmetic as well as logical operations
according to a pre-defined set of Instructions, which is specific to the
manufacturer
• In general the CPU contains the Arithmetic and Logic Unit (ALU),
Control Unit and Working registers
• Microprocessor is a dependent unit and it requires the combination of
other hardware like Memory, Timer Unit, and Interrupt Controller etc
for proper functioning.
• Intel claims the credit for developing the first Microprocessor unit
Intel 4004, a 4 bit processor which was released in Nov 1971

45
•Points to the address of the next instruction to be executed
•As each instruction is executed, the program counter is

Cont… incremented to point to the address of the next instruction to be


executed

•Interprets the
instruction
fetched into
the CPU
•A CPU capable
of
understanding
more
Performs arithmetic instructions
functions such as add, requires more
subtract, multiply, and transistors to
divide, and logic functions design
such as AND, OR, and 46
NOT
Microcontroller

• A highly integrated silicon chip containing a CPU, scratch pad RAM, Special and
General purpose Register Arrays, On Chip ROM/FLASH memory for program
storage, Timer and Interrupt control units and dedicated I/O ports
• Microcontrollers can be considered as a super set of Microprocessors
• Microcontroller can be general purpose (like Intel 8051, designed for generic
applications and domains) or application specific (Like Automotive AVR from
Atmel Corporation. Designed specifically for automotive applications)
• Since a microcontroller contains all the necessary functional blocks for independent
working, they found greater place in the embedded domain in place of
microprocessors
• Microcontrollers are cheap, cost effective and are readily available in the market
• Texas Instruments TMS 1000 is considered as the world‟s first microcontroller

47
Microcontroller
Architecture

48
Microprocessor Vs
Microcontroller:

49
Digital Signal Processors
(DSPs):

• Powerful special purpose 8/16/32 bit microprocessors designed specifically to meet the computational demands
and power constraints of today's embedded audio, video, and communications applications
• Digital Signal Processors are 2 to 3 times faster than the general purpose microprocessors in signal processing
applications
• DSPs implement algorithms in hardware which speeds up the execution whereas general purpose processors
implement the algorithm in firmware and the speed of execution depends primarily on the clock for the
processors
• DSP can be viewed as a microchip designed for performing high speed computational operations for
„addition‟, „subtraction‟, „multiplication‟ and „division‟
• A typical Digital Signal Processor incorporates the following key units
• Program Memory

• Data Memory

• Computational Engine

• I/O Unit
• Audio video signal processing, telecommunication and multimedia applications are typical examples where DSP is employed

50
DSP Architecture

51
RISC V/s CISC

ACOE343 - Real-Time Embedded Processor Systems - Frederick University 52


Harvard V/s Von-Neumann
Processor/Controller
Architecture

53
Harvard V/s Von-
Neumann
Processor/Controller
Architecture

54
Application Specific
Integrated Circuit (ASIC):
• A microchip designed to perform a specific or unique application. It is
used as replacement to conventional general purpose logic chips.

• ASIC integrates several functions into a single chip and thereby reduces
the system development cost

• Most of the ASICs are proprietary products. As a single chip, ASIC


consumes very small area in the total system and thereby helps in the
design of smaller systems with high capabilities/functionalities.

• ASICs can be pre-fabricated for a special application or it can be custom


fabricated by using the components from a re-usable „building block‟
library of components for a particular customer application
55
Programmable Logic
Devices (PLDs)

• Logic devices provide specific functions, including device-to-device interfacing, data communication, signal
processing, data display, timing and control operations, and almost every other function a system must
perform.
• Logic devices can be classified into two broad categories - Fixed and Programmable. The circuits in a fixed
logic device are permanent, they perform one function or set of functions - once manufactured, they cannot be
changed
• Programmable logic devices (PLDs) offer customers a wide range of logic capacity, features, speed, and
voltage characteristics - and these devices can be re-configured to perform any number of functions at any
time
• Designers can use inexpensive software tools to quickly develop, simulate, and test their logic designs in PLD
based design. The design can be quickly programmed into a device, and immediately tested in a live circuit
• PLDs are based on re-writable memory technology and the device is reprogrammed to

56
Commercial off the Shelf
Component (COTS)

• A Commercial off-the-shelf (COTS) product is one which is used „as-is‟


• COTS products are designed in such a way to provide easy integration and interoperability with
existing system components
• A COTS component in turn contains a General Purpose Processor (GPP) or Application Specific
Instruction Set Processor (ASIP) or Application Specific Integrated Chip (ASIC)/Application Specific
Standard Product (ASSP) or Programmable Logic Device (PLD)
• The major advantage of using COTS is that they are readily available in the market, cheap and a
developer can cut down his/her development time to a great extend.
• There is no need to design the module yourself and write the firmware .
• Everything will be readily supplied by the COTs manufacturer.
• The major drawback of using COTs component in embedded design is that the manufacturer may
withdraw the product or discontinue the production of the COTs at any time if rapid change in
technology

57

You might also like