Embedded Systems

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

Introduction to Embedded Systems

What is Embedded System?


An Electronic/Electro mechanical system which is designed to perform a specific function
and is a combination of both hardware and firmware (Software)

e.g: Electronic Toys, Mobile Handsets, Washing Machines, Air Conditioners, Automotive
Control Units, Set Top Box, DVD Player etc…

Embedded Systems are:

 Unique in character and behavior

 With specialized hardware and software

Embedded Systems Vs General Computing Systems:


Criteria General Purpose Computing Embedded System
System
Contents A system which is a combination of A system which is a combination of
a generic hardware and a General special purpose hardware and
Purpose Operating System for embedded OS/firmware for
executing a variety of executing a specific set of
applications. applications

OS It contains a general It may or not contain


purpose operating system (GPOS). an operating system for
functioning.

Alterations Applications are alterable by the user. Applications are not-alterable


by the user.

Key factor Performance is key factor. Application specific requirements


are key factors.

Power More Less


Consumption

Response Time Not critical Critical for some applications

Execution Time Need not be deterministic Deterministic for certain types of ES


Classification of Embedded Systems:

 Based on Generation

 Based on Complexity & Performance Requirements

 Based on deterministic behavior

 Based on Triggering

1. Embedded Systems - Classification based on Generation

First Generation: The early embedded systems built around 8-bit microprocessors like
8085 and Z80 and 4-bit microcontrollers
Eg: stepper motor control units, Digital Telephone Keypads etc.

Second Generation: Embedded Systems built around 16-bit microprocessors and 8 or 16-
bit microcontrollers, following the first generation embedded systems
Eg: SCADA, Data Acquisition Systems etc.

Third Generation: Embedded Systems built around high performance 16/32 bit
Microprocessors/controllers, Application Specific Instruction set processors like Digital
Signal Processors (DSPs), and Application Specific Integrated Circuits (ASICs).The
instruction set is complex and powerful.
Eg: Robotics, industrial process control, networking etc.

Fourth Generation: Embedded Systems built around System on Chips (SoCs), Re-
configurable processors and multi core processors. It brings high performance, tight
integration and miniaturization into the embedded device market
Eg: Smart phone devices, MIDs etc.

2. Embedded Systems - Classification based on Complexity & Performance

 Small Scale: The embedded systems built around low performance and low cost 8 or 16
bit microprocessors/ microcontrollers. It is suitable for simple applications and where
performance is not time critical. It may or may not contain OS.

 Medium Scale: Embedded Systems built around medium performance, low cost 16 or 32
bit microprocessors / microcontrollers or DSPs. These are slightly complex in hardware
and firmware. It may contain GPOS/RTOS.


 Large Scale/Complex: Embedded Systems built around high performance 32 or 64 bit
RISC processors/controllers, multi-core processors and Programmable Logic Devices
(PLD). It requires complex hardware and software. These system may contain multiple
processors/controllers and co-units/hardware accelerators for offloading the processing
requirements from the main processor. It contains Real Time OS for scheduling,
prioritization and management.
3. Embedded Systems - Classification Based on deterministic behavior:

It is applicable for Real Time systems. The application/task execution behavior for an
embedded system can be either deterministic or non-deterministic

These are classified in to two types

1. Soft Real time Systems: Missing a deadline may not be critical and can be tolerated to
a certain degree

2. Hard Real time systems: Missing a program/task execution time deadline can have
catastrophic consequences (financial, human loss of life, etc.)

4. Embedded Systems Classification Based on Triggering:

These are classified into two types

1. Event Triggered: Activities within the system (e.g., task run-times) are dynamic and
depend upon occurrence of different events.
2. Time triggered: Activities within the system follow a statically computed schedule
(i.e., they are allocated time slots during which they can take place) and thus by nature
are predictable.

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.
Diagrammatically an embedded system can be represented as follows:

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. Hence the embedded systems can be viewed as a reactive system. The
control is achieved by processing the information coming from the sensors and user interfaces
and controlling some actuators that regulate the physical variable.
FPGA/ASIC/DSP/SoC
Microprocessor/controller Embedded
Firmware

Memory

Communication Interface

System
I/p Ports Core O/p Ports
(Sensors)
(Actuators)

Other supporting
Integrated Circuits &
subsystems

Embedded System

Real World

Keyboards, push button, switches, etc. are Examples of common user interface input devices
and LEDs, LCDs, Piezoelectric buzzers, etc examples for common user interface output
devices for a typical embedded system. The requirement of type of user interface changes
from application to application based on domain.
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). There are two types of memories are used in any
embedded system. Fixed memory (ROM) is used for storing code or program. The user
cannot change the firmware in this type of memory. The most common types of memories
used in embedded systems for control algorithm storage are OTP,
PROM, UVEPROM, EEPROM and FLASH
An embedded system without code (i.e. the control algorithm) implemented memory has all
the peripherals but is not capable of making decisions depending on the situational as well as
real world changes. Memory for implementing the code may be present on the processor or
may be implemented as a separate chip interfacing the processor. In a controller based
embedded system, the controller may contain internal memory for storing code such
controllers are called Micro-controllers with on-chip ROM, eg. Atmel AT89C51.

The Core of the Embedded Systems:

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.

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

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

Microprocessor Vs Microcontroller:
Microprocessor Microcontroller
A silicon chip representing a Central A microcontroller is a highly integrated chip
Processing Unit (CPU), which is capable of that contains a CPU, scratch pad RAM,
performing arithmetic as well as logical Special and General purpose Register Arrays,
operations according to a pre-defined set of
On Chip ROM/FLASH memory for program
Instructions storage, Timer and Interrupt control units and
dedicated I/O ports
It is a dependent unit. It requires the It is a self contained unit and it doesn‟t require
combination of other chips like Timers, external Interrupt Controller, Timer, UART
Program and data memory chips, Interrupt etc for its functioning
controllers etc for functioning
Most of the time general purpose in design Mostly application oriented or domain
and operation specific
Doesn‟t contain a built in I/O port. The I/O Most of the processors contain multiple built-
Port functionality needs to be implemented in I/O ports which can be operated as a single
with the help of external Programmable 8 or 16 or 32 bit Port or as individual port pins
Peripheral Interface Chips like 8255
Targeted for high end market where Targeted for embedded market where
performance is important performance is not so critical (At present this
demarcation is invalid)
Limited power saving options Includes lot of power saving features
compared to microcontrollers

Harvard V/s Von-Neumann Processor/Controller Architecture

The terms Harvard and Von-Neumann refers to the processor architecture design.

Microprocessors/controllers based on the Von-Neumann architecture shares a single


common bus for fetching both instructions and data. Program instructions and data are
stored in a common main memory

Microprocessors/controllers based on the Harvard architecture will have separate data


bus and instruction bus. This allows the data transfer and program fetching to occur
simultaneously on both buses

With Harvard architecture, the data memory can be read and written while the program
memory is being accessed. These separated data memory and code memory buses allow
one instruction to execute while the next instruction is fetched (“Pre-fetching”)
I/O CPU Memory
Program
CPU Data Memory
Memory

Single shared Bus

Harvard V/s Von-Neumann Processor/Controller Architecture

Harvard Architecture Von-Neumann Architecture

Separate buses for Instruction and Data fetching Single shared bus for Instruction and Data
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
memory memory

RISC V/s CISC Processors/Controllers

RISC CISC
Lesser no. of instructions Greater no. of Instructions
Instruction Pipelining and increased execution Generally no instruction pipelining feature
speed
Orthogonal Instruction Set (Allows each instruction Non Orthogonal Instruction Set (All instructions
to operate on any register and use any addressing are not allowed to operate on any register and
mode) use any addressing mode. It is instruction
specific)
Operations are performed on registers only, the Operations are performed on registers or
only memory operations are load and store memory depending on the instruction

Large number of registers are available Limited no. of general purpose registers
Programmer needs to write more code to execute a . A programmer can achieve the desired
task since the instructions are simpler ones functionality with a single instruction which in
turn provides the effect of using more simpler
single instructions in RISC
Single, Fixed length Instructions Variable length Instructions

Less Silicon usage and pin count More silicon usage since more additional
decoder logic is required to implement the
complex instruction decoding.
With Harvard Architecture Can be Harvard or Von-Neumann Architecture

Sensors & Actuators:

 Embedded system is in constant interaction with the real world

 Controlling/monitoring functions executed by the embedded system is achieved in


accordance with the changes happening to the Real World.

 The changes in the system environment or variables are detected by the sensors
connected to the input port of the embedded system.

 If the embedded system is designed for any controlling purpose, the system will produce
some changes in controlling variable to bring the controlled variable to the desired value.

 It is achieved through an actuator connected to the out port of the embedded system.

Sensor:
 A transducer device which converts energy from one form to another for any
measurement or control purpose. Sensors acts as input device

 Example: IR, humidity, PIR(passive infra red) , ultrasonic , piezoelectric , smoke


sensors
Actuator:

 A form of transducer device (mechanical or electrical) which converts signals to


corresponding physical action (motion). Actuator acts as an output device

 Eg. Electric motor, sliding doors, Escalators, Adjusting the Car Seat

(Figure: Example to show sensors)


The I/O Subsystem:

 The I/O subsystem of the embedded system facilitates the interaction of the embedded
system with external world

 The interaction happens through the sensors and actuators connected to the Input and
output ports respectively of the embedded system

 The sensors may not be directly interfaced to the Input ports, instead they may be
interfaced through signal conditioning and translating systems like ADC, Opto couplers
etc

1. I/O Devices - Light Emitting Diode (LED):

 Light Emitting Diode (LED) is an output device for visual indication in any embedded
system

 LED can be used as an indicator for the status of various signals or situations.
 For proper functioning of the LED, the anode of it should be connected to +ve terminal of
the supply voltage and cathode to the –ve terminal of supply voltage

 The current flowing through the LED must limited to a value below the maximum current
that it can conduct.

 A resister is used in series between the power supply and the resistor to limit the current
through the LED
Vcc

GND

2. I/O Devices – Optocoupler

 Optocoupler is a solid state device to isolate two parts of a circuit.

 Optocoupler combines an LED and a photo-transistor in a single housing (package)

 Optocouplers can be used in either input circuits or in output circuits

 In electronic circuits, optocoupler is used for suppressing interference in data


communication, circuit isolation, High voltage separation, simultaneous separation
and Intensification signal etc. Below figure shows the usage of the optocoupler.

You might also like