Вы находитесь на странице: 1из 125

Prepared by

Lekha Pankaj
Associate Professor in ECE
AWHEC ,Calicut
Module I (15hours)

Introduction to Embedded Systems: Characteristics of Embedded systems,


Categories of Embedded System- Requirements of Embedded Systems,
Challenges and Issues in Embedded Software Development, Role of
processor selection in Embedded System (Microprocessor V/s
Microcontroller),Software embedded into a system-General ideas of
Processor and Memory organization - Processor and memory selection
Interfacing to Memory and I/O devices- Devices and Buses- Device Drivers
and Interrupt Servicing mechanisms- Applications of Embedded Systems in
Consumer Electronics, Control System, Biomedical Systems, Handheld
computers, Communication devices.
Examples in your daily life.
A late model car can have as many as 65+ processors for engine control,
A/C control, cruise control, ABS, audio, etc

More than 30% of the cost of a car is now in electronics

90% of all innovations will be based on electronic systems


Several hundred processors can be involved in the course
of one day for one person !
INTRODUCTION
What is a system?
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.
Embedded systems overview
Computing systems are everywhere
Most of us think of desktop computers
PCs
Laptops
Mainframes
Servers
But theres another type of computing system
Far more common...
What is an Embedded system

An electronic system designed to perform a


specific function using hardware and software.

Unlike a PC ,it performs a limited set of functions


and has a processor and associated software.

The software is usually burned into the ROM of


the processor ,hence called as the firmware
What is an Embedded System
Definition: An Embedded System is one that has computer
hardware with software embedded in it as one of its important
components. Its software embeds in ROM
(Read Only Memory). It does
not need secondary memories
as in a computer

SOFTWARE
PROGRAM
#include <16f876a.h>
#use delay
HARDWARE (clock=20000000)
#byte PORTB=6
main()
{
set_tris_b(0);
portb=255; //decimal
delay_ms(1000);
portb=0x55; //hexadeci
mal
delay_ms(1000);
portb=0b10101010; //binary
What is an Embedded system
An embedded system is one that has computer
hardware with software embedded in it as one of
its most important component.
May be independent system or part of a larger
system.
It has a hardware
It has main application software
It has a real time operating system (RTOS) which
defines the way the system works.
Embedded System contd.
Unique in the sense that the hardware and the
firmware is highly specialized to the application
domain.

Is a system built to perform its duty, completely or


partially independent of human intervention.

Interacts with physical elements in our environment,


viz. controlling and driving a motor, sensing
temperature, etc.
Significance
Due to their compact size, low cost and simple
design aspects embedded systems are very
popular and encroached into human lives and
have become indispensable.
They are found everywhere from kitchen ware to
space craft.
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 program. A small scale embedded system may not need an
RTOS.
What is inside an embedded system ?
Every embedded system consists of custom-built hardware
built 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 fir 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
dont need to reload new software .
Layered architecture of an Embedded System
What makes embedded systems different?
Real-time operation
size
cost
time
reliability
safety
energy
security
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


When running the system continuously in cycles of wait for events, run, stop
and wakeup.
Features (Requirements)
Small set of functions
Designed for low-power dissipation
Has limited memory and limited number of
peripherals.
Applications are not alterable by the user.
Many of them are not accessible directly
Need to be highly reliable.
Need to operate with time constraints
Features (Requirements) 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 CDROM or the floppy disk.

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 the right
platform is the most complex task .
Some common characteristics of embedded
systems
Single-functioned
Executes a single program, repeatedly
Tightly-constrained
Low cost, low power, small, fast, etc.
Reactive and real-time
Continually reacts to changes in the systems
environment
Must compute certain results in real-time without delay
Characteristics

Real time and multirate operations define the ways


in which the system works, reacts to events,
interrupts and schedules the systems functioning
in real time
Complex algorithms
Complex graphic user interfaces
Dedicated functions
History of Embedded System
In the earliest years of
computers in 1930 40s,
computers were sometimes
dedicated to a single
purpose task.

One of the first recognizably


modern embedded system
was the Apollo Guidance
Computer, developed by
Charles Stark Draper at the
MIT Instrumentation
Laboratoryin 1960.
History of Embedded System

The Apollo Guidance Computer was the first modern


system to collect and provide flight information, and to
automatically control all of the navigational functions of the
Apollo spacecraft.

At the project's inception, the Apollo guidance computer was


considered the riskiest item in the Apollo project as it
employed the then newly developed monolithic integrated
circuits to reduce the size and weight .
History
Since these early applications in the
1960s, embedded systems have come
down in price and there has been a
dramatic rise in processing power and
functionality.

The first microprocessor for example, the


Intel 4004 was designed for calculators
and other small systems but still required
many external memory and support chips.
History of Embedded Systems
Two engineers in TI (Texas Instruments), Gary Boone and Michael
Cochran, are credited with creating the first microcontroller TMS
1000

It became a commercial product in 1974.

It had ROM, RAM and clock circuitry on the chip along with the
processing unit.
History.
In 1977, Intel emerged in this field with the 8048,
a microcontroller which had RAM and ROM and
which became widely used in PC keyboards.

In 1980, Intel introduced the 8051 MCU which


went on to become the most popular 8 bit
microcontroller.

In 1982 ,Intels 80186 was named the first


embedded processor 8086 arch., timers, DMA
controllers etc
History
By the mid-1980s, most of the
common previously external
system components had been
integrated into the same chip as
the processor and this modern
form of the microcontroller
allowed an even more
widespread use, which by the
end of the decade were the norm
rather than the exception for
almost all electronics devices.
Classification (Catagories)
I. Based on generation

II. Complexity and performance requirements

III. Based on deterministic behavior

IV. Based on triggering


1.Classification based on Generation

First generation:

8 bit microprocessors 8085,Z80


4 bit microcontrollers
Simple h/w and s/w
Assembly code
Digital telephone pads, stepper motor control units
Second Generation:

16 bit microprocessors ,8/16 bit microcontrollers

Powerful and complex instruction set

Introduction of embedded operating systems

Ex. Data Acquisition systems, SCADA


Third Generation:

32 bit microprocessors and 16 bit microcontrollers

DSP processors and ASICs came into picture

Complex instruction set with instruction pipelining

Intel Pentium and Motorola 68000 scored the top

Entry of dedicated real time and general purpose OS

Applications in Robotics, industrial process control,


networking etc
Fourth Generation:

System on Chips (SoC), reconfigurable processors


and multi core processors

High performance ,tight integration and


miniaturization

High performance real time embedded OS

Ex: Smart phones


2. Classification based on Complexity and
performance
Small Scale ES:
8/16 bit microcontrollers
Less H/w and S/w, may be battery operated
C language used
Simple applications
not time critical
low performance and low cost,
usually without OS,
Ex.Electronic toys
2. Classification based on Complexity
and performance

Medium Scale ES

Medium performance, low cost


16/32 bit microcontrollers,DSPs ,RISCs are used
May have general purpose or RTOS
2.Classification based on Complexity and
performance
Large scale (sophisticated ES)

Highly complex h/w and s/w

32/64 bit RISC processors, Reconfigurable SoC,


multicore processors and PLDs

Use high performance RTOS for task schedules


,prioritizing and management
Classification
III. Deterministic system behaviour real time
systems
Hard real time ES
Soft real time ES

IV. Trigger
Event Triggered
Time triggered
Real Time Embedded Systems
A RT Embedded system is designed to meet strict
deadlines
A system is said to be real-time if the total
correctness of an operation depends not only
upon its logical correctness, but also upon the
time in which it is performed

Late results = wrong results


Hard real time ES
Hard real-time systems are used when it is imperative that
an event be reacted to within a strict deadline

A car engine control system is a hard real-time system


because a delayed signal may cause engine failure or
damage.

Medical systems such as heart pacemakers and


industrial process controllers.
Soft Real Time ES
Soft real-time systems are typically used where there is some
issue of concurrent access and the need to keep a number of
connected systems up to date with changing situations

For example software that maintains and updates the


flight plans for commercial airliners. The flight plans
must be kept reasonably current but can operate to a
latency of seconds.

Live audio-video systems are also usually soft real-time;


violation of constraints results in degraded quality, but the
system can continue to operate.
General model of an
embedded system
EMBEDDED SYSTEM HARDWARE
ROLE OF PROCESSOR SELECTION IN AN
EMBEDDED SYSTEM
PROCESSOR
A Processor is the heart of the Embedded System.
It is an IC chip or can be in core form in an Application Specific
Integrated Circuit( ASIC) or System on Chip (SoC)
Core is a part of the functional unit on the VLSI chip

2 Essential units:
Control Unit (CU) fetch unit for fetching instructions from the
memory
Execution Unit (EU) - circuits that implement the instructions
pertaining to data transfer operations and data conversion
The ALU unit
Circuits for halt, interrupt or jump instructions
Types of Embedded Processors
1. General Purpose processor (GPP) instruction set not
specific to application
Microprocessor
Embedded Processor
2. Application Specific Instruction set Processor (ASIP)
instruction set specific to the application
Microcontroller
Embedded Microcontroller
DSP and media processor
Network processor ,IO processor or domain specific programmable
processor
3. Single purpose processors as additional Processors
Co-processors (graphical processing floating point processing encrypting
,DCT and inverse cosine transformation etc)
Accelerators
Controllers ( for peripherals DMAs and buses)
Types of Embedded Processors

4.GPP or ASIP integrated into either ASIC or FPGA


5. Application specific system Processor
6. Multicore Processors or multiprocessor
Criteria for selecting a processor in an Embedded System

Instruction set
Maximum bits in an operand (8/16/32) in a single
arithmetic or logic operation
Clock frequency in MHz and processing speed in
million instructions per second (MIPS)
Dhrystone - metric for measuring processing
performance
Processor ability to solve complex algorithms while
meeting deadlines for their processing
Why (when) to use a GPP
The GPP instruction set results in quick system development
Once the board and IO interfaces are designed for the GPP,
they can be used by a new system by changing the embedded
software in ROM
Ready availability of compiler facilitates embedded software
development in high level languages
Ready availability of well tested and debugged processor
specific APIs (Application Program Interfaces) and codes
previously designed for other applications results in new
systems developed quickly.
MICROPROCESSOR
A microprocessor is a VLSI chip

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 number of serial and
parallel ports.

Any CPU definitely contains


A control unit that fetches and controls the sequential processing of a given
command or instruction and communicates with the rest of the system
An ALU that does arithmetic and logical operations on bytes or words

The latest microprocessors come with caches, floating point arithmetic


units, pipelining and super scaling units that help in faster processing of
instructions
HISTORY OF MICROPROCESSOR
1st Generation (4 bit processors)
4004 and 4040 - 4 bit - in early 1970 by Intel (Integrated Electronics)

2nd Generation (8 bit processors)


8008 and 8080- 8 bit - in 1974 Intel with +5 V Input supply 8080 8085 8 bit

3rd Generation (16 bit processors)


8086 16 bit. Same as 8086, the 8088 introduced 8088 has only 8 bit data bus
(This made it easier to interface to the common 8 bit peripheral devices available
at the time)

Followed by:
The 80186 & 80286 (16 bit processor), the 80386 & 80486 (a 32 bit processor),
leading to the Pentium range of microprocessors (64 bit processors) available
today. The 80x86 and Pentium processors have all been designed for use in
personal computer type applications and have large memory maps.
VARIOUS MICROPROCESSORS
Intel Zilog
4004, 4040
8080, 8085 Z80, Z180, eZ80
8086, 8088, Z8, eZ8
80186, 80188
80286, 80386 and others
x86-64
Motorola

6800
6809
68000
G3, G4, G5

Important microprocessors used in Embedded


systems: ARM,68HCxxx,80x86,SPARC
Advances in microprocessors
The processing speed of microprocessors have advanced
from 4MHz to 4 GHz (present)
Multi core
Pipeline and super scalar architecture
Pipelining means that instructions have 3 to 9 stages.
Different instructions are a t different stages of the pipeline
Superscalar architecture has to or more instruction set
executing in parallel pipelines
Fast ALUs and Floating point Processing units(FLPUs)
MICROCONTROLLER
A microcontroller is a VLSI chip which include an integrated
CPU, memory (a small amount of RAM, program memory, or
both) and peripherals capable of input and output.

Microcontroller is used when a small or part of embedded


software has to be located in the internal memory and when on
chip units like interrupt handler,port,timer,ADC,PWM and
CAN controller are required

Highly suited in Embedded systems for real time applications

Latest microcontrollers have dual core, high computational and


super scaling capabilities.
VARIOUS MICROCONTROLLERS
INTEL
8031,8032,8051,8052,8751,8752
PIC
8-bit PIC16, PIC18,
16-bit DSPIC33 / PIC24,
PIC16C7x
Motorola
MC68HC11

Large scale embedded system microcontrollers: ARM


family,Cortex-M3,Atmel AT91series,Philips -LPC 2000
series, Texas Instrument-TI TMS470R1B1M,Samsung-
S3C44B0X
Microprocessor Vs Microcontroller
MICROPROCESSOR Vs MICROCONTROLLER

MICROPROCESSOR MICROCONTROLLER

It includes functional blocks of


The functional blocks are ALU, registers, microprocessors & in addition has timer,
timing & control units parallel i/o, RAM, EPROM, ADC & DAC

Bit handling instruction is less, One or two Many type of bit handling instruction
type only

Rapid movements of code and data Rapid movements of code and data
between external memory & MP within MC

It is used for designing general purpose They are used for designing application
digital computers system specific dedicated systems
Single Purpose Processors
Co-Processors
FP calculations
Graphical Processor
All calculations regarding images as in gaming,displays from
graphic memory buffers
DIGITAL SIGNAL PROCESSOR
DSP processors are used in applications regarding signal processing
such as image processing, audio, video & telecommunication
processing systems.

It includes the computational capabilities of microprocessor and


multiply & accumulate units (MAC).

It provides fast ,discrete time, signal processing instructions

VLIW ,SIMD processing capabilities to process algorithms like DCT,


IDCT ,filtering, noise cancellation, echo elimination, compressing
and decompressing etc

Examples : TMS320Cxx (TI), SHARC (AD), Motorola 5600xx

03.01.2009 62
ASICs Application Specific
Integrated Circuits
The Application Specific Integrated Circuit is a unique type of IC that is designed with a
certain purpose in mind

An ASIC can no longer be altered after it gets out of the production line. That is why the
designers need to be totally sure of their design, especially when making large quantities of
the same ASIC.

ASICs have a great advantage in terms of recurring costs as very little material is wasted
due to the fixed number of transistors in the design.

Although the recurring cost of an ASIC is quite low, its non-recurring cost is relatively high
and often reaching into the millions
FPGAs
An FPGA (Field Programmable Gate Array) is also a type of IC, but it does not have the
programming built into it during the production. As the name implies, the IC can be
programmed by the user as long as he has the right tools and proper knowledge.

The programmable nature of an FPGA allows the manufacturers to correct mistakes and to
even send out patches or updates after the product has been bought
With an FPGA, a certain number of transistor elements are always wasted as these packages are
standard. This means that the cost of an FPGA is often higher than that of a comparable ASIC.
As you go lower in production numbers, using FPGA actually becomes cheaper than using
ASICs.
Processor technology
Processors vary in their customization for the problem at hand

total = 0
for i = 1 to N loop
total += M[i]
end loop
Desired
functionality

General-purpose Application-specific Single-purpose


processor processor processor
Embedded Processor/Embedded
Microcontroller
An embedded Processor has special features that allows to embedd
multiple process into a system

1.Fast context switching thus lower latencies of the tasks in


complex real time applications.

2. Atomic ALU operations (32/64 bit ) no shared data problem in


operations with larger operands .

3. 32 bit RISC core for fast ,precise and intensive calculations


Design metrics used in ES
Engineering Cost : Initial cost of developing, debugging and
testing the hardware and software. It is a one time non-recurring
cost
Manufacturing cost : Cost of manufacturing each unit.
Flexibility : To produce different and advanced versions of the
design without much engg cost.
Prototype development time: Time taken in days/months for
developing and in-house testing for system functionalities. Includes
engg time and prototype making time.
Time to market: Time taken in days/months after prototype
development to put a product for users and consumers.
System and user safety: in terms of accidental fall, theft,usage of
product etc
Maintenance: changeability and additions to the system
Design metrics used in ES
Power Dissipation: usually battery operated. lesser the power
consumption, lesser is the frequency of battery charging.

Performance :Instruction execution time in the system measures


the performance. Eg. A digital camera shooting a 4M pixel still
image in 0.5 sec shows the camera performance.

Process Deadlines: the time within which each process is required


to finish computations and give results.

User Interfaces : GUI and VUIs

Size : measured in terms of physical space, RAM in kB, Flash


memory in MB or GB for running the software and for data storage,
no. of million logic gates in the hardware .
Challenges
The three Ps
Price
Performance
Power
High Computational capability at highest speed
achieved by lower power dissipating processors at
lower prices.
Optimization of the challenges in embedded
systems
Amount and type of hardware needed:
Optimizing the requirement of microprocessors, RAM,ROM,
flash memory etc in the system based on performance, power
dissipation cost and other design metrics are the challenges
in a system design

Optimizing power Dissipation and Consumption.


Clock rate reduction: P.D reduced by 2.5uW/100 KHz of
reduced clock rate.
Power loss due to heat generation reduces
RF interference between gate reduces as power reduces.
Optimization of the challenges in embedded
systems
Voltage reduction
In hand held devices like mobile phones, CMOS circuitry reduces the
power by one sixth ( 5V to 2 V).Time intervals for recharging the
battery increases by a factor of 6

Wait, Stop and Cache Disable Instructions:


The need to limit power Dissipation while it is ON but in idle state
(The ES cant be made OFF)
Wait and stop instructions are required for power down mode.
The system needs to operate in min. voltage level in idle state
Disable certain units like cache during idle state and also timers and IO
units when not required for a particular S/W execution
Optimization of Challenges in embedded systems
Process deadlines
Meeting the deadline of all processes in the system while
keeping the memory, P.D, processor clock rate and cost at
minimum is a challenge.
Flexibility and upgrade ability
This allows advanced version of a product to be introduced at
minimum engineering cost and overall cost.
Reliability
Designing a reliable product by appropriate design, testing and
thorough verification is a challenge.
Testing: to find errors and validate that the implemented software is as
per the specifications and requirements
Verification : ensures that the specific functions are correctly
implemented
Other hardware units in ES
1.POWER SUPPLY
Most ES have own Power Supply.
PS have following ranges
5.0V +-0.25V
3.3V+-0.3V
2.0V+-0.2V
1.5V+-0.2V
A processor has more than 2 pins of Vdd and Vss to distribute power
evenly in all units and reduces interference between different sections.
Separate power for external I/O driving ports, timers and clock and reset
circuits. Clock should be free form any RF interference.
Separate power interconnections to analog ground, ADC units and other
analog parts of the system.
Low voltage systems are built using LVCMOS gates and
LVTTL gates (3.3,2.5V,1.8V,1.5V)
An ES has to perform tasks continuously from power up
and may also be left in power ON, hence power saving
during execution is impt.
Clever real-time programming by using wait/stop
instructions, disabling power thirsty units like caches,
operating tasks at reduced clock rate etc helps control
power dissipation
2.CLOCK OSCILLATOR CIRCUIT AND CLOCKING UNITS.

Clock controls the clocking requirements of CPU, timers and CPU


machine cycles.
Clock controls execution time of instructions
A highly stable oscillator is required and the processor clock out
signal provides the clock for synchronizing all the system units.
Usually a crystal (ext. to processor) or ceramic resonator (int. to
processor) or ext osc. IC attached to processor.
Crystal gives maximum stability, ext clock osc. has maximum power
dissipation but high driving capacity
3.System Timers and Real-time clocks
The timers/RTCs are used to schedule the various tasks and for
real time programming.
A timer circuit suitably configured is the system-clock.
The RTC generates system interrupts for the schedulers, real
time programs and for periodic saving of time and date in the
system.
The RTC functions as drivers for software timers, produces
software controlled delays and time-outs
4.RESET CIRCUITS,POWER-UP RESET AND
WATCHDOG-TIMER RESET

Reset means the processor starts the processing of instructions


from a starting address (default location)
Reset circuit activates for a few clk cycles and then goes down.
It may be connected to other units like IO/Serial interfaces.
Activation of reset:
Switching on the Reset pin, which activates a reset circuit
By software instruction
Time out by a programmable timer watch dog timer
Clock monitor detecting a slowdown below certain threshold
frequencies due to a fault
5. WATCH DOG TIMER

A timing device that resets the system after a predefined


It is activated after a few clock cycles after power up
Very essential in ES because it rescues the system if fault
develops and the program gets stuck.
On restart the system functions normally
Eg : Failure in temp control system, Robot movement etc.
6.INPUT,OUTPUT,I/O PORTS,IO BUSES AND IO
INTERFACES
Inputs: sensors, transducers
S/m gets inputs from read operation at the port addresses
Outputs: The system sends output bytes to the real world,
by a write operation to the port address
Outputs: LCDs, LEDs, alarms, actuators
I/O ports: both read and write operations are done by the
ports
Eg. Wireless channel of a commn system
Serial and Parallel

Eg of serial ports are UART ,used in modems


6.INPUT,OUTPUT,I/O PORTS,IO BUSES AND IO
INTERFACES
IO interfaces: Mux and Demux interfaces external
systems to the ES
Bus interfaces: networking to other devices and
systems.Ex.I2C,CAN,USB,ISA,EISA and PCI
More hardwares
Interrupt handlers
DAC and ADC
LCD and LED displays
Keyboard
Modems,Tranceviers etc
7.MEMORIES
Internal RAM:256/512 bytes for registers, temp data and
stack
Internal ROM/PROM/EPROM : 4kB/16kB application
program, system booting codes, initialization etc, codes for
RTOS
External RAM: storing variables, data during program
execution, stack
Flash : Storing non-volatile results of processing
Caches:Stores copies of instructions and datas in advance form
ext.mem, temp storing of results.
SOFTWARE EMBEDDED INTO A SYSTEM

ROM image
Final Stage software
After processing the application software,the final result
is placed in the memory (ROM)for all the tasks that have
to be executed
Just as an image is a unique sequence and arrangement of
pixels, ROM image is also a unique placement and
arrangement of bytes for instructions and data
SOFTWARE EMBEDDED INTO A SYSTEM
Final machine software (ROM image)

Bytes at each address defined for creating the ROM


image.
A machine implement able software file is like a table of
address and bytes at each address of the system memory.
By changing this image, the same hardware platform
work differently and can be used for entirely different
applications or for new upgrades of the same system.
1. Machine Language Coding
Programmer defines the addresses and the corresponding
bytes or bits at each address.
Used in configuring some specific physical device or
subsystem like transceiver eg : Gbps or Mbps,using a specific
network protocol/bus protocol.
Machine coding is time consuming because programmer
should study the instruction set and remember the instructions
and their machine codes.
2. Assembly Language Coding

Needed for Invoking Processor Specific Instructions


Requires understanding of the processor and instruction set.
Used in confg. physical devices like ports, ADC, DAC etc
Time consuming hence used in small systems like toys, DAS, robots
etc.
Three steps when using assembly language before finally burned at
the ROM
'Assembler: translates assembly language to machine codes.
'Linker' :links all related codes to the assembly program,eg:delay
codes .Also called .exe file.
2. Assembly Language Coding

Loader: reallocates the codes after finding the addresses


available in RAM
It is a part of the OS and places codes into memory after
reading the .exe file
The loader finds the appropriate start addresses and loads
the program which is ready to run
Locator: Finally the codes are located as ROM image and
permanently placed in ROM
A program called locator reallocates the linked file and
creates a file for permanent location of codes in a standard
format (hex format)
High Level language coding
Programmer needs to
Know only hardware
Organization when coding
In high level language

C,C++, java, Visual C++

Figure shows different


programming layer in an
embedded c program
Converting a C program to ROM
image
The C program has several layers namely
Processor commands
Main function
Tasks and library functions
Interrupt service routines
Kernel and schedulers
Compiler generates the object code
It uses a code optimizer to optimize the codes before linking
Linker links the obj.code with other codes
(ex: printf codes, sqrt codes etc)
EXAMPLES OF EMBEDDED SYSTEMS
Embedded system has applications in various areas like
consumer electronics, communication devices,
biomedical areas, handheld computers, control systems
etc like
Telecom
Smart Cards,
Missiles and Satellites,
Computer Networking,
Digital Consumer Electronics, and
Automobiles
1.Automatic Chocolate Vending Machine
(ACVM)
Functions
ACVM is an ex. Of ES in Consumer Electronics
Enables a child to interact with a system and buy chocolates
Coin insertion slot
Keypad on the top of the machine.
LCD display unit on the top of the machine. It displays menus, text
entered into the ACVM and pictograms, welcome, thank and other
messages.
Graphic interactions with the machine.
Displays time and date
Delivery slot so that child can collect the chocolate and coins, if
refunded.
USB based wire so that owner can know status of the ACVM sales
from remote place
Automatic Chocolate Vending
Machine (ACVM)
ACVM Hardware units
Microcontroller or ASIP (Application Specific Instruction Set
Processor)
RAM for storing temporary variables and stack
ROM for application codes and RTOS codes for scheduling the tasks
Flash memory for storing user preferences, contact data, user
address, user date of birth, user identification code, answers of FAQ
Timer and Interrupt controller
A TCP/IP port (Internet broadband connection) to the ACVM for
remote control and for getting ACVM status reports by owner.
ACVM specific hardware
Power supply
ACVM software components
Keypad input read
Display
Read coins
Deliver chocolate
TCP/IP stack processing
TCP/IP stack communication
SMART CARD Consumer/hand held
Electronics
Smart card a plastic card in ISO standard dimensions, 85.60 mm x
53.98 x 0.80 mm.
Embedded system on a card .
Used as ATM card,Debit/credit bank card,e-purse,ID,medical card
etc
SoC (System-On-Chip).
Silicon chip is just a few mm in size and is concealed in-between the
layers.
Embedded hardware components
Microcontroller or ASIP (Application Specific Instruction Set
Processor)
RAM for temporary variables and stack
ROM for application codes and RTOS codes for scheduling the tasks
EEPROM for storing user data, user address, user Identification codes,
card number and expiry date
Timer and Interrupt controller
A carrier frequency ~16 MHz generating circuit and Amplitude
Shifted Key (ASK) modulator
Interfacing circuit for the I/Os
Charge Pump to deliver power to antennas for Txmn and for system
circuits.
Processor
Microcontroller MC68HC11/PIC16C84/Philips Smart
XA/ASIP processor
8 bit CPUs to 32 bit RISC processor
A security lock for the CPU ,to lock certain sections of
memory (upto 11kB)to prevent access from external
sources
CPU may access using the physical addresses of the
memory, whereas logical addresses are used in the
program.
ROM
8 64kB used
It is activated after a system check
Processor protects a part of ROM from access
Fabrication key: Unique secret key for the card inserted
during fabrication
Personalization key : Inserted after testing on PCB
Preserves the fab.key

Preserves card personalization

RTOS and application codes


RTOS and application using only the logical addresses.

Utilization lock :Prevents modification of 2 PINS, prevents


access to OS and application instructions
EEPROM/Flash
Scalable: only the required part of memory is unlocked
for use (by the authorizer and application)
It stores the following :
PIN Given by authorizer (ex.bank) used to identify the
user ,password options given to user
An unblocking PIN used by authorizer who can unblock
and edit/store the datas of the user
Non-volatile data of user
Card user data like bank name, a/c no. health card no. etc
RAM
Stores temp.data and stack during card operation by
running the OS and application
POWER SUPPLY
Charge pump extracts power from host device and gives a
regulated supply to card chip/memory/IO devices etc
Charge from antenna or clock unit
1.6 to 5.5 V
IO SYSTEM
The chip and host interacts through serial asynchronous
UART
Connection is done by the gold contacts or antennas
( contact less)
WIRELESS COMMUNICATION

Wireless commn is done by the radiations through the


antenna coils for contactless interaction.
In contactless commn.the host and card interacts through
the host modem and card modem
ASK /BPSK is used at data rates of 1Mbps
Embedded Software
Boot-up, Initialisation and OS programs
Smart card secure file system
Connection establishment and termination
Communication with host
Cryptography
Host authentication
Card authentication
Addition parameters or recent new data sent by the host
(for example, present balance left)
MOBILE PHONE Commn device
Hardware Units
System on Chip having the following units:
Microcontroller/ASIP
An ASIP for Encoding ,decoding ,cryptography etc
Another ASIP for voice compression
An ASIC which dials ,modulates, demodulates, keyboard interfaces, touch
screen, LCD graphic displays etc
DSP cores, DSP, Video, Voice and pixel processors
Flash, RAMs, EEPROMs
ADC, DAC, interrupt controller, DMA controller
LCD controller
Battery

MOBILE PHONE BLOCK


Some popular mobile phone processors are OMAP (TI),
Exynos (Samsung),Snapdragon (Qualcomm) ,Ax series (Apple)etc
The central processing block has Microcontroller unit,DSP
unit and memory
RF transceiver has RF modem ,transmitter, synthesizer and
receiver.It uses a low noise amplifier for boosting signals
and an RF antenna for transmitting/receiving.
Power management block takes care of all power related
issues (analog and digital power ) of the device.
Analog baseband block is responsible for dealing with the
analog signals coming from microphone and going to the
speaker
Display units have LEDs,LCDs etc
Peripheral interface have USB ports,audio units etc
MOBILE PHONE
Software Units
System on Chip having the following software development units:
OS (windows mobile, Palm, Symbian, Andriod)
JAVA virtual machine
Memory and file systems
Keypad,LCD,serial,USB,3G or 2G port device drivers for port operations .
SMS message creation and communicator
Mobile imager for uploading pictures and MMS
Mobile browser for access to the web
Downloader for Java games, ring-tones wall papers
Camera
Bluetooth synchronization and WAP connections support

AUTOMOTIVE ELECTRONICS Control


systems
ECU (Electronic control units) - 50 to 100s of them
The ECU has a microcontroller and required
memory(ROM/RAM/Flash)
The OS assigned has to meet hard deadlines to the
applications
Communication between devices is done by CAN
(controller area network) bus.
Egs of ECUs are Electronic Fuel Injection (EFI),Anti-
lock Braking System (ABS),Electronic Stability
control(ESC),Airbag Deployment etc
ABS
Mechanism to prevent skidding due to locking up of wheels
An ABS has a ECU,wheel sensors and Hydraulic Brakes
The wheel sensor informs the ECU about speed of wheels and the
differential speed between wheels
The ABS increases/decreases according to the faster/slower
movement of wheels
After a few accelerations and decelerations all the wheels have
similar speed.
ABS prevents wheel lock-up and gives the driver steering control
even after applying full brake
ABS has lesser braking distance
Airbag Deployment
Airbags are deployed whenever there is an automobile
collision
It makes use of speed sensors (accelerometers, gyroscopic
sensors wheel speed sensors) and impact sensors
Whenever there is a sudden decrease in the speed of
vehicle in a very small amount of time (data obtained
from all sensors),it indicates a collision
The ECU actuates the ignition of a gas generator
propellant (nitrogen) which then inflates a nylon fabric
bag.The airbags are deployed preventing injury.
Airbag Deployment
BRAIN MACHINE INTERFACE-
(Biomedical Application)
BMI is a communication channel between human brain
and external device which translates human thoughts into
corresponding action
It has the following stages
Signal Reading Stage: non invasive and invasive
Non invasive (Electroencephalography/EEG)
Invasive Electrocorticography (ECoG)
Both methods work on spatial resolution(measure of ability
of the reading stage to differentiate between signals from
two very close parts of the brain)
BRAIN MACHINE INTERFACE
Non-invasive and Invasive
methods
BRAIN MACHINE INTERFACE
Amplifier and Filter Stage
The signals obtained are usually very weak and have to be amplified (uV
range to mV range)
Differential amplifiers of gain 1000V/V to 1,00,000V/V is used
The EEG/ECoG are corrupted with noise hence accurate filters with cut-
off frequency 30-70Hz range are used
Analyzing and Decoding the signals
After obtaining the brain signals the decoding section identifies each
wave,what they are meant for and generates the necessary control signals
to realize the action in the end device)
Location of Electrode, Frequency of the wave obtained and signal
strength help in analyzing the human thought
End Device
Robots, Prosthetic Limb a computer cursor etc
Three main phases of robotics
Perception
Processing
Action

Sensors used: Vision, Sound, Tactile sensors


Actuators used :Motors, Video and audio

Types of Robots: Stationary robots, Mobile robots,


Humanoid robots
ROBOTICS
A robot is a mechanical system which has a
sense of purpose. A typical robot
i) can sense its environment
ii) can manipulate things in its environment
iii) has intelligence embedded in it
iv) has motion or translation in one or more axes

A robot uses both open loop/Closed loop control systems


Embedded Intelligence
A mobile robot needs
i) sensors to sense its environment and to move
accordingly
ii) actuators for performing the movement, and the
assigned task
iii) a control algorithm for moving and performing the
intended task
iv) communication systems (optional, depending on the
application)

Вам также может понравиться