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

EMBEDDED SYSTEMS

1.0WHAT 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.
Ex: WATCH
It is a time display system
Parts: hardware, needles, battery, dials, chassis and strap
Rules
1. All needles move clockwise only
2. A thin needle rotates every second
3. A long needle rotates every minute
4. A short needle rotates every hour
5. All needles return to the original position after 12 hours
WASHING MACHINE
It is an automatic clothes washing SYSTEM
Parts: Status display panel, Switches & Dials, Motor, Power supply & control unit, Inner water
level sensor and solenoid valve.
Rules
1. Wash by spinning
2. Rinse
3. Drying
4. Wash over by blinking
5. Each step display the process stage
6. in case interruption, execute only the remaining
EMBEDDED SYSTEM
Definition: An Embedded System is one that has computer hardware with software embedded in
it as one of its important components.

1.1WHY WE NEED EMBEDDED SYSTEMS


The first reason why we need embedded systems is because general-purpose computers, like PCs,
would be far too costly for the majority of products that incorporate some form of embedded system
technology (Christoffer, 2006). Another reason why we need embedded systems is because general-

1
purpose solution might also fail to meet a number of functional or performance requirements such as
constraints in power-consumption, size-limitations, reliability or real-time performance etc.

The digital revolution, started decades ago, has reached a stage that we cannot conduct our normal
modern daily lives without this technology. Indeed, it is safe to say that we already own at least one
piece of equipment, which contains a processor, whether it is a phone, a television, an automatic
washing machine or an MP3 player.

1.2Embedded Systems
An embedded system is a little harder to pin down. It is dedicated to a single purpose, or a small set of
purposes. Embedded systems can be found in nearly every single piece of modern electronics--in fact,
they are the electronics.

DEFINITION OF EMBEDDED SYSTEM

“An embedded system is some combination of computer hardware and software, either fixed in
capability or programmable, that is designed for a specific function or for specific functions within a
larger system.”

“An embedded system is a dedicated computer system designed for one or two specific functions. This
system is embedded as a part of a complete device system that includes hardware, such as electrical and
mechanical components. The embedded system is unlike the general-purpose computer, which is
engineered to manage a wide range of processing tasks. “Because an embedded system is
engineered to perform certain tasks only, design engineers may optimize size, cost, power
consumption, reliability and performance. Embedded systems are typically produced on broad scales
and share functionalities across a variety of environments and applications.

1.3APPLICATIONS OF EMBEDDED SYSTEMS:

Embedded systems are used in different applications like automobiles, telecommunications, smart
cards, missiles, satellites, computer networking and digital consumer electronics.

Embedded Systems in Automobiles

1. Motor and cruise control system 2. Body or Engine safety


3. Entertainment and multimedia in car 4. E-Com and Mobile access
Robotics in assembly line Wireless communication Mobile computing and networking

Embedded Systems in Smart Cards, Missiles and Satellites

1. Security systems 2.Telephone and Banking 3.Defense and Aerospace Communication

Embedded Systems in Peripherals & Computer Networking

1. Displays and Monitors 2.Networking Systems 3. Image Processing 4. Network cards and printers
5.Gateways 6. Hubs 7.Routers

Embedded Systems in Consumer Electronics


2
1. Digital Cameras 2. Set top Boxes 3.High Definition TVs DVDs 4. Kitchen Appliances
(Refrigerators, Toasters, Microwave Ovens) 5.Toys/Games 6.Telephones7. Cell Phones/Pagers
8.Global Positioning Systems (GPS)
Medical Field
1. Medical Infusion Pumps 2.ECG, 3.EEG 4.Dialysis Machines
5. Prosthetic Devices 6. Cardiac Monitors 7.EMG
Consumer Electronics
Office Automation Fax Machine
1. Photocopier 2.Printers 3.Monitors 4.Scanners 5.X-Y Plotters
E.C.G Electro Cardiograhy To Observe Cardioc Behaviour

E.M.G Electro Myograhy To Observe health of Muscles and Nerve cells Behaviour

E.E.G Electro Encephalograhy To Observe problems related to brain

1.4 CONTRAST BETWEEN EMBEDDED AND GENERAL PURPOSE SYSTEM

Compared to desktop and server systems, embedded systems have a much wider range of processing
power and cost from systems containing low-end 8-bit and 16-bit processors that may cost less than a
dollar, to those containing full 32-bit microprocessors capable of operating in the 500 MIPS range that
cost approximately 10 dollars, to those containing high-end embedded processors that cost hundreds of
dollars and can execute several billions of instructions per second. Although the range of computing
power in the embedded systems market is very large, price is a key factor in the design of computers
for this space. Performance requirements do exist, of course, but the primary goal is often meeting the
performance need at a minimum price, rather than achieving higher perform ance at a higher price.
Embedded systems often process information in very different ways from general-purpose
processors. Typically these applications include deadline-driven constraints—so-called real-time
constraints.
COMPONENTS OF A COMPUTER SYSTEM

A Microprocessor
A Large Memory
(Primary and Secondary)
(RAM, ROM and caches)
Input Units
(Keyboard, Mouse, Scanner, etc.)
Output Units
(Monitor printer, etc.)
Networking Units
(Ethernet Card, Drivers, etc.)
I/O Units
(Modem, Fax cum Modem, etc.)

3
1.5 COMPONENTS OF AN 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.

GENERAL PURPOSE SYSTEM EMBEDDED SYSTEMS


Applications Broad class of applications. Few applications that are known at design-
time.
Alteration Programmable by end user. Not programmable by end user.

Content Combination of generic hardware and Combination of Specific purpose hardware and
GPOS for variety of applications embedded OS for specific set of applications
Criteria: 1. Cost 1. Cost 2. Power consumption
2.Average speed 3. Predictability
Power Power consumption is more Power consumption is less
Key factor Performance is key Application specific requirement is key
Response Response time is not critical Response time is critical for some applications
Task Multi-tasking Task specific

What makes embedded systems is different?


• Real-time operation • Size • Cost • Time • Reliability • Safety • Energy • Security

4
1.6EMBEDDED SYSTEM MODEL

What the Embedded Systems Model indicates is that all


embedded systems share one similarity at the highest level; that
is, they all have at least one layer (hardware) or all layers
(hardware, system software and application software) into
which all components fall. The hardware layer contains all the
major physical components located on an embedded board,
whereas the system and application software layers contain all
of the software located on and being processed by the
embedded system.
Fig. Embedded system model
1.7 Characteristics of Embedded Systems

The characteristics of embedded system are measurable features during the implementation of
system.

 Power consumption: This is a very important factor for all embedded system which are powered by
batteries. So the amount of power will be consumed by the system, which decides the capacity or lifetime
of battery.
 Flexibility: The flexibility is the ability to change the functionality of the system without investing
additional NRE cost and hence software is typically considered very flexible as it can be updated at any
time with new version.
 Processor power: The embedded systems are controlled by microcontrollers or digital signal processor
(DSP). It can handle one or many specific task which require very powerful processor.
 Operating system: The embedded operating system is needed in embedded system to limit the function
depending on the embedded device and may only run a single application which is crucial to the devices
operation. Due to this the operating system must be reliable and able to run with tight constraints on
memory, size, time and processing power.
 Performance: The performance of the system measures by the execution time or throughput the system.
 Memory: The program developed for the embedded systems are treated as firmware and stored in ROM
or flash memory chips.
 Size: The embedded system should be small in size as possible. The software is measured in bytes and
transistor or IC or gates are used for hardware.
 Reliability: The embedded system should be much reliable to achieve a better performance for long
duration of time during its complete life cycle.
 Safety: During the system failure, the system should not cause harm to other.
5
 Correctness: By checking the functionality of system, it indicates the functionality of implemented
system is correct or not.
 Maintainability: It is a most important factor of system in which system can be repaired or replaced
within a certain time interval.
 Two other key characteristics exist in many embedded applications: the need to minimize memory and
the need to minimize power. In many embedded applications, the memory can be a substantial portion of
the system cost, and it is important to optimize memory size in such cases. Sometimes the application is
expected to fit entirely in the memory on the processor chip; other times the application needs to fit in its
entirety in a small, off-chip memory. In either case, the importance of memory size translates to an
emphasis on code size, since data size is dictated by the application. Some architecture have special
instruction set capabilities to reduce code size. Larger memories also mean more power, and optimizing
power is often critical in embedded applications. Although the emphasis on low power is frequently
driven by the use of batteries, the need to use less expensive packaging (plastic versus ceramic) and the
absence of a fan for cooling also limit total power consumption.
1.8TYPES OF EMBEDDED SYSTEMS

Embedded systems can be classified into different types based on performance, functional requirements
and performance of the microcontroller.

Embedded systems are classified into four categories based on their performance and functional
requirements:

 Stand alone embedded systems


 Real time embedded systems
 Networked embedded systems
 Mobile embedded systems

Embedded Systems are classified into three types based on the performance of the microcontroller such
as
 Small scale embedded systems
 Medium scale embedded systems
 Sophisticated embedded systems

STAND ALONE EMBEDDED SYSTEMS

Stand alone embedded systems do not require a host system like a computer, it works by itself. It takes
the input from the input ports either analog or digital and processes, calculates and converts the data
and gives the resulting data through the connected device-Which both controls, drives and displays the
connected devices. Examples for the stand alone embedded systems are mp3 players, digital cameras,
video game consoles, microwave ovens and temperature measurement systems.

REAL TIME EMBEDDED SYSTEMS


6
A real time embedded system is defined as, a system which gives a required o/p in a particular time.
These types of embedded systems follow the time deadlines for completion of a task. Real time
embedded systems are classified into two types such as soft and hard real time systems.

NETWORKED EMBEDDED SYSTEMS

These types of embedded systems are related to a network to access the resources. The connected
network can be LAN, WAN or the internet. The connection can be any wired or wireless. This type of
embedded system is the fastest growing area in embedded system applications. The embedded web
server is a type of system wherein all embedded devices are connected to a web server and accessed
and controlled by a web browser.Example for the LAN networked embedded system is a home security
system wherein all sensors are connected and run on the protocol TCP/IP

MOBILE EMBEDDED SYSTEMS

Mobile embedded systems are used in portable embedded devices like cell phones, mobiles, digital
cameras, mp3 players and personal digital assistants, etc.The basic limitation of these devices is the
other resources and limitation of memory.

SMALL SCALE EMBEDDED SYSTEMS

These types of embedded systems are designed with a single 8 or 16-bit microcontroller, that may even
be activated by a battery. For developing embedded software for small scale embedded systems, the
main programming tools are an editor, assembler, cross assembler and integrated development
environment (IDE).

CHARECTERISTICS OF SMALL SCALE EMBEDDED SYSTEMS

Single 8 bit or 16bit Microcontroller.


• Little hardware and software complexity.
• They May even be battery operated.
• Usually “C” is used for developing this system.
• The need to limit power dissipation when system is running continuously.
Programming tools:
Editor, Assembler and Cross Assembler

MEDIUM SCALE EMBEDDED SYSTEMS

These types of embedded systems design with a single or 16 or 32 bit microcontroller, RISCs or DSPs.
These types of embedded systems have both hardware and software complexities. For developing
embedded software for medium scale embedded systems, the main programming tools are C, C++,
JAVA, Visual C++, RTOS, debugger, source code engineering tool, simulator and IDE.

Single or few 16 or 32 bit microcontrollers or Digital


Signal Processors (DSP) or Reduced Instructions Set Computers (RISC).
• Both hardware and software complexity.

7
Programming tools:
RTOS, Source code Engineering Tool, Simulator, Debugger and Integrated Development
Environment (IDE)

SOPHISTICATED EMBEDDED SYSTEMS

These types of embedded systems have enormous hardware and software complexities that may need
ASIPs, IPs, PLAs, scalable or configurable processors. They are used for cutting-edge applications that
need hardware and software Co-design and components which have to assemble in the final system.

Enormous hardware and software complexity


• Which may need scalable processor or configurable processor and programming logic arrays.
• Constrained by the processing speed available in their hardware units.
Programming Tools:
For these systems may not be readily available at a reasonable cost or may not be available at all.
A compiler or retargetable compiler might have to be developed for this.

CHAPTER-2

2.1 BASIC STRUCTURE OF COMPUTER SYSTEM

Functional units

A computer consists of three main parts:

 A processor (CPU)

8
 A main-memory system
 An I/O system

The CPU consists of a control unit, registers, the arithmetic and logic unit, the instruction execution
unit, and the interconnections among these components.

INPUT UNIT

OUTPUT UNIT

STORAGE UNIT

MEMORY
 The storage area in which programs are kept when they are running and that contains the data
needed by the running programs.

TYPES OF MEMORY

9
 Volatile memory: storage that retains data only if it is receiving power, such as dynamic
random access memory (DRAM)
 Nonvolatile memory: a form of memory that retains data even in the absence of a power source
and that is used to store programs between runs, such as flash memory Usually, a computer has
two classes of storage

CONTROL UNIT
The control unit is the nerve center that sends control signals to other units and senses their states thus
the control unit serves as a coordinator of the memory, arithmetic and logic, and input/output units

The operation of a computer can be summarized as follows:

 The computer accepts information in the form of programs and data through an input unit and
stores it in the memory.
 Information stored in the memory is fetched, under program control, into an ALU, where it is
processed.
 Processed information leaves the computer through an output unit

All activities inside the machine are directed by the control unit

2.2 CPU FAMILIERS USED FOR EMBEDDED SYSTEMS


PROCESSOR
• A Processor is the heart of the Embedded System.
• For an embedded system designer knowledge of microprocessor and microcontroller is a must.
Two Essential Units: Operations
Control Unit (CU), Fetch
Execution Unit (EU) Execute
VARIOUS PROCESSORS
1. General Purpose processor (GPP)
 Microprocessor
 Microcontroller
 Embedded Processor
 Digital signal Processor
2. Application Specific System Processor (ASSP)
10
3. Multi Processor System using GPPs

Fig 3.Types Of Processors For Embedded Systems

GENERAL-PURPOSE PROCESSORS
Instruction set designed not for specific applications
Highly optimized circuits and technology
Use of parallelism
• Superscalar: dynamic scheduling of instructions
• Super-pipelining: instruction pipelining, branch prediction, speculation
 complex memory hierarchy
Not suited for real-time applications
Execution times are highly unpredictable because of intensive resource sharing and dynamic decisions
Properties
Good average performance for large application mix
High power consumption

User benefits
– Low time-to-market and NRE costs
– High flexibility
• “Pentium” the most well-known, but there are hundreds of others
MICROPROCESSOR
• A microprocessor is a single chip semi conductor device also which is a computer on chip, but not a
complete computer.
• 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.
MICROCONTROLLER

11
• A microcontroller is a functional computer system-on-a-chip. It contains a processor, memory, and
programmable input/output peripherals.
• Microcontrollers include an integrated CPU, memory (a small amount of RAM, program memory, or
both) and peripherals capable of input and output.
VARIOUS MICROCONTROLLERS
INTEL: 8031, 8032, 8051,8052,8751,8752
PIC: 8-bit PIC16, PIC18: 16-bit DSPIC33 / PIC24, PIC16C7x
Motorola MC68HC11

EMBEDDED PROCESSOR: cisc functionality with risc at core


• Special microprocessors & microcontrollers often called embedded processors. An embedded
processor is used when fast processing fast context-switching & atomic ALU operations are needed.
Used for set top boxes, modems and wireless devices
Examples: ARM 7, INTEL i960, AMD 29050.
DIGITAL SIGNAL PROCESSOR
• DSP as a GPP is a single chip VLSI unit.
• It includes the computational capabilities of microprocessor and multiply & accumulate units (MAC).
• DSP has large number of applications such as image processing, audio, video & telecommunication
processing systems.
• It is used when signal processing functions are to be processed fast.
Examples: TMS320Cxx, SHARC, Motorola 5600xx
BENEFITS
 optimized for data-flow applications
 suited for simple control flow
 parallel hardware units (VLIW)
12
 specialized instruction set
 high data throughput
 zero-overhead loops
 specialized memory
 suited for real-time applications
APPLICATION SPECIFIC CIRCUITS (ASICS)

Custom-designed circuits necessary


 If ultimate speed or energy efficiency is the goal and large numbers can be sold.
 Instruction set is designed for specific application on vlsi chip
 Ex: dma controller, a/d converter, network interface, can controller,pwm controller, dtmf circuit
Approach suffers from
 long design times,
 lack of flexibility
 (changing standards) and
 High costs (e.g. Mill. $ mask costs).
APPLICATION SPECIFIC SYSTEM PROCESSOR (ASSP)
 ASSP is dedicated to specific tasks and provides a faster solution.
 ASSP Chip which has TCP/IP,UDP,Ethernet Controller
 An ASSP is used as an additional processing unit for running the application in place of using
embedded software.
 Applications: Real time video processing, web phones, video conferencing system
Examples: IIM7100, W3100A
MULTI PROCESSOR SYSTEM USING GPPs
• Multiple processors are used when a single processor does not meet the needs of different task.
• The operations of all the processors are synchronized to obtain an optimum performance.

2.3 Input and Output Devices


The devices which are used to input the data and the programs in the computer are known as "Input
Devices". Or Input device can read data and convert them to a form that a computer can use. Output
Device can produce the final product of machine processing into a form usable by humans. It provides
man to machine communication. Some of the I/O devices are explained below:

1) Keyboard: Keyboard is used in the input phase of a computer-based information system. Keyboard
is most common input device is used today. The data and instructions are input by typing on the
13
keyboard. The message typed on the keyboard reaches the memory unit of a computer. It’s connected
to a computer via a cable. Apart from alphabet and numeral keys, it has other function keys for
performing different functions.

(2) Mouse: It’s a pointing device. The mouse is rolled over the mouse pad, which in turn controls the
movement of the cursor in the screen. We can click, double click or drag the mouse. Most of the
mouse’s have a ball beneath them, which rotates when the mouse in moved. The ball has 2 wheels of
the sides, which in turn mousse with the movement of the ball. The sensor notifies the speed of its
movements to the computer, which in turn moves the cursor/pointer on the screen.

(3) Scanner: Scanners are used to enter information directly in to the computer’s memory. This device
works like a Xerox machine. The scanner converts any type of printed or written information including
photographs into digital pulses, which can be manipulated by the computer.

(4) Track Ball: Track ball is similar to the upside- down design of the mouse. The user moves the ball
directly, while the device itself remains stationary. The user spins the ball in various directions to effect
the screen movements.

(5) Light Pen: This is an input device which is used to draw lines or figures on a computer screen. It’s
touched to the CRT screen where it can detect raster on the screen as it passes.

(6) Optical Character Rader: It’s a device which detects alpha numeric characters printed or written
on a paper. The text which is to be scanned is illuminated by a low frequency light source. The light is
absorbed by the dark areas but reflected from the bright areas. The reflected light is received by the
photocells.

(7) Bar Code Reader: This device reads bar codes and coverts them into electric pulses to be
processed by a computer. A bar code is nothing but data coded in form of light and dark bars.

(8) Voice Input Systems: This devices converts spoken words to M/C language form. A micro phone
is used to convert human speech into electric signals. The signal pattern is then transmitted to a
computer when it’s compared to a dictionary of patterns that have been previously placed in a storage
unit of computer. When a close match is found, the word is recognized.

(9) Plotter: Plotter is an O/P device that is used to produce graphical O/P on papers. It uses single color
or multi color pens to draw pictures as blue print etc.

14
(10) Digital Camera: It converts graphics directly into digital form. It looks like an ordinary camera,
but no film is used therein, instead a CCD (changed coupled Divide) Electronic chip in used. When
light falls, on the chip though the lens, it converts light waves into electrical waves.

Output Devices
(A) MONITOR

Monitor is an output device that resembles the television screen and uses a Cathode Ray Tube (CRT) to
display information. The monitor is associated with a keyboard for manual input of characters and
displays the information as it is keyed in. It also displays the program or application output. Like the
television, monitors are also available in different sizes.

(B) LIQUID CRYSTAL DISPLAY (LCD)

LCD was introduced in the 1970s and is now applied to display terminals also. Its advantages like low
energy consumption, smaller and lighter have paved its way for usage in portable computers (laptops).
(C) PRINTER
Printers are used to produce paper (commonly known as hardcopy) output. Based on the technology
used, they can be classified as Impact or Non impact printers. Impact printers use the typewriting
printing mechanism wherein a hammer strikes the paper through a ribbon in order to produce output.
Dot-matrix and Character printers fall under this category.

Non-impact printers do not touch the paper while printing. They use chemical, heat or electrical signals
to etch the symbols on paper. Inkjet, DeskJet, Laser, Thermal printers fall under this category of
printers. When we talk about printers we refer to two basic qualities associated with printers:
resolution, and speed. Print resolutions measured in terms of number of dots per inch (dpi). Print speed
is measured in terms of number of characters printed in a unit of time and is represented as characters-
per-second (cps), lines-per-minute (lpm), or pages-per-minute (ppm).

(D) PLOTTER
Plotters are used to print graphical output on paper. It interprets computer commands and makes line
drawings on paper using multicolored automated pens. It is capable of producing graphs, drawings,
charts, maps etc. Computer Aided Engineering (CAE) applications like CAD (Computer Aided
Design) and CAM (Computer Aided Manufacturing) are typical usage areas for plotters
E) Audio Output: Sound Cards and Speakers:

15
The Audio output is the ability of the computer to output sound. Two components are needed: Sound card –
Plays contents of digitized recordings, Speakers – Attached to sound card.

2.4 Memory
A Memory module is a physical device which is used to store programs or data on a temporary or
permanent basis for use in digital electronics. There are different varieties of memories in embedded
system, each having their own particular mode of operation. An efficient memory increases the
performance of embedded systems.

2 Types of Memory Modules

Different types of memory modules for any system depend on the nature of application of that system.
The memory performance and capability requirements are small for low cost systems.

The following general types of memory module can be used in an embedded system.

 Volatile Memory
 Non-Volatile Memory

Volatile Memory Module – RAM


Volatile memory devices are types of storage devices which hold their content till power is applied to
them. When power is switched off, these memories lose their content.

An example of volatile memory device is Random Access Memory (RAM)

VOLATILE MEMORY MODULE-RAM

The RAM memory chip, referred to as a main memory, is a storage location that allows information to
be stored and accessed quickly from random location with memory module. The memory cell which
can be accessed for information transfer to or from any desired random location is called a Random
Access Memory.

A RAM memory is designed with a collection of storage cells. Each cell contains either BJT or
MOSFET based on type of memory module. For example, 4*4 RAM memory can store 4 bit of
information.

16
Every instruction of a row and column in this matrix is a memory cell. Each block labeled BC,
represents the binary cells with its 3 inputs and 1 output. Each block consists of 12 binary cells.

Non- Volatile Memory-ROM Memory


Non-volatile memories are permanent storage types of memory chips which can get back stored
information even when the power is switched off. An example of non-volatile memory device is Read
Only Memory (ROM).

The ROM stands for Read Only Memory. ROM can only be used to read from, but cannot be written
upon. These memory devices are non-volatile.

The information is stored permanently in such memories during manufacture. The ROM can store
instructions which are required to start computer when power is given to the computer. This operation
is referred to as bootstrap.

A ROM memory cell is designed with a single transistor. The ROM memory is not only used in the
computers but also in other electronic devices like controllers, micro ovens, washing machines etc.

A ROM family is designed with collection of storage cells. Each memory cell contains either bipolar or
MOSFET transistor based on types of memory.

Types of RAM Chips Available


The RAM family includes two important memory devices which are;

Static Random Access Memory (SRAM)

The Static Random Access Memory module is a type of RAM that retains the data bits in its memory as
long as power is being supplied. The SRAM does not need to be refreshed periodically. The static
RAM provides faster access to the data and is more expensive than DRAM.

Each bit in an SRAM is stored in four transistors that form two cross coupled inverters. Two additional
transistors – types serve to control the access to the storage cells during read and write operations. A
typically SRAM uses six transistors to store each memory bit. These Storage Cells have two stable
states which are used to denote ‘0’ and ‘1’.

Advantages:

 The external SRAM provide large storage capacities than on-chip memories.
 The SRAM devices can be even found in smaller and larger capacities.
 The SRAMs typically have very low latency and high performance.
 The SRAM memory can be designed and interfaced very easily compared to other memories

Applications:

 The external SRAM is quite effective as a faster buffer for medium size block of data. You can
use external SRAM to buffer data that does not fit in to on-chip memory and requires lower
latency than what DRAM provides.

17
 If your system requires a block of memory larger than 10 MB, you can consider different types
of memories such as SRAM.

Dynamic Random Access Memory:

The Dynamic Random Access Memory is a type of RAM module that stores each bit of data within a
separate capacitor. This is an efficient way to store the data in memory because it requires less physical
space to store the data.

A particular size of DRAM can hold more amounts of data than a SRAM chip with the same size. The
capacitors in DRAM need to be constantly recharged to keep their charge. This is the reason why
DRAM requires more power.

Each DRAM memory chip consists of a storage locations or memory cells. It is made up of capacitor
and transistor which can hold either active or inactive state. Each DRAM cell is referred to as a bit.
When the DRAM cell holds a value at active state ‘1’, the charge is at high state. When the DRAM cell
holds a value at inactive state ‘0’, the charge is below a certain level.
Advantages:
 The storage capacity is very high
 It is a low cost device
Applications:

 It is used for storing large block of data


 It is used in executing microprocessor code
 Applications where low latency memory access is required.

Non-volatile random access memory (NVRAM)


With this name we refer generally to any memory which does not lose information when power is
turned off. Except from ROMs, NVRAM also include conventional volatile random access memories
with battery backup such as BIOS memory (Basic Input Output System.

BIOS MEMORY CHIP WITH BATTERY IS EXAMPLE OF NVRAM

Types of ROM Memories

Different types of memory in the ROM family have four important memory devices which are:

Programmable Read Only Memory (PROM):

The Programmable read only memory (PROM) can be modified only once by the user. The PROM is
manufactured with series of fuses. The chip is programmed by the PROM programmer wherein some
fuses are burnt. The open fuses are read as ones, while the burned fuses are read as zeros.

Erasable Programmable Read Only Memory (EPROM):

The erasable programmable read only memory is one of the special types of memory modules that can
be programmed any number of times to correct the errors. It can retain its contents until exposed to
ultraviolet light.

18
The ultraviolet light erases its contents making it possible to program the memory. To write and erase
the EPROM memory chip, we need a special device called PROM programmer.

The EPROM is programmed by forcing electrical charge on a small piece of poly silicon metal known
as floating gate, which is located in the memory cell. When charge is present in this gate the cell is
programmed, i.e. memory contains ‘0’. When charge is not present in the gate, the cell is not
programmed, i.e. memory contains ‘1’.

Electrical Erasable Programmable Read Only Memory (EEPROM):

EEPROM is a user modified read only memory chip that can be erased and programmed for a number
of times. These memory devices are used in computers and other electronic devices to store small
amount of data that must be saved when the power supply is removed. The content of EEPROM is
erased by exposing it to an electrical charge.

The EEPROM data is stored and removed 1 byte of data at a time. The EEPROM does not need to be
removed from the computer to be modified. The changing the content does not requires the additional
equipment.

The modern EEPROM allows multi byte page operations and has limited life. The EEPROM can be
designed 10 to 1000 write cycles. EEPROM is a storage device that can be implemented with fewer
standards in cell design. The more common cell is composed of two transistors.

Flash Memory:

The flash memory is the most widely used device for electronics and computer devices. The flash
memory is among the special types of memory that can be erased and programmed with a block of
data. The flash memory keeps its data even with no power at all. The flash memory is popular because
it works fast and efficiently than EEPROM.

The flash memory module is designed for about 100000 -10000000 write cycles. The main constraint
with the flash memory is number of times data can be written to it. The data can be read from flash
memory as many times as desired, but after a certain number of write operations, it will stop working.

EXEMPLARY APPLICATIONS OF FLASH MEMORIES: PENDRIVES, MEMORY CARDS

Table 1 summarizes the features of each type of memory discussed here, but keep in mind that different
memory types serve different purposes. Each memory type has its strengths and weaknesses. Side-by-
side comparisons are not always effective.

Erase
Type Volatile? Writeable? Max Erase Cycles Cost (per Byte) Speed
Size

SRAM Yes Yes Byte Unlimited Expensive Fast

DRAM Yes Yes Byte Unlimited Moderate Moderate

Masked
No No n/a n/a Inexpensive Fast
ROM

19
Once, with a
PROM No device n/a n/a Moderate Fast
programmer

Yes, with a
Entire Limited (consult
EPROM No device Moderate Fast
Chip datasheet)
programmer

Limited (consult Fast to read, slow


EEPROM No Yes Byte Expensive
datasheet) to erase/write

Limited (consult Fast to read, slow


Flash No Yes Sector Moderate
datasheet) to erase/write

Expensive (SRAM +
NVRAM No Yes Byte Unlimited Fast
battery)

Table 1. Characteristics of the various memory types

INTERRUPTS

Real Time Embedded System design requires that I/O devices receive servicing in an efficient manner
so that large amounts of the total system tasks can be assumed by the processor with little or no effect
on throughput. The most common method of servicing such devices is the polled approach. This is
where the processor must test each device in sequence and in effect “ask” each one if it needs servicing.
It is easy to see that a large portion of the main program is looping through this continuous polling
cycle and that such a method would have a serious, detrimental effect on system throughput, thus,
limiting the tasks that could be assumed by the microcomputer and reducing the cost effectiveness of
using such devices. A more desirable method would be one that would allow the microprocessor to be
executing its main program and only stop to service peripheral devices when it is told to do so by the
device itself. In effect, the method would provide an external asynchronous input that would inform the
processor that it should complete whatever instruction that is currently being executed and fetch a new
routine that will service the requesting device. Once this servicing is complete, however, the processor
would resume exactly where it left off. This can be effectively handled by interrupts.

Types of Interrupts
Interrupts can be broadly classified as
- Hardware Interrupts
These are interrupts caused by the connected devices.
- Software Interrupts
20
These are interrupts deliberately introduced by software instructions to generate user defined
exceptions
- Trap
These are interrupts used by the processor alone to detect any exception such as divide by zero
Depending on the service the interrupts also can be classified as
- Fixed interrupt
• Address of the ISR built into microprocessor, cannot be changed
• Either ISR stored at address or a jump to actual ISR stored if not enough bytes available

- Vectored interrupt
• Peripheral must provide the address of the ISR
• Common when microprocessor has multiple peripherals connected by a system bus
• Compromise between fixed and vectored interrupts
– One interrupt pin
– Table in memory holding ISR addresses (maybe 256 words)
– Peripheral doesn’t provide ISR address, but rather index into table
• Fewer bits are sent by the peripheral
• Can move ISR location without changing peripheral
Maskable vs. Non-Maskable interrupts
– Maskable: programmer can set bit that causes processor to ignore interrupt
• This is important when the processor is executing a time-critical code
– Non-Maskable: a separate interrupt pin that can’t be masked
• Typically reserved for drastic situations, like power failure requiring immediate backup of data
to non-volatile memory
The 8051 has 5 interrupt sources: 2 external interrupts, 2 timer interrupts, and the serial port interrupt.
These interrupts occur because of
1. Timers overflowing
2. Receiving character via the serial port
3. Transmitting character via the serial port
4. Two “external events

What is polling?

21
The state of continuous monitoring is known as polling. The microcontroller keeps checking the status
of other devices; and while doing so, it does no other operation and consumes all its processing time for
monitoring. This problem can be addressed by using interrupts.

Interrupt Service Routine

For every interrupt, there must be an interrupt service routine (ISR), or interrupt handler. When an
interrupt occurs, the microcontroller runs the interrupt service routine. For every interrupt, there is a
fixed location in memory that holds the address of its interrupt service routine, ISR. The table of
memory locations set aside to hold the addresses of ISRs is called as the Interrupt Vector Table.

22

You might also like