0% found this document useful (0 votes)
73 views28 pages

Module 4

The document discusses the core components of embedded systems including processors, memory, sensors, actuators and other interfaces. It describes different types of embedded systems based on generation, complexity, determinism and triggering. It also discusses major application areas and purposes of embedded systems.

Uploaded by

sneha.perampalli
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)
73 views28 pages

Module 4

The document discusses the core components of embedded systems including processors, memory, sensors, actuators and other interfaces. It describes different types of embedded systems based on generation, complexity, determinism and triggering. It also discusses major application areas and purposes of embedded systems.

Uploaded by

sneha.perampalli
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/ 28

MODULE-4

Embedded System Components: Embedded Vs General computing system, History of embedded systems,
Classification of Embedded systems, Major applications areas of embedded systems, purpose of embedded
systems.
Core of an Embedded System including all types of processor/controller, Memory, Sensors, Actuators, LED, 7
segment LED display, stepper motor, keyboard, Push button switch, Communication Interface (onboard and
external types), Embedded firmware, Other system components.
Textbook 2: Chapter 1 (Sections 1.2 to 1.6), Chapter 2 (Sections 2.1 to 2.6)
Text book: Shibu K V, “Introduction to Embedded Systems”, Tata McGraw Hill Education Private Limited, 2nd
Edition

Notes prepared by:


Mr.Chetan.R, Sr.Asst.Professor.
WHAT IS AN 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)”.

Every embedded system is unique, and the hardware as well as the firmware is highly specialized to the
application domain. Embedded systems are becoming an inevitable part of any product or equipment in all
fields including household appliances, telecommunications, medical equipment, industrial control, consumer
products, etc.

EMBEDDED SYSTEMS VS GENERAL COMPUTING SYSTEMS


The Embedded System and the General purpose computer are at two extremes. The embedded system is
designed to perform a specific task whereas as per definition the general purpose computer is meant for general
use. It can be used for playing games, watching movies, creating software, work on documents or spreadsheets
etc. Following are certain specific points of difference between embedded systems and general purpose
computers:

SMVITM,UDUPI Page 1
EMBEDDED SYSTEM COMPONENTS

CLASSIFICATION OF EMBEDDED SYSTEMS


1. Based on generation
2. Complexity and performance requirements
3. Based on deterministic behavior
4. Based on triggering

1. On generation
First generation (1G):
Built around 8bit microprocessor & microcontroller.
Simple in hardware circuit & firmware developed.
Examples: Digital telephone keypads.
Second generation (2G):
Built around 16-bit μp & 8-bit μc.
They are more complex & powerful than 1G μp & μc.
Examples: SCADA systems
Third generation (3G):
Built around 32-bit μp & 16-bit μc.
Concepts like Digital Signal Processors(DSPs), Application Specific Integrated Circuits(ASICs)
evolved.
Examples: Robotics, Media, etc.
Fourth generation:
Built around 64-bit μp & 32-bit μc.
The concept of System on Chips (SoC), Multicore Processors evolved.
Highly complex & very powerful.
Examples: Smart Phones.

2. On complexity & performance


Small-scale:
Simple in application need Performance not time-critical.
Built around low performance &
low cost 8 or 16 bitμp/μc.
Example: an electronic toy
Medium-scale:
Slightly complex in hardware & firmware requirement.
Built around medium performance & low cost 16 or 32 bit μp/μc.
Usually contain operating system.
Examples: Industrial machines.
Large-scale:
Highly complex hardware & firmware.
Built around 32 or 64 bit RISC μp/μc or PLDs or MulticoreProcessors.
Response is time-critical.
Examples: Mission critical applications.

SMVITM,UDUPI Page 2
EMBEDDED SYSTEM COMPONENTS

3. On deterministic behaviour
This classification is applicable for “Real Time” systems.
The task execution behaviour for an embedded systemmay be deterministic or non-deterministic.
Based on execution behaviour Real Time embeddedsystems are divided into Hard and Soft.

4. On triggering
Embedded systems which are “Reactive” in nature canbe based on triggering.
Reactive systems can be:
Event triggered
Time triggered

MAJOR APPLICATION AREA OF EMBEDDED SYSTEMS

The application areas and the products in the embedded domain are countless.

1. Consumer Electronics: Camcorders, Cameras.


2. Household appliances: Washing machine, Refrigerator.
3. Automotive industry: Anti-lock breaking system(ABS), engine control.
4. Home automation & security systems: Air conditioners, sprinklers, fire alarms.
5. Telecom: Cellular phones, telephone switches.
6. Computer peripherals: Printers, scanners.
7. Computer networking systems: Network routers and switches.
8. Healthcare: EEG, ECG machines.
9. Banking & Retail: Automatic teller machines, point of sales.
10. Card Readers: Barcode, smart card readers.

PURPOSE OF EMBEDDED SYSTEM

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:
 Embedded system designed for the purpose of data collection performs acquisition of data from the
external world.
 Data collection is usually done for storage, analysis, manipulation and transmission.
 Data can be analog or digital.
Embedded systems with analog data capturing techniques collect data directly in the form of analog signal
whereas an embedded system with digital data collection mechanism converts the analog signal to the
digital signal using analog to digital converters.
SMVITM,UDUPI Page 3
EMBEDDED SYSTEM COMPONENTS

2. Data communication:
 Embedded data communication systems are deployed in applications from complex satellite
communication to simple home networking systems.
 The transmission of data is achieved either by a wire-line medium or by a wire-less medium.
 Data can either be transmitted by analog means or by digital means.
 Wireless modules-Bluetooth, Wi-Fi.
 Wire-line modules-USB, TCP/IP.
 Network hubs, routers, switches are examples of dedicated data transmission embedded systems.

3. Data signal processing:


 Embedded systems with signal processing functionalities are employed in applications demanding
signal processing like speech coding, audio video codec, transmission applications.
 A digital hearing aid is a typical example of an embedded system employing data processing.
 Digital hearing aid improves the hearing capacity of hearing impaired person

4. Monitoring:
 All embedded products coming under the medical domain are with monitoring functions.
 Electro cardiogram machine is intended to do the monitoring of the heartbeat of a patient but it cannot
impose control over the heartbeat.
 Other examples with monitoring function are digital CRO, digital multi-meters, and logic analyzers.

5. Control:
 A system with control functionality contains both sensors and actuators.
 Sensors are connected to the input port for capturing the changes in environmental variable and the
actuators connected to the output port are controlled according to the changes in the input variable.
 Air conditioner system used to control the room temperature to a specified limit is a typical example
for CONTROL purpose.

6. Application specific user interface:


 Buttons, switches, keypad, lights, bells, display units etc are application specific user interfaces.
 Mobile phone is an example of application specific user interface.
 In mobile phone the user interface is provided through the keypad, system speaker, vibration alert etc.

SMVITM,UDUPI Page 4
EMBEDDED SYSTEM COMPONENTS

ELEMENTS OF EMBEDDED SYSTEMS

· As defined earlier, an embedded system is a combination of 3 things:


 Hardware
 Software
 Mechanical Components
And it is supposed to do one specific task only.

Embedded systems are basically designed to regulate a physical variable (such Microwave Oven) or to
manipulate the state of some devices by sending some signals to the actuators or devices connected to the output
port system (such as temperature in Air Conditioner), in response to the input signal provided by the end users
or sensors which are connected to the input ports.

 Hence the embedded systems can be viewed as a reactive system.


 Examples of common user interface input devices are keyboards, push button, switches, etc.
 The memory of the system is responsible for holding the code (control algorithm and other important
configuration details).
 An embedded system without code (i.e. the control algorithm) implemented memory has all the peripherals
but is not capable of making decisions depending on the situational as well as real world changes.
 Memory for implementing the code may be present on the processor or may be implemented as a separate
chip interfacing the processor In a controller based embedded system, the controller may contain internal
memory for storing code
 Such controllers are called Micro-controllers with on-chip ROM, eg. Atmel AT89C51.

SMVITM,UDUPI Page 5
EMBEDDED SYSTEM COMPONENTS

CORE THE OF EMBEDDED SYSTEM

Embedded systems are domain and application specific and are built around a central core. The core of the
embedded system falls into any of the following categories:
1. General purpose and Domain Specific Processors
 Microprocessors
 Microcontrollers
 Digital Signal Processors
2. Application Specific Integrated Circuits. (ASIC)
3. Programmable logic devices(PLD‟s)
4. Commercial off-the-shelf components (COTs)

1. GENERAL PURPOSE AND DOMAIN SPECIFIC PROCESSOR.


• Almost 80% of the embedded systems are processor/ controller based.
• The processor may be microprocessor or a microcontroller or digital signal processor, depending on the
domain and application.

1.1 Microprocessors
A microprocessor is a silicon chip representing a central processing unit. · A microprocessor is a
dependent unit and it requires the combination of other hardware like memory, timer unit, and interrupt
controller, etc. for proper functioning. · Developers of microprocessors.
o Intel – Intel 4004 – November 1971(4-bit).
o Intel – Intel 4040.
o Intel – Intel 8008 – April 1972.
o Intel – Intel 8080 – April 1974(8-bit).
o Motorola – Motorola 6800.
o Intel – Intel 8085 – 1976.
o Zilog - Z80 – July 1976.

1.2 Microcontrollers
 A microcontroller is a highly integrated chip that contains 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.
 Texas Instrument‟s TMS 1000 Is considered as the world‟s first microcontroller.
 Some embedded system application require only 8 bit controllers whereas some requiring superior
performance and computational needs demand 16/32 bit controllers.
 The instruction set of a microcontroller can be RISC or CISC
 Microcontrollers are designed for either general purpose application requirement or domain specific
application requirement.

SMVITM,UDUPI Page 6
EMBEDDED SYSTEM COMPONENTS

1.3. Digital Signal Processors


 DSP are powerful special purpose 8/16/32 bit microprocessor designed to meet the computational
demands and power constraints of today‟s embedded audio, video and communication applications.
 DSP are 2 to 3 times faster than general purpose microprocessors in signal processing applications. This
is because of the architectural difference between DSP and general purpose microprocessors.

DSP includes following key units:


i. Program memory: It is a memory for storing the program required by DSP to process the data.
ii. Data memory: It is a working memory for storing temporary variables and data/signal to be
processed.
iii. Computational engine: It performs the signal processing in accordance with the stored program
memory computational engine incorporated many specialized arithmetic units and each of them
operates simultaneously to increase the execution speed. It also includes multiple hardware shifters
for shifting operands and saves execution time.
iv. I/O unit: It acts as an interface between the outside world and DSP. It is responsible for capturing
signals to be processed and delivering the processed signals.

HARVARD V/S VON- NEUMANN

Microprocessors/controllers based on the von-neumann architecture shares a single common bus for fetching
both instructions and data. Program instructions and data are stored in a common main memory. Von-Neumann
architecture based processors/controllers first fetch an instruction and them fetch the data to support the
instruction from code memory. The two separate fetches slows down the controller‟s operation. Von-Neumann
architecture is also referred as Princeton architecture, since it was developed by the Princeton University.

Microprocessors/controllers based on the Harvard architecture will have separate data bus and instruction bus.
This allows the data transfer and program fetching to occur simultaneously on both buses. With Harvard
architecture, the data memory can be read and written while the program memory is being accessed. These
separated data memory and code memory buses allow one instruction to execute while the next instruction is
fetched (“pre-fetching”). The pre-fetch theoretically allows much faster execution than Von-Neumann
architecture. Since some additional hardware logic is required for the generation of control signals for this type
of operation it adds silicon complexity to the system. Fig 2.2 explain the Harvard and Von-Neumann
architecture concept.

I/O CPU Memory Program CPU Data


Memory Memory

Fig. 2.2 Princeton v/s Harvard architecture

SMVITM,UDUPI Page 7
EMBEDDED SYSTEM COMPONENTS

RISC AND CISC

SMVITM,UDUPI Page 8
EMBEDDED SYSTEM COMPONENTS

BIG-ENDIAN VS. LITTLE-ENDIAN PROCESSORS/CONTROLLERS

Endianness specifies the order in which the data is stored in the memory by processor operations in a multi byte
system (Processors whose word size is greater than one byte). Suppose the word length is two byte then data can
be stored in memory in two different ways:
(1) Higher order of data byte at the higher memory and lower order of data byte at location just below the higher
memory.
(2) Lower order of data byte at the higher memory and higher order of data byte at location just below the
higher memory.

Little-endian (Fig. 2.3) means the lower-order byte of the data is stored in memory at the lowest address, and the
higher-order byte at the highest address. (The little end comes first.)

For example, a 4 byte long integer Byte3 Byte2 Byte1 Byte0 will be stored in the memory as shown below:

Big-endian (Fig. 2.4) means the higher-order byte of the data is stored in memory at the lowest address, and the
lower-order byte at the highest address. (The big end comes first.) For example, a 4 byte long integer Byte3
Byte2 Byte1 Byte0 will be stored in the memory as follows :

SMVITM,UDUPI Page 9
EMBEDDED SYSTEM COMPONENTS

2. APPLICATION SPECIFIC INTEGRATED CIRCUITS. (ASIC)


o ASICs is a microchip design to perform a specific and unique applications.
o Because of using single chip for integrates several functions there by reduces the system development
cost.
o Most of the ASICs are proprietary (which having some trade name) products, it is referred as Application
Specific Standard Products(ASSP).
o As a single chip ASIC consumes a very small area in the total system. Thereby helps in the design of
smaller system with high capabilities or functionalities.
o The developers of such chips may not be interested in revealing the internal detail of it .

3. PROGRAMMABLE LOGIC DEVICES(PLD’S)


A PLD is an electronic component. It used to build digital circuits which are reconfigurable.
 A logic gate has a fixed function but a PLD does not have a defined function at the time of
manufacture.
 PLDs offer customers a wide range of logic capacity, features, speed, voltage characteristics.
 PLDs can be reconfigured to perform any number of functions at any time.
 A variety of tools are available for the designers of PLDs which are inexpensive and help  to
develop, simulate and test the designs.

PLDs having following two major types.


1) CPLD(Complex Programmable Logic Device): CPLDs offer much smaller amount of logic up to
1000 gates.
2) FPGAs(Field Programmable Gate Arrays): It offers highest amount of performance as well as
highest logic density, the most features.

Advantages of PLDs :-
1) PLDs offer customer much more flexibility during the design cycle.
2) PLDs do not require long lead times for prototypes or production parts because PLDs are already on a
distributors shelf and ready for shipment.

4. COMMERCIAL OFF-THE-SHELF COMPONENTS (COTS)


a) A Commercial off the Shelf product is one which is used 'asis'.
b) The COTS components itself may be develop around a general purpose or domain specific processor or an
ASICs or a PLDs.
c) The major advantage of using COTS is that they are readily available in the market, are chip and a developer
can cut down his/her development time to a great extent
d) The major drawback of using COTS components in embedded design is that the manufacturer of the COTS
component may withdraw the product or discontinue the production of the COTS at any time if rapid change in
technology occurs.
e) Advantages of COTS: Ready to use, Easy to integrate, & Reduces development time
f) Disadvantages of COTS: No operational or manufacturing standard (all proprietary) & Vendor or
manufacturer may discontinue production of a particular COTS product

SMVITM,UDUPI Page 10
EMBEDDED SYSTEM COMPONENTS

SENSORS & ACTUATORS


SENSOR:
 A Sensor is used for taking Input ·
 It is a transducer that converts energy from one form to another for any measurement or control purpose
· Ex. A Temperature sensor ·
ACTUATORS:
 Actuator is used for output.
 It is a transducer that may be either mechanical or electrical which converts signals to corresponding
physical actions.
LED (LIGHT EMITTING DIODE)
 LED is a p-n junction diode and contains a CATHODE and ANODE
 For functioning the anode is connected to +ve end of power supply and cathode is connected to –ve end of
power supply.
 The maximum current flowing through the LED is limited by connecting a RESISTOR in series
between the power supply and LED as shown in the figure below.

There are two ways to interface an LED to a microprocessor/microcontroller:


1. The Anode of LED is connected to the port pin and cathode to Ground : In this approach the port pin
sources the current to the LED when it is at logic high(ie. 1).
2. The Cathode of LED is connected to the port pin and Anode to Vcc : In this approach the port pin
sources the current to the LED when it is at logic high (ie. 1). Here the port pin sinks the current and the
LED is turned ON when the port pin is at Logic low (ie. 0).

SEVEN SEGMENT LED DISPLAY


The 7-segment LED display is an output device for displaying alphanumeric 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 alphanumeric characters and 1 is used for representing „decimal point‟ in decimal number display.
The LED segments are named A to G and the decimal point LED segment is named as DP. 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.

SMVITM,UDUPI Page 11
EMBEDDED SYSTEM COMPONENTS

PUSH BUTTON SWITCH


It is an input device. Push button switch comes in two configurations, namely „Push to Make‟ and
„Push to Break‟.
In the „Push to Make‟ configuration, the switch is normally in the open state and it makes a circuit
contact when it is pushed or pressed.
In the „Push to Break‟ configuration, the switch is normally in the closed state and it breaks the
circuit contact when it is pushed or pressed.
In the embedded application push button is generally used as reset and start switch.

Stepper Motor:
 Stepper motor is an electro mechanical device which generates discrete displacement (motion) in response
to dc electrical signals.
 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.
 Stepper motors are widely used in industrial embedded applications, consumer electronic products and
robotics control systems.
 The paper feed mechanism of a printer/fax makes use of stepper motors for its functioning.

Based on the coil winding arrangements, a two phase stepper motor is classified into
 Unipolar
 Bipolar

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 .

SMVITM,UDUPI Page 12
EMBEDDED SYSTEM COMPONENTS

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.

In the wave step mode only one phase is energized at a time and each coils of the phase is energized alternatively. The
coils A, B, C, and D are energized in the following order:

The rotation of the stepper motor can be reversed by reversing the order in which the coil is energised.

Two-phase unipolar stepper motors are the popular choice for embedded applications. The current requirement for stepper
motor is little high and hence the port pins of a microcontroller/processor may not be able to drive them directly. Also the
supply voltage required to operate stepper motor varies normally in the range 5V to 24 V. Depending on the current and
voltage requirements, special driving circuits are required to interface the stepper motor with microcontroller/processors.
Commercial off-the-shelf stepper motor driver ICs are available in the market and they can be directly interfaced to the
microcontroller port. ULN2803 is an octal peripheral driver array available from Texas Instruments and ST
microelectronics for driving a 5V stepper motor. Simple driving circuit can also be built using transistors. The following
circuit diagram (Fig. 2.20) illustrates the interfacing of a stepper motor through a driver circuit connected to the port pins
of a microcontroller/processor.

SMVITM,UDUPI Page 13
EMBEDDED SYSTEM COMPONENTS

Keyboard
 Keyboard is an input device for user interfacing. If the number of keys required is very limited, push
button switches can be used and they can be directly interfaced to the port pins for reading.
 However, there may be situations demanding a large number of keys for user input. In such situations it
may not be possible to interface each keys to a port pin due to the limitation in the number of general
purpose port pins available for the processor/controller in use and moreover it is wastage of port pins.
 Matrix keyboard is an optimum solution for handling large key requirements.
 It greatly reduces the number of interface connections.

 In a matrix keyboard, the keys are arranged in matrix fashion (i.e. they are connected in a row and column
style).
 For detecting a key press, the keyboard uses the scanning technique, where each row of the matrix is pulled
low and the columns are read.
 After reading the status of each columns corresponding to a row, the row is pulled high and the next row is
pulled low and the status of the columns are read. This process is repeated until the scanning for all rows are
completed.
 When a row is pulled low and if a key connected to the row is pressed, reading the column to which the key
is connected will give logic 0.

SMVITM,UDUPI Page 14
EMBEDDED SYSTEM COMPONENTS
MEMORY
Memory is an important part of a processor/controller based embedded systems. Some of the
processors/controllers contain built in memory and this memory is referred as on-chip memory. Others do not
contain any memory inside the chip and requires external memory to be connected with the controller/processor
to store the control algorithm. It is called off-chip memory. Also some working memory is required for
holding data temporarily during certain operations. This section deals with the different types of memory used
in embedded system applications.

Program Storage Memory (ROM)


The program memory or code storage memory of an embedded system stores the program instructions and it
can be classified into different types as per the block diagram representation given in Fig. 2.8.

Fig. 2.8 Classification of Program Memory (ROM)

The code memory retains its contents even after the power to it is turned off. It is generally known as
non-volatile storage memory. Depending on the fabrication, erasing, and programming techniques they are
classified into the following types.
Masked ROM (MROM) Masked ROM is a one-time programmable device. Masked ROM makes use of
the hardwired technology for storing data. The device is factory programmed by masking and metallisation
process at the time of production itself, according to the data provided by the end user. The primary
advantage of this is low cost for high volume production. They are the least expensive type of solid state
memory. Different mechanisms are used for the masking process of the ROM, like
(1) Creation of an enhancement or depletion mode transistor through channel implant.
(2) 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.

Masked ROM is a good candidate for storing the embedded firmware for low cost embedded devices.
Once the design is proven and the firmware requirements are tested and frozen, the binary data (The firmware
cross compiled/assembled to target processor specific machine code) corresponding to it can be given to the
MROM fabricator. The limitation with MROM based firmware storage is the inability to modify the device
firmware against firmware upgrades. Since the MROM is permanent in bit storage, it is not possible to alter
the bit information.

SMVITM,UDUPI Page 175


Programmable Read Only Memory (PROM) / (OTP) Unlike Masked ROM Memory, One Time
Programmable Memory (OTP) or PROM is not pre-programmed by the manufacturer. The end user is
responsible for programming these devices. This memory has nichrome or polysilicon wires arranged in
a matrix. These wires can be functionally viewed as fuses. It is programmed by a PROM programmer
which selectively burns the fuses according to the bit pattern to be stored. Fuses which are not blown/burned
represents a logic “1” whereas fuses which are blown/burned represents a logic “0”. The default state is
logic “1”. OTP is widely used for commercial production of embedded systems whose proto-typed versions
are proven and the code is finalised. It is a low cost solution for commercial production. OTPs cannot be
reprogrammed.
Erasable Programmable Read Only Memory (EPROM) OTPs are not useful and worth for development
purpose. During the development phase, the code is subject to continuous changes and using an OTP each
time to load the code is not economical. Erasable Programmable Read Only Memory (EPROM) gives the
flexibility to re-program the same chip. 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 ultraviolet rays for a fixed duration, the entire memory will be erased. Even though the
EPROM chip is flexible in terms of re-programmability, it needs to be taken out of the circuit board and put
in a UV eraser device for 20 to 30 minutes. So it is a tedious and time-consuming process.
Electrically Erasable Programmable Read Only Memory (EEPROM) As the name indicates, the
information contained in the EEPROM memory can be altered by using electrical signals at the register/
Byte level. They can be erased and reprogrammed in-circuit. These chips include a chip erase mode and in
this mode they can be erased in a few milliseconds. It provides greater flexibility for system design. The only
limitation is their capacity is limited when compared with the standard ROM (A few kilobytes).
FLASH FLASH is the latest ROM technology and is the most popular ROM technology usedin today‟s
embedded designs. FLASH memory is a variation of EEPROM technology. It combines the re-
programmability of EEPROM and the high capacity of standard ROMs. FLASH memory is organised as
sectors (blocks) or pages. FLASH memory stores information in an array of floating gate MOSFET transistors.
The 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. The typical erasable capacity of FLASH is of the
order of a few 1000 cycles. SST39LF010 from Microchip (www.microchip.com) is an example of 1Mbit
(Organised as 128K x8) Flash memory with typical endurance of 100,000 cycles.
NVRAM Non-volatile RAM is a random access memory with battery backup. 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. The life span of
NVRAM is expected to be around 10 years. DS1644 from Maxim/Dallas is an example of 32KB
NVRAM.

SMVITM,UDUPI Page 186


EMBEDDED SYSTEM COMPONENTS

Read-Write Memory/Random Access Memory (RAM)


RAM is the data memory or working memory of the controller/processor. Controller/processor can read from
it and write to it. RAM is volatile, meaning when the power is turned off, all the contents are destroyed. RAM
is a direct access memory, meaning we can access the desired memory location directly without the need for
traversing through the entire memory locations to reach the desired memory position (i.e. random access of
memory location). This is in contrast to the Sequential Access Memory (SAM), where the desired memory
location is accessed by either traversing through the entire memory or through a „seek‟ method. Magnetic
tapes, CD ROMs, etc. are examples of sequential access memories. RAM generally falls into three categories:
Static RAM (SRAM), dynamic RAM (DRAM), and non-volatile RAM (NVRAM) (Fig. 2.9).

Read/Write
Memory (RAM)

SRAM DRAM NVRAM

Fig. 2.9 Classification of Working Memory (RAM)

Static RAM (SRAM) Static RAM stores data in the form of voltage. They are made up of flip- flops.
Static RAM is the fastest form of RAM available. In typical implementation, an SRAM cell (bit) is realised
using six transistors (or 6 MOSFETs). Four of the transistors are used for building the latch (flip- flop) part
of the memory cell and two for controlling the access. SRAM is fast in operation due to its resistive
networking and switching capabilities. In its simplest representation an SRAM cell can be visualised as
shown in Fig. 2.10.

Bit Line B\ Bit Line B


Q1 Q3

Q5 Q6

Q2 Q4
Vcc

Word Line

Fig. 2.10 SRAM cell implementation

SMVITM,UDUPI Page 17
This implementation in its simpler form can be visualised as two-cross coupled inverters with read/write
control through transistors. The four transistors in the middle form the cross-coupled inverters. This can be
visualised as shown in Fig. 2.11.
From the SRAM implementation diagram, it is clear Write control Read control
that access to the memory cell is controlledby the
line Word Line, which controls the access
transistors (MOSFETs) Q5 and Q6. The access Data to Data
transistors control the connection to bit lines B & B\. write read
In order to write a value to the memory cell, apply the
desired value to the bit control lines (For writing 1,
make B = 1 and B\ =0; For writing 0, make B = 0 and Fig. 2.11 Visualisation of SRAM cell
B\ =1) and assert the Word Line (Make Word line
high). This operation latches the bit written in the flip-flop. For reading the content of the memory cell, assert
both B and B\ bit lines to 1 and set the Word line to 1.
The major limitations of SRAM are low capacity and high cost. Since a minimum of six transistors
are required to build a single memory cell, imagine how many memory cells we can fabricate on a silicon
wafer.
Dynamic RAM (DRAM) Dynamic RAM stores data in the form of Bit line B
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. Word line
Special circuits called DRAM controllers are used for the refreshing
operation. The refresh operation is done periodically in milliseconds +
interval. Figure 2.12 illustrates the typical implementation of a DRAM –
cell.
The MOSFET acts as the gate for the incoming and outgoing data
whereas the capacitor acts as the bit storage unit. Table given below Fig. 2.12 DRAM cell implementation
summarises the relative merits and demerits of SRAM and DRAM
technology.

SRAM cell DRAM cell


Made up of 6 CMOS transistors (MOSFET) Made up of a MOSFET and a capacitor
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 10ns Slow in operation due to refresh requirements. Typical access
time is 60ns. Write operation is faster than read operation.

NVRAM Non-volatile RAM is a random access memory with battery backup. 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. The life span of NVRAM is expected to be
around 10 years. DS1744 from Maxim/Dallas is an example for 32KB NVRAM.

SMVITM,UDUPI Page 18
EMBEDDED SYSTEM COMPONENTS

COMMUNICATION INTERFACES

INTER INTEGRATED CIRCUIT: I2C

 Developed and patented by Philips for connecting low speed peripherals to a motherboard, embedded
system or cell phone
 Two wire bus , Half duplex, Serial communication, Synchronous, data up to 100 kbits/sec
 Serial data line (SDA)‫‏‬
 Serial clock line (SCL)‫‏‬
 Master controls clock for slaves
 Each connected slave has a unique 7-bit address

a) Transfers are byte oriented, MSB first


b) Start: SDA goes low while SCL is high
c) Master sends address of slave (7-bits) on next 7 clocks
d) Master sends read/write request bit
a. 0-write to slave
b. 1-read from slave
e) Slave ACKs by pulling SDA low on next clock
f) Data transfers now commence

SMVITM,UDUPI Page 19
EMBEDDED SYSTEM COMPONENTS

SERIAL PERIPHERAL INTERFACE (SPI)

1. Synchronous, bidirectional (full duplex)


2. 4 wire serial interface
3. Introduced by Motorola
4. Single master multi slave system
a) MOSI: Master out slave input
b) MISO: Master input slave output
c) SCL: Serial clock
d) SS\: active low, slave device select
5. No acknowledgement mechanism
6. Both Master & slave consist of shift register
7. Configuration can be set/monitored through special built-in register SPCR,SPDR,SPSR

IRDA: INFRARED DATA ASSOCIATION

1. Serial, Half duplex, Line of sight based wireless technology


2. Point-Point, Point-Many Point provided that involved devices are within the line of sight
communication
3. Range 10cm-1m
4. Data rate: SIR (9600bps), MIR (1.15Mbps), FIR (4Mbps),VFIR (16Mbps),UFIR (96Mbps), GIR
(1Gbps)
5. Tx: LED, Rx: Photo diode & Trans-receivers
6. Example: TV Remote control
7. It was popular before Bluetooth in mobile phones for file exchange & low cost device.
8. Two layers: Physical layer & Protocol layer (User defined protocols).

SMVITM,UDUPI Page 20
EMBEDDED SYSTEM COMPONENTS

BLUETOOTH

1. Low cost, Low power, short range wireless technology for data and audio communication.
2. Proposed by Ericsson in 1994.
3. Operates at 2.4Ghz and uses frequency hopping spread spectrum(FHSS).
4. Data rate 1Mbps to 24Mbps.
5. Data range 30 to 100 feet.
6. Two layers: Physical layer & Protocol layer (User defined protocols).
7. Each bluetooth device will have a 48 bit unique identification number.
8. P-P (Master-slave), P-MP( Piconet- Max. slaves 7).
9. File transfer in mobiles, Medical sectors.

WiFi- WIRELESS FEDILITY

1. It uses IEEE 802.11 standard


2. Operating frequency 2.4Ghz or 5Ghz
3. Range 100 to 1000 feet
4. Data rate 1Mbps to 1300Mbps
5. Wifi router:
a. Restricts the access to a n/w
b. Assign IP address to device
c. Route data packet to the Intended devices

For communicating with devices over a Wi-Fi network, the device when its Wi-Fi radio is turned ON,
searches the available Wi- Fi network in its vicinity and lists out the Service Set Identifier (SSID) of the
available networks. If the network is security enabled, a password may be required to connect to a particular
SSID. Wi-Fi employs different security mechanisms like Wired Equivalency Privacy (WEP) Wireless
Protected Access (WPA), etc. for securing the data communication.

SMVITM,UDUPI Page 21
EMBEDDED SYSTEM COMPONENTS

ZIGBEE

1. Serial, Wireless, Short range.


2. Data range: Up to 75mtrs to 100mtrs.
3. Data rate: 20kbps to 250kbps.
4. Cost approximately 800- 2000 Rupees.
5. The purpose of the technology to Control and Sensors networks.
6. Operating frequency is 2.4Ghz.
7. It connects 65000 devices (in theory), 240 devices (in practice).
8. Home automation, Medical data collection, Industrial control system and IOT.
9. Low power device.
10. Six layers
d. Application layer
e. Interface layer
f. Security layer
g. Network layer
h. Medium access control layer
i. Physical layer
j.
Mesh Topology

ZigBee Coordinator (ZC)/Network Coordinator: The ZigBee coordinator acts as the root of the ZigBee
network. The ZC is responsible for initiating the ZigBee network and it has the capability to store
information about the network.

ZigBee Router (ZR)/Full func on Device (FFD): Responsible for passing information from device to
another device or to another ZR.

ZigBee End Device (ZED) /Reduced Function on Device (RFD): End device containing ZigBee
functionality for data communication. It can talk only with a ZR or ZC and doesn’t have the capability to act
as a mediator for transferring data from one device to another. The diagram shown in Fig. 2.34 gives an
overview of ZC, ZED and ZR in a ZigBee network.

SMVITM,UDUPI Page 22
EMBEDDED SYSTEM COMPONENTS

SMVITM,UDUPI Page 23
EMBEDDED SYSTEM COMPONENTS

UNIVERSAL ASYNCHRONOUS RECEIVER TRANSMITER (UART)

 Universal Asynchronous Receiver Transmitter (UART) based data transmission is an asynchronous form
of serial data transmission.
 The serial communication settings (Baud rate, number of bits per byte, parity, number of start bits and stop
bit and flow control) for both transmitter and receiver should be set as identical.
 The start and stop of communication is indicated through inserting special bits in the data stream. While
sending a byte of data, a start bit is added first and a stop bit is added at the end of the bit stream. The least
significant bit of the data byte follows the ‘start’ bit.
 The ‘start’ bit informs the receiver that a data byte is about to arrive. The receiver device starts polling its
‘receive line’ as per the baudrate settings. If the baudrate is ‘x’ bits per second, the time slot available for
one bit is 1/x seconds. If parity is enabled for communication, the UART of the transmitting device adds a
parity bit (bit value is 1 for odd number of 1s in the transmitted bit stream and 0 for even number of 1s).

 The UART of the receiving device calculates the parity of the bits received and compares it with the
received parity bit for error checking.
 The UART of the receiving device discards the ‘Start’, ‘Stop’ and ‘Parity’ bit from the received bit stream
and converts the received serial bit data to a word (In the case of 8 bits/byte, the byte is formed with the
received 8 bits with the first received bit as the LSB and last received data bit as MSB).
 For proper communication, the ‘Transmit line’ of the sending device should be connected to the ‘Receive
line’ of the receiving device.

RS-232 C

 RS-232 C (Recommended Standard number 232, revision C) is a full duplex, wired, asynchronous serial
communication interface.
 The RS-232 interface is developed by the Electronics Industries Association (EIA) during the early 1960s.
 RS-232 extends the UART communication signals for external data communication.
 UART uses the standard TTL/CMOS logic (Logic ‘High’ corresponds to bit value 1 and Logic ‘Low’
corresponds to bit value 0) for bit transmission whereas RS-232 follows the EIA standard for bit
transmission.
 As per the EIA standard, a logic ‘0’ is represented with voltage between +3 and +25V and a logic ‘1’ is
SMVITM,UDUPI Page 24
EMBEDDED SYSTEM COMPONENTS

represented with voltage between –3 and –25V.


 The RS-232 interface defines various handshaking and control signals for communication apart from the
‘Transmit’ and ‘Receive’ signal lines for data communication.
 RS-232 supports two different types of connectors, namely; DB-9: 9-Pin connector and DB-25: 25-Pin
connector.

 RS-232 is a point-to-point communication interface and the devices involved in RS-232 communication are
called ‘Data Terminal Equipment (DTE)’ and ‘Data Communication Equipment (DCE)’.
 If no data flow control is required, only TXD and RXD signal lines and ground line (GND) are required for
data transmission and reception. The RXD pin of DCE should be connected to the TXD pin of DTE and vice
versa for proper data transmission.
 As per the EIA standard RS-232 C supports baudrates up to 20Kbps (Upper limit 19.2 Kbps) The commonly
used baudrates by devices are 300bps, 1200bps, 2400bps, 9600bps, 11.52Kbps and 19.2Kbps. 9600 is the
popular baudrate setting used for PC communication. The maximum operating distance supported by RS-
232 is 50 feet at the highest supported baudrate.
 Embedded devices contain a UART for serial communication and they generate signal levels conforming to
TTL/CMOS logic. A level translator IC like MAX 232 from Maxim Dallas semiconductor is used for
converting the signal lines from the UART to RS-232 signal lines for communication. On the receiving side
the received data is converted back to digital logic level by a converter IC. Converter chips contain
converters for both transmitter and receiver.

SMVITM,UDUPI Page 25
EMBEDDED SYSTEM COMPONENTS

EMBEDDED FIRMWARE
 Embedded firmware refers to the control algorithm (Program instructions) and or the configuration settings
that an embedded system developer dumps into the code (Program) memory of the embedded system.
 There are various methods available for developing the embedded firmware. They are listed below.
(1) Write the program in high level languages like Embedded C/C++ using an Integrated Development
Environment. (2) Write the program in Assembly language using the instructions supported by your
application’s target processor/controller.
 The process of converting the program written in either a high level language or processor/controller
specific Assembly code to machine readable binary code is called ‘HEX File Creation’.
 The methods used for ‘HEX File Creation’ is different depending on the programming techniques used. If
the program is written in Embedded C/C++ using an IDE, the cross compiler included in the IDE converts it
into corresponding processor/controller understandable ‘HEX File’.
 If you are following the Assembly language based programming technique (method 2), you can use the
utilities supplied by the processor/controller vendors to convert the source code into ‘HEX File’. Also third
party tools are available, which may be of free of cost, for this conversion.
 For a beginner in the embedded software field, it is strongly recommended to use the high level language
based development technique. The reasons for this being: writing codes in a high level language is easy, the
code written in high level language is highly portable
 The embedded software development process in assembly language is tedious and time consuming. The
developer needs to know about all the instruction sets of the processor/controller or at least s/he should carry
an instruction set reference manual with her/him.
 Two types of control algorithm design exist in embedded firmware development.
o The first type of control algorithm development is known as the infinite loop or ‘super loop’ based
approach, where the control flow runs from top to bottom and then jumps back to the top of the
program in a conventional procedure. It is similar to the while (1) { }; based technique in C.
o The second method deals with splitting the functions to be executed into tasks and running these
tasks using a scheduler which is part of a General Purpose or Real Time Embedded Operating
System (GPOS/RTOS).

OTHER SYSTEM COMPONENTS:


The other system components refer to the components/circuits/ICs which are necessary for the proper
functioning of the embedded system.

RESET CIRCUIT
 The reset circuit is essential to ensure that the device is not operating at a voltage level where the device is
not guaranteed to operate, during system power ON.
 The 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 for conventional processors/controllers.

SMVITM,UDUPI Page 26
EMBEDDED SYSTEM COMPONENTS

 The reset signal can be either active high (The processor undergoes reset when the reset pin of the processor
is at logic high) or active low (The processor undergoes reset when the reset pin of the processor is at logic
low).

 Since the processor operation is synchronised to a clock signal, the reset pulse should be wide enough to
give time for the clock oscillator to stabilise before the internal reset state starts.

BROWN-OUT PROTECTION CIRCUIT


 It prevents the processor/controller from unexpected program execution behavior when the supply voltage to
the processor/controller falls below a specified voltage.
 The processor behavior may not be predictable if the supply voltage falls below the recommended operating
voltage. It may lead to situations like data corruption.
 A brown-out protection circuit holds the processor/controller in reset state, when the operating voltage falls
below the threshold, until it rises above the threshold voltage.

 The Zener diode Dz and transistor Q forms the heart of this circuit. The transistor conducts always when the
supply voltage Vcc is greater than that of the sum of VBE and Vz (Zener voltage).
 The transistor stops conducting when the supply voltage falls below the sum of VBE and Vz. Select the
Zener diode with required voltage for setting the low threshold value for Vcc.
 Microprocessor Supervisor ICs like DS1232 from Maxim Dallas, provides Brown-out protection

OSCILLATOR UNIT
 Oscillator unit of the embedded system is responsible for generating the precise clock for the processor.
 Certain processors/controllers integrate a built-in oscillator unit and simply require an external ceramic
resonator/quartz crystal for producing the necessary clock signals.

 The speed of operation of a processor is primarily dependent on the clock frequency. However we cannot
increase the clock frequency blindly for increasing the speed of execution.

SMVITM,UDUPI Page 27
EMBEDDED SYSTEM COMPONENTS

 The total system power consumption is directly proportional to the clock frequency. The power consumption
increases with increase in clock frequency.
 The accuracy of program execution depends on the accuracy of the clock signal.

REAL-TIME CLOCK (RTC)


 It is a system component responsible for keeping track of time.
 RTC holds information like current time (In hours, minutes and seconds) in 12 hour/24 hour format, date,
month, year, day of the week, etc. and supplies timing reference to the system.
 RTCs are available in the form of Integrated Circuits from different semiconductor manufacturers like
Maxim/Dallas, ST Microelectronics etc.
 The 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 IC package.
 The RTC can be configured to interrupt the processor at pre defined intervals or to interrupt the processor
when the RTC register reaches a specified value (used as alarm interrupt).

WATCHDOG TIMER
 In desktop Windows systems, if we feel our application is behaving in an abnormal way or if the system
hangs up, we have the ‘Ctrl + Alt + Del’ to come out of the situation.
 In Embedded system, we have a watchdog to monitor the firmware execution and reset the system
processor/microcontroller when the program execution hangs up.
 A watchdog timer is a hardware timer for monitoring the firmware execution.
 Depending on the internal implementation, the watchdog timer increments/decrements a free running
counter with each clock pulse and generates a reset signal to reset the processor.

 The Microprocessor supervisor IC DS1232 integrates a hardware watchdog timer in it.

SMVITM,UDUPI Page 28

You might also like