0% found this document useful (0 votes)
18 views102 pages

Ertos 2025

Uploaded by

theimposter9988
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views102 pages

Ertos 2025

Uploaded by

theimposter9988
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 102

Unit – I : Introduction

Definition of Embedded System:


An Embedded System is an electronic/electro-mechanical system
designed to perform a specific function and is a combination of both
hardware and firmware (software).
Embedded System = Hardware + Firmware

Hardware and firmware is highly specialized to the application


domain and is unique.

Examples of Embedded Systems:


Digital Camera, TV, Washing Machine, DVD Player, Air
Conditioner, CCTV, Ignition System, Mobile Phone, Printer, Scanner,
Network Router, ECG Machine, Digital Multimeter, ATM, Currency
Counter, Smart Card Reader, etc.

1
General purpose computing
system versus Embedded system
General purpose computing Embedded system
system
1. A system which is a 1. A system which is a combination of
combination of a generic special purpose hardware and
hardware and a general embedded OS for executing a
purpose OS for executing a specific set of applications.
variety of applications.
2. May or may not contain an
2. Contains a general purpose operating system for functioning.
operating system (GPOS).
3. The firmware of the embedded
3. Applications are alterable system is pre-programmed and it
(programmable) by the user. (It is non-alterable by the end user.
is possible for the end user to (There may be exceptions for the
reinstall the OS, and also add systems supporting OS Kernel
or remove user applications). image flashing through special
hardware settings).

2
General purpose computing
system Embedded system
4. Performance is the key deciding 4. Application-specific requirements
factor in the selection of the (performance, power requirements,
system. Always, ‘Faster is memory usage, etc.) are the key
Better’. deciding factors.

5. Less / not at all tailored towards 5. Highly tailored to take advantage of the
reduced operating power power saving modes supported by the
requirements, options for different hardware and the OS.
levels of power management.
6. For certain category of embedded
6. Response requirements are not systems like mission critical systems, the
time-critical. response time requirements is highly
critical.

7. Execution behaviour is deterministic for


7. Need not be deterministic in certain types of embedded systems like ‘
execution behaviour. Hard Real Time’ systems.

3
History of Embedded
Systems
Apollo Guidance Computer (AGC) - 1st recognized modern
embedded system – MIT Instrumentation Laboratory for Lunar
expedition.
AGC contains 4K ROM and 256 words of RAM.
In 1963, 10K ROM and 1K RAM.
Clock frequency = 1.024MHz.
11 instructions and 16-bit word logic is used.
5000 ICs (3-input NOR gates, RTL Logic) are used.

Autonetics D-17 Guidance Computer – 1st mass-produced


embedded system - guidance computer for the Minuteman-I missile.
uses discrete transistor logic and hard disk for main memory.

4
Classification of Embedded
Systems

1. Based on Generation

2. Based on Complexity and performance


requirements

3. Based on Deterministic behaviour

4. Based on Triggering
1. Classification of Embedded systems
based on Generation
a) First Generation
b) Second Generation
c) Third Generation
d) Fourth Generation

a) First Generation:
Embedded systems built around 8-bit microprocessors like 8085 and Z80, and
4-bit microcontrollers.
Firmware developed in Assembly code.
Ex: Digital telephone keypads, Stepper motor control units, etc.

b) Second Generation:
Embedded systems built around 16-bit microprocessors, and
8-bit or 16-bit microcontrollers.
Instruction set is much more complex than 1st generation.
Some systems have embedded operating system.
Ex: Data acquisition systems, SCADA systems, etc.
(SCADA: Supervisory Control And Data Acquisition)
c) Third Generation:
Embedded systems built around 32-bit microprocessors, and
16-bit microcontrollers.
Application and Domain-specific Processors / Controllers like Digital
Signal Processing (DSP) and Application Specific Integrated Circuits
(ASICs) are used.
Instruction set is much more complex and powerful.
Instruction Pipeline concept is introduced.
Uses Dedicated embedded real time and general purpose operating
system.
Ex: Robotics, Media, Industrial processor control, Networking, etc.

d) Fourth Generation:
System-On-Chip (SOC), Reconfigurable processors and multi core
processors are used.
High performance, tight integration and miniaturization.
Uses High performance real time embedded operating system.
Ex: Smart Phone Devices, Mobile Internet Devices (MIDs), etc.
2. Classification of Embedded systems
based on Complexity and Performance
a) Small-scale Embedded Systems
b) Medium-scale Embedded Systems
c) Large-scale Embedded Systems / Complex Systems

a) Small-scale Embedded Systems


Used in Simple applications and where the performance
requirements are not time-critical.
Embedded systems built around low performance, low
cost 8-bit or 16-bit microprocessors /
microcontrollers.
Embedded System may or may not contain OS.
Ex: Electronic Toy Car, etc
b) Medium-scale Embedded Systems
Slightly complex in Hardware and firmware.

Built around medium performance, low cost 16-bit or 32-bit


microprocessors / microcontrollers or digital signal processors.

Embedded Systems contain embedded operating system (GPOS or RTOS).

c) Large-scale Embedded Systems / Complex Systems


Highly complex Hardware and firmware requirements.

Built around high performance 32-bit or 64-bit RISC processors/controllers


or Reconfigurable System-On-Chip (RSOC) or multi core processors and
Programmable Logic Devices.

Contain multiple Processors / Controllers and Co-units / hardware


accelerators for offloading processing requirements (like decoding/encoding
of media, cryptographic function implementation, etc).

Embedded Systems contain high performance Real Time operating system


(RTOS) for task scheduling, prioritization and management.
3. CLASSIFICATION OF EMBEDDED SYSTEMS BASED ON
DETERMINISTIC BEHAVIOUR
Applicable to Real time Embedded systems.
a) Hard Real time Embedded systems
b) Soft Real time Embedded systems

a) Hard Real time Embedded Systems


Strictly adhere to the timing constraints for a task.
b) Soft Real time Embedded Systems
Does not guarantee meeting deadlines.

4. Classification of Embedded systems based on


Triggering
Reactive in nature (like Process control systems in industrial control applications)

a) Event Triggered systems


b) Time Triggered systems
MAJOR APPLICATION AREAS OF EMBEDDED SYSTEMS
Application areas are countless.

1. Consumer Electronics: Cameras, DVD players, etc.


2. Household appliances: Television, Washing machine, Fridge, Microwave Oven, etc.
3. Home Automation and Security systems: Air Conditioners, Sprinklers, Intruder
detection alarm, CCTV cameras, etc.
4. Telecom: Cellular Telephones, Telephone Switches, Handset Multimedia
applications, etc.
5. Automotive industry: Anti-lock Braking System (ABS), Engine Control, Ignition
system, Automatic Navigation system, etc.
6. Computer Peripherals: Printer, Scanner, FAX machine, etc.
7. Computer Networking Systems: Network Routers, Switches, Hubs, Firewalls, etc.
8. Healthcare: ECG, EEG machines, Different kinds of scanners, etc.
9. Measurement & Instrumentation: Digital Multimeter, Digital CRO, Logic Analyzer,
etc.
10. Banking and Retail: Automatic Teller Machine (ATM), Currency counter, Print of
Sales (PoS), etc.
11. Card Readers: Bar Code reader, Smart card reader, etc.
PURPOSE OF EMBEDDED SYSTEMS
1. Data Collection / Storage / Representation
2. Data Communication
3. Data (Signal) Processing
4. Monitoring
5. Control
6. Application Specific User Interface
1. Data Collection / Storage / Representation
• Acquisition of data from the External world
• Data Collection for storage, analysis, manipulation and
transmission
• Data may be text, voice, image, video, electrical signal and
any measurable quantity
• Data can be either analog or digital
• Collected data may be
 stored directly in the system or
 may be transmitted to some other systems or
 may be processed by the system or
 may be deleted instantly after giving a meaningful
representation
• Data representation by Visual (Graphical/Quantitative – LCD,
LED) or Audible (buzzers, alarms, etc.)
Ex.: Digital Camera
2. Data Communication
• Data transfer to same system or some other system located
remotely
• Transmission mediums
 Wire-line medium: Olden days systems
 Wireless medium: Cheaper, hassle-free from wire bundles
• Data collecting embedded terminal itself incorporate data
communication units like
 Wireless modules ( Bluetooth, Zigbee, Wi-Fi, EDGE, GPRS,
etc.)
 Wireline modules (RS-232C, USB, TCP/IP, PS2, etc.)
• Ex.: Dedicated data transmission embedded systems are
Network Hubs, Routers, Switches, etc.
3. Data (Signal) Processing
• Data may be used for various kinds of processing
 Speech Coding
 Synthesis
 Audio video Codec
Ex: Digital hearing aid
4. Monitoring
• Systems designed for monitoring purpose
• Monitoring (Knowing) the status of some variables like
current, voltage, etc.)
• These systems cannot control the variables
Ex: Embedded products in medical domain (ECG),
measuring instruments (Digital CRO, DMM)
5. Control
• Embedded systems impose control over some variables according to the
changes in input variables.
• System consists of Sensors and Actuators
 Sensors are connected to the input port for capturing changes in
environmental variable or measuring variable.
 Actuators are connected to the output port, are controlled according to the
changes in input variable to put an impact on the controlling variable to
bring the controlled variable to the specific range

Ex: Air conditioner, controls the room temperature to specific limit


 Sensor: Temperature sensing element, may be thermistor and a
handheld device setting up the desired temperature
 Actuator: Air compressor unit. Compressor is controlled
according to the current room temperature and the desired
temperature set by the end user.
 Input variable and Controlled variable : Room temperature
 Controlling variable: Cool air flow by the compressor unit
6. Application Specific User Interface

• System consists user interfaces like buttons,


switches, keypads, lights, bells, display units,
etc.
Ex: Mobile Phone, consists of keypad, graphic
LCD module, system speaker, vibration alert, etc.
The Typical Embedded System

Memory
Communication
Interface

Input Ports
(Sensors) System Core

Output Ports
(Actuators)
Other Supporting
Integrated Circuits &
Subsystems
Typical embedded system contains

Single Chip Controller – Master brain of the system


• Microprocessor (Intel 8085) or
• Microcontroller (Atmel AT 89C51) or
• Field Programmable Gate Array (FPGA) device
(Xilinx Spartan) or
• Digital Signal Processor (Blackfin processor) or
• Application Specific Integrated Circuit (ASIC) or
• Application Specific Standard Product (ASSP)
(ADE7760 Single Phase Energy Metering IC)
Input devices – Keyboards, pushbutton switches, etc.
Output devices – LEDs, LCDs, Piezo-electric buzzers, etc.
It is not necessary that all systems should incorporate I/O user
interfaces. It depends on the type of application for which the
embedded system is designed.
Some systems do not require any manual intervention for their
operation.
Memory – Permanent memory for storing control algorithm and
other important configuration details, is ROM.
ROM types are OTP ROM (or ROM), PROM, UVEPROM,
EEPROM and Flash memory.
Temporary memory for performing arithmetic operations or control
algorithm execution, called working memory, is RAM.
RAM types are SRAM, DRAM and NVRAM.
On-Chip ROM for holding control algorithm – Atmel AT 89C51
Off-Chip memory for holding control algorithm – Intel 8031AH
Core of the Embedded System
Embedded Systems are built around a central core.
Types of Cores:
1. General Purpose and Domain Specific Processors
a) Microprocessors
b) Microcontrollers
c) Digital Signal Processors
2. Application Specific Integrated Circuits (ASICs)
3. Programmable Logic Devices (PLDs)
4. Commercial Off-The-Shelf components (COTS)
1. General Purpose and Domain Specific Processors

80% of embedded systems are processor based.


Processor may be Microprocessor / Microcontroller / Digital Signal
Processor.
a) Microprocessor:
Si chip representing a CPU, performing arithmetic and logic
operations according to a pre-defined set of instructions.
CPU = ALU + Control Unit + Working Registers
Microprocessor is a dependent unit and requires other hardware like
memory, timer unit, interrupt controller, etc.
Intel: Intel 4004 ---> 1971 - 4-bit processor – 1K data memory – 4K
program memory – 12-bit PC – Sixteen 4-bit
General purpose Registers and 46 instructions
– 740 KHz Clock Speed – Olden days
Calculators
Intel 4040  1972 – 14 more instructions are added – 8K
Program memory – Interrupt capabilities added
Intel 8008 -> 1972 – 14-bit PC - served as terminal controller
Intel 8080 -> 1974 – 8-bit processor, 16-bit address bus and
PC and Seven 8-bit registers (A-E, H,L : BC, DE
and HL Pairs formed the 16-bit registers) –
used for industrial control
Intel 8085 -> 1976 – 2 newly added instructions, 3 interrupt
pins and Serial I/O – built-in Clock generator
and Bus Controller circuits – Single +5 V power
supply
Zilog  Z80 processor –> Improved version of 8086 - Original 8086
architecture and instruction set - 8-bit data bus and
16-bit address bus –concept od Register banking by
doubling the register set – includes 2 sets of index
registers
Motorola -> Motorola 6800 -> Different architecture and instruction set
compared to 8080
Key players : Intel, AMD, Freescale, IBM, Texas Instruments, Cyrix,
Hitachi, NEC, LSI logic, etc.
System architectures for Processor design:
i) Harvard architecture
ii) Von-Neumann architecture
Harvard architecture: Separate Buses for program memory and data
memory.
Von-Neumann architecture: Single system Bus for program memory
and data memory.

Instruction Set Architectures:


i) Reduced Instruction Set Computing (RISC)
ii) Complex Instruction Set Computing (CISC)
General Purpose Processor (GPP):
Processor designed for general purpose computational tasks.
Ex: Processor running inside desktop or laptop.
GPP = ALU + Control unit + Registers
Application-Specific Instruction set Processor (ASIP):
Processor with architecture and instruction set optimized for specific
domain / application requirements like network processing, control
applications, automotive, telecom, media applications digital signal
processing, etc.
ASIP = Processor + On chip peripherals
Ex: Automotive AVR and USB AVR from Atmel, Digital Signal
Processors, etc.
b) Microcontroller:
Microcontroller = CPU + RAM + On Chip ROM + Register arrays +
Timer + Interrupt control units + Dedicated I/O ports
1st Microcontroller  Texas Instruments TMS 1000 – 1974
Intel family:
Almost 75% of microcontrollers used in embedded domain
were 8051 family (MCS-51) based controllers
Low cost, wide availability, memory efficient instruction set,
mature development tools, Boolean processing capability,
uses CISC features
Intel 8048  Intel’s 1st microcontroller
used original IBM Keyboard
adopts Harward architecture
prominent member in MCS-48 family
PIC family:
used in Industrial control applications
from Microchip technologies
High performance RISC microcontroller

Key players : Freescale, NEC, Zilog, Hitachi, Mitsubishi, Infineon, ST


Micro Electronics, National, Texas Instruments, Toshiba, Philips,
Microchip, Analog Devices, Daewoo, Intel, Maxim, Sharp, Silicon
Laboratories, TDK, Triscend, Winbond, Atmel.
Microprocessor vs. Microcontroller
Microprocessor Microcontroller
1. A Silicon chip representing a CPU 1. A highly integrated chip that
which is capable of performing contains a CPU, scratch pad RAM,
arithmetic as well as logical
operations according to a special and general purpose
predefined set of instructions. register arrays, on-chip ROM /
FLASH memory for program
storage, timer and interrupt control
units and dedicated I/O ports .

2. A dependent unit. It requires the 2. A self-contained unit and it does not


combination of other chips like
timers, program and data memory require external interrupt controller,
chips, interrupt controllers, etc. for timer, UART, etc. for its functioning.
functioning.

3. Most of the time, general purpose 3. Mostly application-oriented or


in design and operation. domain-specific.
Microprocessor Microcontroller

4. Does not contain a built-in I/O port. 4. Most of the processors contain
The I/O port functionality needs to be multiple built-in I/O ports which can
implemented with the help of be operated as a single 8- or 16- or
external programmable peripheral 32-bit port or as individual port
interface chips like 8255. pins.

5. Targeted for high end market where 5. Targeted for embedded market
performance is important. where performance is not so
critical.

6. Limited power saving options 6. Includes lot of power saving


compared to microcontrollers. features.
c. Digital Signal Processors:
A microchip designed for performing high speed computational operations for
addition, subtraction, multiplication, division, SoP calculations, convolution,
FFT, DFT, etc.
 Powerful special purpose 8- or 16- or 32-bit microprocessors
 Used in audio, video, multimedia and communication applications
 2 to 3 times faster than general purpose microprocessors in signal processing
 Implements algorithms in hardware which speeds up the execution, whereas
general purpose processors implement the algorithm in firmware in which
speed of execution depends on the clock speed of the processors
Key units:
I. Program Memory
II. Data Memory
III. Computational Engine
IV. I/O unit
Ex.: Blackfin processors from Analog Devices
RISC vs. CISC Processors / Controllers
RISC CISC
1. Reduced Instruction Set 1. Complex Instruction Set
Computing. Computing.
2. Lesser number of 2. More number of
instructions. instructions.
3. No instruction pipelining
3. Instruction pipelining and feature.
increased execution speed.
4. Non-orthogonal instruction
4. Orthogonal Instruction set. set. (All instructions are not
(Allows each instruction to allowed to operate on any
operate on any register or register and use only
use any addressing mode.) addressing mode. It is
5. A large number of registers instruction-specific.)
are available. 5. Limited number of general
purpose registers.
RISC CISC
6. The only Operations are 6. Operations are performed on
performed on registers register or memory depending
memory operations are Load on the instruction.
and Store.
7. Instructions are like macros in
7. Programmer needs to write
code to execute a task since C language.
the instructions are simpler 8. Variable length instructions.
ones. 9. More Silicon usage since more
8. Single, fixed length additional decoder logic is
instructions. required to implement the
9. Less Silicon usage and pin complex instruction decoding.
count. 10. Harvard architecture or Von
10 . Harvard architecture. Neumann architecture.
11. Ex. Atmel AVR microcontroller 11. Ex. AT89C51 having 255
having 32 instructions.
instructions.
Harvard vs. Von Neumann Processors / Controllers

Program
CPU Data memory
memory

Fig. Harvard architecture

Program
CPU Data memory
memory

Single shared bus


Fig. Von Neumann architecture
Harvard Architecture Von Neumann Architecture

1. Separate buses for instruction and 1. Single shared bus for instruction
data fetching. and data fetching.
2. Easier to pipeline, so high 2. Low performance compared to
performance can be achieved. Harvard architecture.
3. Cheaper.
3. Comparatively cost high.
4. Allows self modifying codes. (Self
4. No memory alignment problems. modifying code is a code /
5. Since data memory and program instruction which modifies itself
memory are stored physically in while execution.)
different locations, no chances for 5. Since data memory and program
accidental corruption of program memory are stored in same chip,
memory. chances for accidental corruption
of program memory
Big-Endian vs. Little-Endian Processors / Controllers
• Endian specifies the order in which the data is stored in the
memory by processor operations in a multibyte system.
• Processors whose word size is greater than one byte.
Little-Endian:
The lower-order byte of the data is stored in memory at the
lowest address, and the higher-order byte is stored at the
highest address. (The little end comes first).

Base address+0 Byte 0 Byte 0 0x20000 (Base address)


Base address+1 Byte 1 Byte 1 0x20001 (Base address+1)
Base address+2 Byte 2 Byte 2 0x20002 (Base address+2)
Base address+3 Byte 3 Byte 3 0x20003 (Base address+3)

Fig. Little-Endian operation


Big-Endian:
The higher-order byte of the data is stored in memory at the
lowest address, and the lower-order byte is stored at the
highest address. (The big end comes first).

Base address+0 Byte 3 Byte 3 0x20000 (Base address)


Base address+1 Byte 2 Byte 2 0x20001 (Base address+1)
Base address+2 Byte 1 Byte 1 0x20002 (Base address+2)
Base address+3 Byte 0 Byte 0 0x20003 (Base address+3)
Fig. Big-Endian operation

Load and Store operations:


Memory access related operations.
Load: Data from Memory to Register
Store: Data from Register to Memory
Application Specific Integrated Circuits (ASICs):
 Microchip designed to perform a specific or unique application
 Proprietary products
 Design of smaller systems with high capabilities/functionalities
 It can be pre-fabricated for a special application or it can be
custom-fabricated by using the components from a reusable
‘building block’ library of components for a particular customer
application
 Systems are profitable only for large volume commercial
productions
 Fabrication requires a non-refundable initial investment for the
process technology and configuration expenses. This
investment is known as Non-Recurring Engineering Charge
(NRE). NRE is one time investment
Application Specific Standard Product (ASSP):
• NRE is borne by a third party and ASIC is made openly
available in the market.
• Marketed to multiple customers just as a general-
purpose product.

Ex. ADE7760 Energy Meter ASIC developed by Analog


Devices for Energy metering applications
Programmable Logic Devices (PLDs)
Logic devices: i) Fixed
ii)Programmble
i) Fixed Logic devices:
 Circuits are permanent
 Perform one or set of functions
 They cannot be changed, once manufactured
ii) Programmable Logic devices:
 Can be re-configured to perform any number of functions at
any time
 Offer wide range of logic capacity, features, speed and
voltage characteristics
 Designers use inexpensive software tools to quickly develop,
simulate and test their designs
 No NRE costs.
 A design can be quickly programmed into a device and
immediately tested in a live circuit (Prototype)
 During the design phase, customers can change the circuitry as
often as they want until the design operates to their satisfaction
 PLDs are based on re-writable memory technology – device is
simply reprogrammed
 Once the design is final, customers can go into immediate
production by simply programming as many PLDs as they need
with the final software design file

Ex.: Network Router, Modem, DVD player, Automatic Navigation


System, etc.
Types of PLDs:
a) Field Programmable Gate Arrays (FPGAs)
b) Complex Programmable Logic Devices (CPLDs)

a) Field Programmable Gate Arrays (FPGAs):


 Offer highest amount of logic density (million gates) and
highest performance
 Offer features such as built-in hardwired processors (such as
the IBM power PC), substantial amounts of memory, clock
management systems, and support for many of the latest,
very fast device-to-device signaling technologies
 Used in a wide variety of applications ranging from data
processing and storage to instrumentation,
telecommunications and digital signal processing
 Popular for prototyping ASIC designs where the designer can
test his design by downloading the design file into an FPGA
device
2. Complex Programmable Logic Devices (CPLDs)
 Offer much smaller amounts of logic up to about 10,000 gates
 Offer very predictable timing characteristics
 Are ideal for critical control applications
 Require extremely low amounts of power
 Very inexpensive
 Ideal for cost-sensitive, battery-operated, portable
applications such as mobile phones and digital handheld
assistants
Advantages of PLD:

1. PLDs offer customers much more flexibility during design cycle


2. PLDs do not require long lead time for prototypes or
production parts
3. PLDs do not require customers to pay for large NRE costs and
purchase expensive mask sets
4. PLDs allow customers to order just the number of parts they
need allowing them to control inventory
5. PLDs can be reprogrammed even after a piece of equipment is
shipped to a customer
Commercial OFF-The-Shelf Components (COTS)
• Product which is used ‘as-is’
• Provide easy integration and interoperability with existing
system components
• Components may be developed around a general purpose or
domain specific processor or an ASIC or a PLD
• COTS are readily available in the market
• COTS are cheap and developer can cut down development
time to great extent. This in turn reduces the time to market
embedded systems
• It needs to identify the COTS for the system and give the plug-
in option on the board according to the hardware plug-in
connections given in the specifications of the COTS
• Major drawback is that the manufacturer of the COTS
component may withdraw the product or discontinue the in
the production of the COTS at any time if a rapid change in
technology occurs, and this adversely affect a commercial
manufacture of the embedded system which makes use of
the specific COTS product

Ex. Remote controlled toy car control unit including the RF


circuitry part, high performance and high frequency
microwave electronics (2 – 200 GHz), high bandwidth A/D
converter, electro-optic IR imaging arrays, UV/IR detector, etc.
Memory
Types:
1. Program Storage Memory (ROM)
2. Data Memory (RAM)
1. Program Storage Memory (ROM):
• Stores program instructions
• Non-volatile storage memory

Code Memory
FLASH (ROM) NVRAM

PROM Masked ROM


EPROM EEPROM
(OTP) (MROM)

Fig. Classification of Program Memory (ROM)


i) Masked ROM (MROM):
 One time programmable device
 Makes use of hardwired technology for storing data
 Factory programmed by masking and metallisation process at the
time of production
 Low cost for high volume production
 Least expensive type of solid state memory
 Permanent bit storage and not possible to alter the bit information
Mechanisms for masking process of the ROM:
a) Creation of an enhancement or depletion mode transistor through
channel implant
b) By creating the memory cell either using a standard transistor or a
high threshold transistor
In the high threshold mode, the supply voltage required to
turn ON the transistor is above the normal ROM IC operating
voltage. This ensures that the transistor is always OFF and the
memory cell stores always logic 0.
ii) Programmable Read Only Memory (PROM) / OTP:
 Not pre-programmed by the manufacturer
 End user programming the code in to memory
 Memory has nichrome or polysilicon wires arranged in matrix.
 These wires are functionally viewed as fuses
 Programmer burns the fuses according to the bit pattern to be
stored
 Fuses which are blown/burned represents logic 0 and fuses
which are not blown/burned represents logic 1
 Widely used low cost solution for commercial production
 OTP cannot be reprogrammed
 Not useful for development purpose
iii) Erasable Programmable Read Only Memory (EPROM):
 Flexible to reprogram the same chip
 Bits are stored by charging the floating gate of an FET with high
voltage to charge
 Have quartz crystal window for erasing the stored information
 Window is exposed to UV rays for fixed duration, the entire
memory will be erased
 The memory is taken out from the circuit board and put in a UV
eraser device for 20 or 30 minutes
 Erasing is a tedious and time consuming process

iv) Electrically Erasable Programmable Read Only Memory (EEPROM):


 Greater flexibility for system design
 Information can be erased using electrical signals in a few
milliseconds at the register level / byte level
 Chip can be erased and reprogrammed in the circuit
 Storage capacity is limited compared to standard ROM
v) FLASH memory:
 Large ROM technology and most popular ROM technology
used
 Combined re-programmability of EEPROM and high storage
capacity of standard ROMs
 Organized as sectors (blocks) or pages.
 Information is stored in an array of floating gate MOSFET
transistors
 Erasing of memory can be done at sector level or page level
without affecting the other sectors or pages
 Each sector/page should be erased before re-programming
 Typical erasable capacity is 1000 cycles
Ex. W27C512 from WINBOND is 64KB FLASH memory
vi) Non-Volatile RAM (NVRAM):
 Random access memory with battery backup in a single
package
 Contains static RAM based memory and a minute battery for
providing supply to the memory in the absence of external
power supply
 Life span is expected to be around 10 years
Ex. DS1644 from Maxim/Dallas is 32KB NVRAM
2. Read-Write Memory / Random Access Memory (RAM):
Data memory / working memory
Volatile memory
Direct access memory
Types of RAM:
i) Static RAM (SRAM)
ii) Dynamic RAM (DRAM)
i) Static RAM (SRAM):
 Stores data in the form of voltage
 Made up of Flip-flops
 Fastest memory
 SRAM cell (bit) is realized by using 6 transistors (or 6
MOSFETs) Four transistors are used for building the latch and
two for controlling the access
 Low capacity and high cost
ii) Dynamic RAM (DRAM):
 Stores data in the form of charge
 Made up of MOS transistor and gates
 MOSFET acts as the gate for incoming and outgoing data,
whereas the capacitor acts as the bit storage unit
 High density and low cost
 Disadvantage is that it requires periodic refreshing. Since
information is stored as charge, it gets leaked off with time
and to prevent this they need to be refreshed periodically in
milliseconds interval
 Slow in operation due to refresh requirement. Typical access
time is 60 nsec.
 DRAM controllers are used for refreshing operation
 Write operation is faster than read operation
Sensor:
Transducer device that converts energy from one form to
another form for any measurement or control purpose.
Actuator:
Transducer device (mechanical or electrical) that converts
signals into corresponding physical action (motion).
Actuator acts as an Output device.
I/O Subsystem:
Facilitates the interaction of the embedded system with the
external world.
The interaction happens through the sensors and actuators
connected to the input and output ports respectively of the
embedded system.
Ex. LED, 7-Segment Display, Optocoupler, Stepper motor,
Relay, Piezo buzzer, Push Button Switch, Keyboard,
Programmable Peripheral Interface (PPI), etc.
Light Emitting Diode (LED):
• Output device for visual indication
• Indicator for status of various signals or situations
7-Segment Display:
• Output device for displaying alphanumeric characters
• Contains 8 LED segments arranged in special form
• 7 LEDs are used for displaying alphanumeric characters and 1 LED is
for representing ‘Decimal point’
Optocoupler:
• Solid state device to isolate two parts of a circuit
• Combines LED and photo transistor in a single package
• Used for suppressing interference in data communication, circuit
isolation, high voltage separation, simultaneous separation and
signal intensification, etc.
• Used in either input circuits or output circuits
Stepper motor:
• Electrometrical device which generated discrete displacement
(motion) in response to d.c. electrical signals.
• Widely used in industrial embedded applications, consumer
electronic products and robotic control systems
EX. Paper feed mechanism of a printer/fax machine
Two-Phase Stepper motor types based on coil winding arrangement:
 Unipolar – contains 2 windings per phase
 Bipolar - contains 1 winding per phase
Relay:
• Electro-mechanical device
• Acts as dynamic path selectors for signals and power
• Contains relay coil made up of insulated wire on a metal core and a
metal armature with one or more contacts
• Configurations are Single Pole Single Throw and Single Pole Double
Throw
• Industrial Relays are bulky and required high voltage to operate
• Reed relays are used for embedded applications requiring switching
of low voltage DC signals
Piezo Buzzer:
• Piezo electric device for generating audio indication
• Contains Piezo diaphragm which produces audible sound in
response to the voltage applied to it
• Two types : Self driving and External driving
• Self driving circuit contains all the necessary components to
generate sound at a predefined time. It will generate a tone
on applying the voltage
• External driving Piezo buzzer supports generation of different
tones. The tone can be varied by applying a variable pulse
train
Push Button Switch:
• Input device
• Two configurations: Push to Make and Push to Break
• Used as Reset switch, Start switch and pulse generator
Keyboard:
• Input device for user interface
Programmable Peripheral Interface:
• Used for extending the I/O capabilities of
processors/controllers
• 8255A is a popular PPI device
Communication Interfaces

Essential for communicating with various subsystems of the


embedded system and with the external world.

A. Device / Board level Communication Interface (Onboard


Communication Interface)
B. Product level Communication Interface (External
Communication Interface )
A. Onboard Communication Interface (Device / Board level
Communication Interface):
Refers to the different communication channels / buses for
interconnecting various integrates circuits (ICs) and other
peripherals within the embedded system.
Different interfaces are,
I. Inter Integrated Circuit (I2C) Bus
II. Serial Peripheral Interface (SPI) Bus
III. Universal Asynchronous Receiver Transmitter (UART)
IV. 1-Wire Interface
V. Parallel Interface
1. Inter Integrated Circuit (I2C) Bus
• Synchronous, Bi-directional, Half-Duplex, Two-Wire, Serial
Interface Bus, developed by Philips Semiconductors
• I2C bus comprises 2 bus lines: Serial Clock – SCL and Serial Data – SDA
• SCL for generating synchronizing clock pulses
• SDA for transmitting the serial data across devices
• I2C is a shared bus system where many number of I2C devices
can be connected
• Devices connected to I2C bus can act as Master or Slave
device
• Master device is responsible for controlling the
communication by initiating or terminating data transfer,
sending data and generating necessary synchronization pulses
• Slave devices wait for the command from the master and
respond upon receiving the commands
• Master and Slave devices can act as transmitter or receiver
• Synchronization signal is generated by Master only

• I2C bus supports 3 different data rates:


Standard Mode: Data rate up to 100Kbits/sec (100Kbps)
Fast Mode: Data rate up to 400Kbits/sec (400Kbps)
High Speed Mode: Data rate up to 3.4Mbits/sec (3.4Mbps)
2. Serial Peripheral Interface (SPI) Bus
• Synchronous, Bi-directional, Full-Duplex, Four-Wire, Serial
Interface Bus, introduced by Motorola
• Single Master Multi-Slave system
• System may have more than one SPI device can be master,
provided the condition, only one master is active at any given
point of time
• SPI requires 4 signal lines for communication:
Master Out Slave In (MOSI): Signal line carrying data from master
to slave device. Also known as Slave Input/Slave Data In (SI/SDI)
Master In Slave Out (MISO): Signal line carrying data from slave to
master device. Also known as Slave output (SO/SDO)
Serial Clock (SCLK): Signal line carrying the clock signals
Slave Select (SS): Signal line for slave device select
• Most suitable for applications requiring data transfer in
‘streams’
• Limitation is that it does not support an acknowledgement
mechanism
3. Universal Synchronous Receiver Transmitter (UART)
• Asynchronous form of serial data transmission
• Does not require a clock signal to synchronize the transmitting
end and receiving end for transmission
• Pre-defined agreement between the transmitting device and
receiving device
• Serial communication settings (Baud rate, number of
bits/byte, parity, number of start bits and stop bit, and flow
control) for both transmitter and receiver should be set as
identical
• Also, UART provides hardware handshaking signal support for
controlling the serial data flow
• National Semiconductor’s 8250 UART chip is considered as the
standard setting UART. It was used in original IBM PC
4. 1-Wire Interface
• Synchronous Half-Duplex communication protocol
• Developed by Maxim Dallas Semiconductor, hence known as
Dallas 1-Wire Protocol
• Only single signal line (wire), called DQ, for communication
• Follows master-slave communication model
• Allows power to be sent along the signal wire as well
• Supports a single master and one or more slave devices on bus
• Early 1-wire device contains a globally 64-bit unique
identification number stored within it
• Identification number = 8-bit family code + 48-bit serial
number + 8-bit CRC computed from first 56 bits
• All communication is master initiated
• Communication is divided into timeslots or 60 microseconds
5. Parallel Interface
• Normally used for communicating with peripheral devices
which are memory mapped to the host of the system
• Host processor/controller of embedded system contains a
parallel bus and the device which supports parallel bus can
directly connect to this bus system
• Offers highest speed for data transfer
B. External Communication Interfaces
Different communication channels / buses used by the
embedded system to communicate with the external world
1. RS-232C & RS-485
2. Universal Serial Bus (USB)
3. IEEE 1394 (Firewire)
4. Infrared (IrDA)
5. Bluetooth
6. Wi-Fi
7. ZigBee
8. General Packet Radio Service (GPRS)
1. RS-232C & RS-485:
RS-232C:
• Legacy, Full Duplex, Wired, Asynchronous Serial
Communication interface
• Developed by Electronics Industries Association (EIA) during
1960s
• Extends UART communication signals for external data
communication
• Defines various handshaking and control signals for
communication apart from the ‘Transmit’ and ‘Receive’ signal
lines for data communication
• Supports 2 types of connectors:
i) DB-9 --> 9-pin connector
ii) Db-25  25-pin connector
Point-to-point communication interface and not suitable for
multi-drop communication
Uses single ended data transfer technique for signal transmission
Devices involved are called Data Terminal Equipment (DTE) and
Data Communication Equipment (DCE)
Supports baud rate up to 20 Kbps (upper limit 19.2 Kbps)
Commonly used baud rates: 300 bps, 1200 bps, 2400 bps, 9600
bps, 11.52 Kbps and 19.2 Kbps
Max. operating distance is 50 feet
Level translator IC like MAX 232 is used for converting the signal
line from the UART to RS-232 signal lines for communication
RS-422:
• Used for differential data communication
• Data rate up to 100 Kbps
• Operating distance up to 400 feet
• Supports multi-drop communication with one transmitter
device and receiver devices up to 10
RS-485:
• Enhanced version of RS-422
• Supports multi-drop communication with up to 32 transmitter
devices (drivers) and 32 receiver devices on the bus
2. Universal Serial Bus (USB)

• Wired, High speed, Serial bus for data communication


• 1st version of USB (USB 1.0) was released in 1995
• Star topology, with a USB Host at the center and one or more
USB peripheral devices / USB hosts connected to it
• Transmits data in packet format
• Communication is host initiated
• USB Host contains Controller responsible for controlling the
data communication including establishing connectivity with
slave devices, packetizing and formatting the data
• USB Host Control Interface Standards:
 Open Host Control Interface (OHCI)
 Universal Host Control Interface (UHCI)
• USB cable establishes physical connection, distance up to 5m.
• 2 different types of connectors at the end of the USB cable:
Type A connector  Up stream connection (connection with
host)
Ex. USB connector present in Desktop PCs or Laptops
Type B connector  Down stream connection (connection with
slave devices)
Both Type A and Type B connectors contains 4 pins for
communication
• Connector Pin configuration
Pin No. Pin Name Description
1 VBUS Carries Power (+5V)
2 D- Differential data carrier line
3 D+ Differential data carrier line
4 GND Ground Signal line

• Uses differential signal for data transmission. It improves the


noise immunity
• USB interface has the ability to supply power to the
connecting devices
• Supply power up to 500 mA at 5V
• Supports 4 types of data transfers:
Control, Bulk, Isosynchronous and Interrupt
Control transfer: Query, Configure and issue commands to USB
device
Bulk Transfer: Sending a block of data to device and support
error checking and correction
Ex. Transferring data to Printer
Isosynchronous data transfer: used for real-time communication.
Data is transmitted as streams. Does not support error
checking and retransmission of data in case of loss.
Ex. Streaming devices like audio devices and medical equipment
Interrupt Transfer: Transferring small amount of data. It uses
Polling to determine whether the USB device has any data to
send.
Ex. Data from mouse and keyboard
USB supports 4 different data rates:
 Low Speed (1.5Mbps)
 Full Speed (12 Mbps)
 High Speed (480 Mbps)
 Super speed (4.8 Gbps)

USB 1.0 defines Low Speed and Full Speed specifications


USB 2.0 defines High Speed specification
USB 3.0 defines Super Speed specification

Wireless USB for data transmission uses Ultra Wide Band (UWB)
technology
Ex. Some Laptops available in market with wireless USB support
3. IEEE 1394 (Firewire)
• Known as High Performance Serial Bus (HPSB)
• Wired, High speed, Serial Communication Bus
• Supports peer-to-peer connection and point-to-multi point
connection
• Tree topology up to 63 devices connected on the bus
• Supports cable length of up to 15 feet
• Data rates of 400 to 3200 Mbps
• Uses differential data transfer through a twisted pair cables
• Supports 3 types of Connectors:
a) 4-pin connector
b) 6-pin connector (alpha connector)
c) 9-pin connector (beta connector)
• 6-pin and 9-pin connectors carry power to support external
devices
• Supply unregulated power in the range of 24 to 30V
Ex. Interface connecting Digital Camera, Scanner to desktop
computers for data transfer and storage
• 1394 hardware implementation is much costlier than USB
implementation
4. Infrared (IrDA)
Serial, Half-Duplex, Line-of-Sight based Wireless technology
Ex. TV, DVD Player, etc.
Uses Infrared waves of EM spectrum for data communication
Typical Range is 10 cm to 1m
Range can be increased by increasing the transmitting power of
IR devices
Data rates from 9600 bps to 16 Mbps
Based on speed of data transmission, IR is classified into
Serial IR (SIR) – 9600 bps to 115.2 Kbps
Medium IR (MIR) – 0.576 Mbps to 1.152 Mbps
Fast IR (FIR) – up to 4 Mbps
Very Fast IR (VFIR) –up to 16 Mbps
Ultra Fast IR (UFIR) – targeting up to 100 Mbps
• IR units are Transceivers (both transmitter and receiver unit
will be present in each device supporting IrDA
communication
• Infrared LED is the IR source for transmitter and a Photo
diode acts as the receiver in the receiving end
• IrDA communication has 2 essential parts:
a) Physical link part  responsible for the physical transmission
of data between devices supporting IR communication. It
defines the physical characteristics of communication like
range, data rates, power, etc. It works on Wireless principle
b) Protocol part  responsible for defining rules of
communication. It contains implementation of Physical layer
(PHY), Medium Access Control (MAC) and Logical Link
Control (LLC)
5. Bluetooth (BT)
• Low cost, low power, short range wireless technology for data
and voice communication
• Proposed by Ericsson in 1994
• Operates at 2.4 GHz of RF spectrum
• Uses Frequency Hopping Spread Spectrum (FHSS) technique
for communication
• Data rate of up to 1 Mbps
• Range of approximately 30 feet
• 2 essential parts:
a) Physical link part  works on wireless principle making use
of RF waves for communication
b) Protocol part  Rules governing the Bluetooth
communication is implemented in the Bluetooth Protocol
Stack
• Each Bluetooth device will have 48-bit unique identification
number
• Follows packet based data transfer
• Supports point-to-point and point-to-multipoint wireless
communication
• Point-to-point communication follows the master-slave
relationship
Piconet: When a network is formed with one device as master
and more than one device as slaves, it is called piconet
A piconet supports maximum of 7 slave devices
6. Wi-Fi (Wireless Fidelity)
• Wireless communication technique for networked
communication devices
• Follows the IEEE 802.11 Standard
• Supports Internal Protocol (IP) based communication
• Each device is identified by an IP address, which unique to
each device on the network
• Require an intermediate agent called Wi-Fi Router / Wireless
Access Point to manage communication
• Wi-Fi router is responsible for restricting the access to a
network, assigning IP address to devices on the network,
routing data packets to the intended devices on the network
• Wi-Fi enabled devices contain a wireless adaptor for
transmitting and receiving data in the form of radio signals
through an antenna
• Hardware part is known as Wi-Fi Radio
• Wi-Fi operates at 2.4 GHz or 5 GHz of radio spectrum
• Data rates ranging from1 Mbps to 150 Mbps depending on the
standards (802.11a/b/g/n) and access modulation method
• Range of 100 to 300 feet depending on the type of antenna and
usage location (indoor / outdoor)
7. ZigBee
• Low cost, Low power, Wireless network communication
protocol based on IEEE 802.15.4-2006 standard
• Robust Mesh network containing multiple nodes
• Message travels through a number of different paths to get
from one node to another
• Operates worldwide at the unlicensed bands of Radio
spectrum at 2.4 to 2.484 GHz and 868 to 868.6 MHz
• Operating distance up to 100 meters
• Data rate of 20 to 250 Kbps
• ZigBee device categories:
 ZigBee Coordinator (ZC) / Network Coordinator: Root of the
ZigBee network. Initiates the ZigBee network and it has the
capacity to store information about the network
 ZigBee Router (ZR) / Full Function Device (FFC): Responsible for
passing information from one device to another device or to
another ZR
 ZigBee End Device (ZED) / Reduced Function Device (RFD):
Containing ZigBee functionality for data communication. It can
talk only with a ZR or ZC and does not have the capacity to act
as a mediator for transferring data from one device to another
Application areas:
 Home and Industrial Automation
 Energy measurement
 Home control / security
 Medical / patient tracking
 Logistics and asset tracking
 Sensor networks and active RFID
 Automatic Meter Reading (AMR)
 Smoke detectors
 Wireless telemetry
 HVAC control
 Heating control
 Lighting control
 Environmental controls, etc
8. General Packet Radio Service (GPRS)
• Old technology
• Transmits data over mobile communication network like GSM
• Data is transmitted as Packets
• Max. transfer rate is 171.2 Kbps
• Radio channel is concurrently shared between several users
• Divides the channel into 8 timeslots and transmits data over
the available channel
• Supports Internet Protocol (IP), Point-to-Point Protocol (PPP)
and X.25 protocols for communication
• Used by mobile enabled devices for data communication
• Device should support the necessary GPRS hardware like
GPRS modem and GPRS radio
• Carrier network also should have support for GPRS
communication
• New generation techniques like EDGE, High Speed Downlink
Packet Access (HSDPA) which offers higher bandwidths
Embedded Firmware
• Control algorithm (Program Instructions) and/or the
Configuration settings that an embedded system developer
dumps into the code (Program) memory of the system
• Unavoidable part of the embedded system
• Methods for developing the embedded firmware:
1. Write the program in high level languages like Embedded C /
C++ using an Integrated Development Environment (IDE).
IDEs are different for different family of processors /
controllers
Ex. Keil Micro Vision 3 IDE is used for 8051 family controllers
2. Write the program in Assembly language using the instruction
supported by application’s target processor / controller.
Embedded software development process is tedious and
time consuming. The developer needs to know about all the
instruction sets of the processor / controller. Program is
highly dependent on the developer
• Instruction set for each family of processor/controller is
different
• HEX File Creation: Process of converting the program written
in a high level language or processor / controller specific
Assembly code to machine code
• Methods used for HEX File Creation is different depending on
the programming techniques used:
1. Cross Compiler is used to convert the program written in
Embedded C/C++ into HEX File
2. Utilities supplied by the vendor is used to convert the
program written in Assembly language into HEX File
• Third party tools available with free of cost for this
conversion
Two types of Control algorithm design:
1. Infinite loop or Super loop based approach, where control
flow runs from top to bottom and then jumps back to the top
of the program in a conventional procedure.
Ex. while(1){ }; technique in C

2. Splitting the function to be executed into tasks and running


these tasks using a Scheduler which is part of GPOS / RTOS
Other System Components
Refers to the components/circuits/ICs which are necessary for
the proper functioning of the embedded system

1. Reset Circuit:
• Essential to ensure that the device is not operating at a
voltage level where the device is not guarantee to operate
during system power ON.
• Reset signal brings the internal registers and the different
hardware systems of the processor/controller to a known
state and starts the firmware execution from the reset vector
(normally from vector address 0x0000)
• The reset signal can be either active high or active low
• Some processors/microcontrollers contain built-in internal
reset circuitry
2. Brown-out Protection Circuit
• Prevents the processor/controller from unexpected program
execution behaviour when the supply voltage to the
processor/controller falls below a specified voltage
• It essential for battery powered devices since there are grater
chances for the battery voltage to drop below the required
threshold
• Microprocessor supervisor ICs like DS1232 provides Brown-
out protection
3. Oscillator Circuit
• Generates the precise clock signal for the processor
• Certain processors/controllers integrate a built-in oscillator
circuit and simply require an external ceramic resonator /
quartz crystal for producing the necessary clock signals
• Speed of operation of a processor is primarily dependent on
the clock frequency
• The total system power consumption is directly proportional
to the clock frequency
• Power consumption increases with increase in clock
frequency
• The accuracy of program execution depends on the accuracy
of the clock signal
• Accuracy of the crystal oscillator or ceramic resonator is
normally expressed in terms of +/- ppm (parts per million)
4. Real Time Clock (RTC)
• Keep track of time
• Timing reference is essential for synchronizing the operations
of the OS kernel
• Holds information like current time (in hours, minutes,
seconds) in 12 hours / 24 hours format, date, month, year,
day of the week, etc.
• Provides time reference to the system
• Intended to function even in the absence of power
• Available in the form of integrated circuits
• RTC chip contains a microchip for holding the time and date
related information and backup battery cell for functioning in
the absence of power, in a single package
5. Watchdog Timer:
• Hardware timer for monitoring the firmware execution
• Depending on the internal implementation, the watchdog
timer increments or decrements a free running counter with
each clock pulse and generates a reset signal to reset the
processor if the count reaches zero for a down counting
watchdog or the highest count value for an up counting
watchdog
• If the firmware execution does not complete due to
malfunctioning within the time required by the watch dog to
reach the max. count, the counter will generate a reset pulse
and this will reset the processor (if it is connected to the reset
line of the processor)
• If the firmware execution completes before the expiration of
the watchdog timer, you can reset the count by writing a 0 (for
up counting watchdog timer) to the watchdog timer register
• Most of the processors implement watchdog as a built-in
component and provides status register to control the
watchdog timer (like enabling and disabling watchdog
functioning) and watchdog timer register for writing the count
value
• The watchdog can be implemented in such a way that when a
watchdog timeout occurs, an interrupt is generated instead of
resetting the processor
PCB and Passive Components

• Printed Circuit Board (PCB) is the backbone of embedded


system
• After finalizing the components and their interconnection
among them, a schematic diagram is created and according to
the schematic, the PCB is fabricated
• PCB acts as a platform for mounting all necessary components
as per the design requirement
• Also, act as a platform for testing embedded firmware

You might also like