Week 1 Introduction to Embedded System
Week 1 Introduction to Embedded System
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
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.
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.
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
• Mobile Devices
16
Stand alone Embedded
Systems
17
Real time Embedded Systems
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.
• 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 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…
23
Embedded Systems Applications
24
Embedded Systems Applications
25
Embedded Systems Applications
26
Embedded Systems Applications
27
Embedded Systems Applications
28
Mobile Devices
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
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
36
Address Bus
• The more address buses available, the larger the number of devices that
can be addressed
• 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
37
CPU’s Relation to RAM & ROM
• RAM stores information that is not permanent and can change with
time
• Registers
• The CPU uses registers to store information temporarily
• Values to be processed
• Address of value to be fetched from memory
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
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
•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
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
• 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)
57