Embedded Systems
Embedded Systems
Embedded Systems
e.g: Electronic Toys, Mobile Handsets, Washing Machines, Air Conditioners, Automotive
Control Units, Set Top Box, DVD Player etc…
Based on Generation
Based on Triggering
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.
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
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.)
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.
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.
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
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
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
The terms Harvard and Von-Neumann refers to the processor architecture design.
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
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 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
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
Eg. Electric motor, sliding doors, Escalators, Adjusting the Car Seat
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
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