Unit 2
Unit 2
UNIT-II
TYPICAL EMBEDDED
SYSTEM
ELEMENTS OF EMBEDDED SYSTEMS:
An embedded system is a combination of 3 things, Hardware
Software Mechanical Components and it is supposed to do one specific
task only. A typical embedded system contains a single chip controller
which acts as the master brain of the system. Diagrammatically an
embedded system can be represented as follows:
FPGA/ASIC/DSP/SoC
Embedded
Microprocessor/controller
Firmware
Memory
Communication Interface
System
I/p Ports Core O/p Ports
(Sensors) (Actuators)
Embedded System
Real World
categories.
Microprocessors
Microcontrollers
Microprocessor:
A silicon chip representing a Central Processing Unit
(CPU), which is capable of performing arithmetic as well
as logical operations according to a pre-defined set of
Instructions, which is specific to the manufacturer
Developers of microprocessors.
Intel – Intel 4004 – November
1971(4-bit) Intel – Intel 4040.
Intel – Intel 8008 – April 1972.
Intel – Intel 8080 – April
1974(8-bit). Motorola
Motorola 6800.
Intel – Intel 8085 – 1976.
Zilog - Z80 – July 1976
Microcontroller:
A highly integrated silicon chip containing a
CPU, scratch pad RAM, Special and General
purpose Register Arrays, On Chip ROM/FLASH
memory for program storage, Timer and Interrupt
control units and dedicated I/O ports
Microcontrollers can be considered as a super set
of Microprocessors
Microcontroller can be general purpose (like Intel
8051, designed for generic applications and
domains) or application specific (Like
Automotive AVR from Atmel Corporation.
Designed specifically for automotive applications)
Since a microcontroller contains all the
necessary functional blocks for independent
working, they found greater place in the
embedded domain in place of microprocessors
Microcontrollers are cheap, cost effective and
are readily available in the market Texas
Instruments TMS 1000 is considered as the
world‟s first microcontroller
Microprocessor Vs Microcontroller:
Microprocessor Microcontroller
A silicon chip representing a Central A microcontroller is a highly
Processing Unit integrated chip that
(CPU), which is capable of performing contains a CPU, scratch pad RAM,
arithmetic as Special and
well as logical operations according to a General purpose Register Arrays,
pre-defined set On Chip
of Instructions ROM/FLASH memory for program
storage, Timer
and Interrupt control units and
dedicated I/O ports
It is a dependent unit. It requires the It is a self contained unit and it
combination of doesn’t require
other chips like Timers, Program and external Interrupt Controller, Timer,
data memory UART etc for its functioning
chips, Interrupt controllers etc for
functioning
Most of the time general purpose in Mostly application oriented or domain
design and operation specific
Doesn‟t contain a built in I/O port. Most of the processors contain multiple
The I/O Port built-in I/O
functionality needs to be implemented ports which can be operated as a single
with the help of 8 or 16 or 32
external Programmable Peripheral bit Port or as individual port pins
Interface Chips like
8255
Targeted for high end market where Targeted for embedded market where
performance is important performance is
not so critical (At present this
demarcation is invalid)
Limited power saving options Includes lot of power saving features
compared to microcontrollers
General Purpose Processor (GPP) Vs Application Specific
Instruction Set Processor (ASIP)
The need for an ASIP arises when the traditional general purpose
processor are unable to meet the increasing application needs
The execute stage reads the operands, perform ALU operations and stores the result.
In conventional program execution, the fetch and decode operations are performed in
sequence
During the decode operation the memory address bus is available and if it possible to effectively
utilize it for an instruction fetch, the processing speed can be increased
In its simplest form instruction pipelining refers to the overlapped execution of instructions
ASIC integrates several functions into a single chip and thereby reduces the system
development cost
Most of the ASICs are proprietary products. As a single chip, ASIC consumes very small area
in the total system and thereby helps in the design of smaller systems with high
capabilities/functionalities.
ASICs can be pre-fabricated for a special application or it can be custom fabricated by using
the components from a re-usable „building block‟ library of components for a particular
customer application Fabrication of ASICs requires a non-refundable initial investment
(Non Recurring Engineering (NRE) charges) for the process technology and
configuration expenses
If the Non-Recurring Engineering Charges (NRE) is born by a third party and the
Application Specific Integrated Circuit (ASIC) is made openly available in the market,
the ASIC is referred as Application Specific Standard Product (ASSP)
Logic devices can be classified into two broad categories - Fixed and
Programmable. The circuits in a fixed logic device are permanent, they perform
one function or set of functions - once manufactured, they cannot be changed
Programmable logic devices (PLDs) offer customers a wide range of logic
capacity, features, speed, and voltage characteristics - and these devices can be re-
configured to perform any number of functions at any time
Designers can use inexpensive software tools to quickly develop, simulate, and test
their logic designs in PLD based design. The design can be quickly programmed
into a device, and immediately tested in a live circuit
FPGA:
FPGA is an IC designed to be configured by a designer after manufacturing.
FPGAs offer the highest amount of logic density, the most features, and
the highest performance.
Logic gate is Medium to high density ranging from 1K to 500K system gates
Page 11
These advanced FPGA devices also 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
CPLD:
A complex programmable logic device (CPLD) is a programmable logic
device with complexity between that of PALs and FPGAs, and architectural
features of both.
CPLDs, by contrast, offer much smaller amounts of logic - up to about 10,000
gates.
CPLDs offer very predictable timing characteristics and are therefore ideal for
critical control applications.
CPLDs such as the Xilinx CoolRunner series also require extremely low amounts
of power and are very inexpensive, making them ideal for cost-sensitive, battery-
operated, portable applications such as mobile phones and digital handheld assistants.
ADVANTAGES OF PLDs:
• PLDs offer customer much more flexibility during design cycle
• PLDSs do not require long lead times for prototype or production-the PLDs are
already on a distributor‟s self and ready for shipment
• PLDs do not require customers to pay for large NRE costs and purchase expensive
mask sets
• PLDs allow customers to order just the number of parts required when they need
them. allowing them to control inventory.
The major advantage of using COTS is that they are readily available in the
market, cheap and a developer can cut down his/her development time to a great
extend.
There is no need to design the module yourself and write the
manufacturer.
The major problem faced by the end-user is that there are no
operational and manufacturing standards.
Memory:
Memory is an important part of an embedded system. The memory used in
embedded system can be either Program Storage Memory (ROM) or Data
memory (RAM)
Different mechanisms are used for the masking process of the ROM, like
Creation of an enhancement or depletion mode transistor through channel
implant
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.
The limitation with MROM based firmware storage is the inability to
modify the device firmware against firmware upgrades.
The MROM is permanent in bit storage, it is not possible to alter the bit
information
[Link] Read Only Memory (PROM) / (OTP) :
It is not pre-programmed by the manufacturer
The end user is responsible for Programming these devices.
PROM/OTP has nichrome or polysilicon wires arranged in a matrix, these
wires can be functionally viewed as fuses.
EPROM stores the bit information by charging the floating gate of an FET
Bit information is stored by using an EPROM Programmer, which applies high
voltage to charge the floating gate
EPROM contains a quartz crystal window for erasing the stored information.
If the window is exposed to Ultra violet rays for a fixed duration, the entire
memory will be erased
Dynamic RAM stores data in the form of charge. They are made up of MOS transistor
gates
The advantages of DRAM are its high density and low cost compared to
SRAM
The disadvantage is that since the information is stored as charge it
gets leaked off with time and to prevent this they need to be
refreshed periodically
Special circuits called DRAM controllers are used for the refreshing operation. The
refresh operation is done periodically in milliseconds interval
SRAM Vs DRAM:
SRAM Cell DRAM Cell
Made up of 6 CMOS transistors Made up of a MOSFET and a capacitor
(MOSFET)
Doesn‟t Require refreshing Requires refreshing
Low capacity (Less dense) High Capacity (Highly dense)
More expensive Less Expensive
Fast in operation. Typical access time is Slow in operation due to refresh
10ns requirements. Typical access time is
60ns.
Write operation is faster than read
operation.
It contains Static RAM based memory and a minute battery for providing supply
to the memory in the absence of external power supply
The memory and battery are packed together in a single package
NVRAM is used for the non volatile storage of results of operations or for setting up
of flags etc
DS1744 from Maxim/Dallas is an example for 32KB NVRAM
Memory selection for Embedded Systems:
• Selection of suitable memory is very much essential step in high
performance applications, because the challenges and limitations of the system
performance are often decided upon the type of memory architecture.
• Systems memory requirement depend primarily on the nature of the
application that is planned to run on the system.
• Memory performance and capacity requirement for low cost systems are small,
whereas memory throughput can be the most critical requirement in a complex,
high performance system.
• Following are the factors that are to be considered while selecting the memory
devices,
Speed
Data storage size and capacity
Bus width
Power consumption
Cost
Memory for holding non-volatile data which are modifiable by the application.
The memory requirement for an embedded system in terms of RAM (SRAM/DRAM)
and ROM (EEPROM/FLASH/NVRAM) is solely dependent on the type of the embedded
system and applications for which it is designed.
There is no hard and fast rule for calculating the memory requirements.
Lot of factors need to be considered for selecting the type and size of memory for
embedded system.
If on-chip memory is not sufficient then how much external memory need to be
interfaced.
If the ES design is RTOS based ,the RTOS requires certain amount of RAM for its
execution and ROM for storing RTOS Image.
The RTOS suppliers gives amount of run time RAM requirements and program memory
requirements for the RTOS.
Additional memory is required for executing user tasks and user applications.
On a safer side, always add a buffer value to the total estimated RAM and ROM
requirements.
A smart phone device with windows OS is typical example for embedded device
requires say 512MB RAM and 1GB ROM are minimum requirements for running
the mobile device.
And additional RAM &ROM memory is required for running user applications.
So estimate the memory requirements for install and run the user applications without
facing memory space.
Memory can be selected based on size of the memory ,data bus and address bus size of
the processor/controller.
Memory chips are available in standard sizes like 512 bytes,1KB,2KB ,4KB,8KB,16
KB
….1MB etc.
FLASH memory is the popular choice for ROM in embedded applications .
It is powerful and cost-effective solid state storage technology for mobile electronic
devices and other consumer applications.
The serial EEPROM saves the address space of the total system.
The memory capacity of the serial EEPROM is expressed in bits or Kilobits.
Sensors & Actuators:
• Embedded system is in constant interaction with the real world
• Controlling/monitoring functions executed by the embedded
system is achieved in accordance with the changes happening
to the Real World.
• The changes in the system environment or variables are
detected by the sensors connected to the input port of the
embedded system.
Page 23
Actuator:
Page 24
The I/O Subsystem:
The I/O subsystem of the embedded system facilitates the interaction of the
embedded system with external world
The interaction happens through the sensors and actuators connected to the
Input and output ports respectively of the embedded system
The sensors may not be directly interfaced to the Input ports, instead
they may be interfaced through signal conditioning and translating
systems like ADC, Optocouplers etc
R
indication in any embedded system
For proper functioning of the LED, the anode of it should be connected to +ve terminal
of the supply voltage and cathode to the –ve terminal of supply voltage
The current flowing through the LED must limited to a value below the maximum current
that it can conduct.
A resister is used in series between the power supply and the resistor to limit the current
through the LED
The 7 – segment LED display is an output device for displaying alpha numeric characters
It contains 8 light-emitting diode (LED) segments arranged in a special form. Out of the 8
LED segments, 7 are used for displaying alpha numeric characters
Page 25
The LED segments are named A to G and the decimal point LED segment is named as
DP
The LED Segments A to G and DP should be lit accordingly to display numbers and
characters
The 7 – segment LED displays are available in two different configurations, namely;
Common anode and Common cathode
In the Common anode configuration, the anodes of the 8 segments are connected
commonly whereas in the Common cathode configuration, the 8 LED segments share a
common cathode line
Based on the configuration of the 7 – segment LED unit, the LED segment anode or
cathode is connected to the Port of the processor/controller in the order „A‟ segment to
the Least significant port Pin and DP segment to the most significant Port Pin.
The current flow through each of the LED segments should be limited to the maximum
value supported by the LED display unit
DPGF ED C B A
Common Anode LED Display Cathode
The typical value for the current falls within the range of 20mA
The current through each segment can be limited by connecting a current limiting resistor
to the anode or cathode of each segment
Page 26
In electronic circuits, optocoupler is used for suppressing interference in data
communication, circuit isolation, High voltage separation, simultaneous separation and
intensification signal etc
It differs from the normal dc motor in its operation. The dc motor produces
continuous rotation on applying dc voltage whereas a stepper motor produces discrete
rotation in response to the dc voltage applied to it
Unipolar
Bipolar
Page 27
ES UNIT-2 Notes
Unipolar: A unipolar stepper motor contains two windings per phase. The direction of
rotation (clockwise or anticlockwise) of a stepper motor is controlled by changing the
direction of current flow. Current in one direction flows through one coil and in the
opposite direction flows through the other coil. It is easy to shift the direction of rotation
by just switching the terminals to which the coils are connected
Bipolar: A bipolar stepper motor contains single winding per phase. For reversing the
motor rotation the current flow through the windings is reversed dynamically. It requires
complex circuitry for current flow reversal
The „Relay‟ unit contains a relay coil made up of insulated wire on a metal core and a metal
armature with one or more contacts.
„Relay‟ works on electromagnetic principle.
When a voltage is applied to the relay coil, current flows through the coil, which in turn
generates a magnetic field.
The magnetic field attracts the armature core and moves the contact point.
The movement of the contact point changes the power/signal flow path.
The Relay is normally controlled using a relay driver circuit connected to the port pin of the
processor/controller
A transistor can be used as the relay driver. The transistor can be selected depending on the
relay driving current requirements.
Page 28
6. The I/O Subsystem – I/O Devices -Piezo Buzzer:
• The tone can be varied by applying a variable pulse train to the piezoelectric buzzer.
• A Piezo Buzzer can be directly interfaced to the port pin of the processor/Controller.
Push button switch comes in two configurations, namely „Push to Make‟
and „Push to Break‟
The switch is normally in the open state and it makes a circuit
contact when it is pushed or pressed in the „Push to Make‟
configuration.
The push button stays in the „closed‟ (For Push
to Make type) or „open‟ (For Push to Break
type) state as long as it is kept in the pushed
state and it breaks/makes the circuit connection
when it is released.
Push button is used for generating a momentary pulse
Page 29