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

Embedded Systems by PS CHANDRASHEKAR.

Chpt-2: Architecture of Embedded System 1.

CHAPTER- 2
ARCHITECTURE OF
EMBEDDED SYSTEMS
.

Contents:
2.1 Elements of Embedded system

2.2 Block diagram of Embedded System

2.3: Core of Embedded system

2.4: Memory

2.5: Sensors

2.6: Actuators

2.7: Communication Interface

2.8: Timing circuits

2.9: Input/output subsystem:

2.1 Elements of Embedded system:


An embedded system consists of 3 main components. They are:
1. Hardware,
2. Software
3. Real time operating system.

1 PVP POLYTECHNIC,
Mallathalli Bangalore-56
Embedded Systems by PS CHANDRASHEKAR.
Chpt-2: Architecture of Embedded System 2.

Hardware consists of power supply, processor, memory, timer and


communication ports, application circuits etc.
Software consists of application software, which is required to perform
tasks, depending upon the availability of memory, processor speed, limited
power supply.
The Real time Operating System supervises the application software
and provides the mechanism to run the processor as per schedule switching
from one task to another.

2.2 Block diagram of Embedded System:

Embedded
firmware
Memory (Software)

Communication
interface

Input
port core Output port
sensors

Other
supporting
ICs and
subsystems

A typical embedded system is as shown in the above figure.


The elements are as follows:

2 PVP POLYTECHNIC,
Mallathalli Bangalore-56
Embedded Systems by PS CHANDRASHEKAR.
Chpt-2: Architecture of Embedded System 3.

1. System core: This can be a single chip controller consisting of ALU, control
unit, instruction decoder etc. The core connects to every other unit of the
system.
The system core can be a Microprocessor, a Microcontroller, Field
Programmable Gate Array (FPGA), Digital Signal Processor (DSP),
Application Specific Integrated Circuit (ASIC) or Application Specific
Standard Product (ASSP).

2. Sensors and Actuators:


 Sensors are connected to the input port to receive the inputs from the
user.
 Actuators are connected to the output port.
 Keyboards, push buttons, switches, scanners are the examples of input
user interface devices as sensors.
 LEDs, LCDs, buzzers etc. are the examples for output user interface
devices like actuators.

3. Memory: Memory is a fixed memory, used to store the program files and
temporary data.

4. Communication Interface: This can be an address bus, data bus or control


bus to interconnect the core with other units of the system.

5. Other supporting ICs and subsystems: This depends on the application.


This could be ADC, DAC, Watchdog timer, Brownout circuit, reset circuit,
RTC etc.

6. Core of the embedded system: Depending on the domain or application,


an embedded system is developed around a central core.

7. Embedded firmware: This refers to the control program dumped into


code/program memory.

3 PVP POLYTECHNIC,
Mallathalli Bangalore-56
Embedded Systems by PS CHANDRASHEKAR.
Chpt-2: Architecture of Embedded System 4.
2.3: Core of Embedded system:

The embedded systems are Domain and Application Specific. They are
built around a central core.
1. General purpose and domain specific processors:
They are:
a. Microprocessor
b. Microcontroller
c. Digital Signal Processor

2. Application Specific Integrated Circuits (ASICs).


3. Programmable Logic Devices (PLDs)
4. Commercial Off-the-Shelf Components (COTS).

Components used as core Description

1. Microprocessor  It is a CPU which performs arithmetic and


logic function.

2. Microcontroller  This consists of CPU, memory, ports,


controller functions etc.

3. Digital Signal Processor  It does the high speed computational


(DSP) operations such as addition, subtraction,
multiplication, division etc.

4. Application Specific  It performs the specific operation based on


Integrated circuit (ASIC) the application.

5. Programmable Logic  It is an IC which controls the number of


Device (PLD) gates, flip flops configured to specific
function

6. COTS (Commercial Off  It is a licensed software product.


The Shelf components)

4 PVP POLYTECHNIC,
Mallathalli Bangalore-56
Embedded Systems by PS CHANDRASHEKAR.
Chpt-2: Architecture of Embedded System 5.
I. General purpose and domain specific processors:
i. Microprocessors: Microprocessor is a CPU which does the arithmetic
and logical operations. A CPU consists of ALU, Control unit and
Registers. A microprocessor requires memory, timer, interrupt control
etc. As extra hardware is required, a microprocessor based systems are
bulky.

ii. Microcontroller: A Microcontroller is a highly in integrated chip that


contains a CPU, registers, timers, interrupt controller, ports etc. Since a
microcontroller contains all the necessary functional blocks, it is ideal
for an embedded system.

 Difference between Microprocessor and Microcontroller.

Microprocessor Microcontroller
1. Standalone. The Ram, Rom 1. Single chip. The Ram, Rom and
and other ICs are separately other units are integrated on a
connected. single chip.

2. Memory and input output 2. Memory and I/O capacity are


capacity can be designed. fixed.

3. Microprocessor based system is 3. Microcontroller based system is


heavier and expensive. lighter and economical.

4. Power consumption is more. 4. Power consumption is lesser.

5. Any particular unit can be 5. Entire IC is to be replaced.


replaced.

6. Typically more pipelined. 6. Typically, less pipelined.

5 PVP POLYTECHNIC,
Mallathalli Bangalore-56
Embedded Systems by PS CHANDRASHEKAR.
Chpt-2: Architecture of Embedded System 6.

7. Lesser bit handling instructions. 7. Many bit handling instructions.


.
8. General purpose computers are 8. Specific purpose applications
designed. are designed.

iii. Digital Signal Processors: The Digital Signal Processors are


powerful special purpose 8/16/32 bit microprocessors designed for
computational and power saving ability. They are suitable for audio,
video and communication applications. The DSPs are faster than
general processing applications. DSPs implement algorithms in
hardware. In general, DSPs is a microchip designed for fast
computational operations.
A typical DSP consists of:
a. Program memory: Memory for storing the program.

b. Data memory: Working memory for storing temporary variables and


processing of data or signal.

c. Computational engine: This unit consist of arithmetic units, multiple


hardware shifters etc.

d. I/O unit: This acts as an interface between the outside world and
DSP to capture inputs and deliver processed signals as output. The
DSP finds application in audio video signal processing by employing
real time calculations, Sum of Product calculations, Fast Fourier
Transform (FFT), Discrete Fourier Transform (DFT) etc.

iv. Application Specific Integrated Circuits (ASIC): [Its role in embedded


. system]

ASIC is a microchip designed to perform a specific and unique


applications. The cost is reduced by integrating several functions in a chip.
The ASIC which is a product with a trade name is referred as Application
Specific Standard Product (ASSP).

6 PVP POLYTECHNIC,
Mallathalli Bangalore-56
Embedded Systems by PS CHANDRASHEKAR.
Chpt-2: Architecture of Embedded System 7.
ASIC occupies a small area in a total system and hence it is possible
design smaller systems with higher capabilities and more functionality. The
developers of such chips will not reveal the inner circuit detail to the public.
Ex: Chip used in a voice recorder for satellites etc.
v. Programmable logic devices (PLDs):
PLDs provide specific function in an embedded system. Logic
devices can be embedded system. Logic devices can be classified into 2
categories. i.e. fixed and programmable. The circuit in a fixed logic device are
permanent and they perform one function. These circuits which are once
manufactured cannot be reconfigured. Whereas, with programmable logic
devices designers use inexpensive software tools to quickly develop, simulate
and test their designs.
 CLPDs and FPGAs:
The 2 major types of programmable logic devices are Field
Programmable Gate Array (FPGA) and Complex Programmable Logic Devices
(CPLDs).
FPGAs offer the highest amount of logic density, more features and
highest performance. An example for FPGA is Xilinx Vertex. FPGAs are used in
data processing and storage, instrumentation, telecommunication and DSP.
CPLDs offer smaller amount of logic up to 10,000 gates. An example for
CPLD is Xilinx Cool Runner which requires less power, inexpensive and useful
for mobile phones and digital organisers.

Advantages of PLD:
a. Offers flexibility.
b. Ready to be shipped.
c. Allows to program.

7 PVP POLYTECHNIC,
Mallathalli Bangalore-56
Embedded Systems by PS CHANDRASHEKAR.
Chpt-2: Architecture of Embedded System 8.

vi. Commercial off the shelf Components (COTS):


COTS are the products which can be used as it is and they are designed
in such a way that they can be incorporated into the existing system.
Typical examples of COTS are UV/IR detectors, RF circuitry, analogue to digital
converters etc. The COTS are readily available in the market.
The TCP/IP plug-in module from various manufacturers like WINZNET,
FREESCALE and DYNALOG etc are the examples for products.
The major drawback of using COTS components in embedded design
is that the manufacturers of the COTS component may withdraw the product
or discontinue the production.

2.4: Memory:
Different types of memory used in embedded system applications are:
I. Read Only Memory (ROM):

i. Masked Rom (MROM): This is a onetime programmable device. The


Masked Rom uses the hardwired technology for storing of data. The
advantage of this type of memory is low cost for large scale production.
Hence, this type of memory is much helpful for low cost embedded
system. This memory is factory programmed during the time of
production.
.

ii. Programmable Read-only Memory (PROM): The Programmable Read-


only Memory or One Time Programmable memory (OTP) is not pre-
programmed by the manufacturer. The OTP is widely used for
commercial production of embedded system where the design and
code are finalised. OTPs cannot be reprogrammed.

iii. Erasable Programmable Read-only memory (EPROM): During the


development of code, continuous changing of code is required. EPROM
provides flexibility to reprogram the memory chip after erasing the
information by ultraviolet rays.

8 PVP POLYTECHNIC,
Mallathalli Bangalore-56
Embedded Systems by PS CHANDRASHEKAR.
Chpt-2: Architecture of Embedded System 9.

iv. Electrically Erasable Programmable Read-only memory (EEPROM):


The information contained in the EEPROM can be altered by using the
electrical signals.

v. Flash Memory: This provides the re-programmability of EEPPROM and


high capacity of ROMs. The flash memory is organised as blocks and
hence the erasing can be done quickly in a flash.

vi. NVRAM: Non-Volatile RAM is a Random Axis Memory with battery


backup. It is a Static RAM based memory with a minute battery
providing power supply in absence of external power supply.

II. Read-Write Memory/Random Axis Memory(RAM):


RAM is volatile which means that when the power supply is turned off,
the contents are lost. RAM is a direct access memory which means we can
access the desired memory location randomly. This is in contrast with
Sequential Axis Memory (SAM).
There are 3 types of RAM:
1. SRAM(Static RAM)
2. DRAM(Dynamic RAM)
3. NVRAM(Non Volatile RAM)

1. SRAM (Static RAM):


Static RAM stores the data in the form of
voltage. They are made of flip-flops. Static RAM is
the largest form of RAM available.
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, silicon
wafer requirement is large.

2. Dynamic RAM (DRAM):

9 PVP POLYTECHNIC,
Mallathalli Bangalore-56
Embedded Systems by PS CHANDRASHEKAR.
Chpt-2: Architecture of Embedded System 10.
The DRAM stores data in the form of charges. They are made of
MOSFET which works as a gate and capacitor which acts as a bit storage unit.
The advantage of DRAM is that since it stores the information as a charge, it gets
leaked off with time and hence it is required to refresh periodically. This refresh
operation is done periodically in millisecond interval.

Comparison between SRAM cell & DRAM cell:

SRAM DRAM
1. Made of six MOSFTEs. 1. Made of one MOSFET and a
Capacitor.

2. Refreshing is not required. 2. Refreshing is required.

3. Low capacity 3. High capacity


(low density). (high density).

4. More expensive. 4. Less expensive.

5. Fast operation. The access 5. Slow, as refreshing is required


time is in 10 ns. with access time of 60 ns.

2.5: Sensors:
The sensors are the transducers which converts the physical quantity
into a corresponding voltage. i.e. whenever a sensor is exposed to
temperature, pressure, light etc, it produces a proportional electrical signal. A
sensor responds to the physical phenomenon.
 It’s Role in embedded system:
In an embedded system, any changes in the environment are detected
by the sensors connected to the input
port of an embedded system. The sensor

10 PVP POLYTECHNIC,
Mallathalli Bangalore-56
Embedded Systems by PS CHANDRASHEKAR.
Chpt-2: Architecture of Embedded System 11.
captures the variations at the input and takes the necessary action.
For an example, in an ECG machine, the sensors consist of electrode
set, which are placed on the body of the patient to monitor the heart beat
status.

2.6: Actuators:
Actuators are the devices which are capable performing a physical
action. An actuator is a form of transducer device which converts the
electrical signal into physical action.
 It’s Role in embedded system:
If an embedded system is designed for only monitoring, then there is
no need to include an actuator in the system. If the embedded system is
designed for controlling purposes, then the embedded system produces
the change in the controlling variable to
do the control using the actuators.
For example, in the case of
Automatic Air Cooler system, the sensors
sense the temperature, then captures
and process to the embedded system’s
processor. This value is compared with
the user’s set value and the cooling speed
is controlled.

2.7: Communication Interface:


Communication Interface is essential for communicating with
various subsystems of the embedded system and with the external
world. So, there are 2 communication interfaces. They are:
I. Onboard Communication Interface:
This interconnects various Integrated circuits and other
peripherals within the embedded system.

11 PVP POLYTECHNIC,
Mallathalli Bangalore-56
Embedded Systems by PS CHANDRASHEKAR.
Chpt-2: Architecture of Embedded System 12.
a. Inter Integrated Circuit (I2C): It is a synchronous bidirectional
half duplex (i.e. it is bidirectional but one direction of data
movement at a time), two wire serial interface bus.

b. Serial Peripheral Interface bus (SPI): It is a synchronous full


duplex four wire serial interface bus.
.
c. Universal Asynchronous Receiver Transmitter: UART is an
asynchronous form of transmission and hence doesn’t
require a clock signal. The serial communication setting for
both the transmitter and receiver should match such as baud
rate, number of bits per second, parity, number of start and
stop bits.

d. 1-wire Interface: 1 wire interface is an asynchronous half-


duplex communication. It uses only a signal wire for
communication.

e. Parallel Interface: Onboard parallel interface is used for


communicating with peripheral devices which are memory
mapped to the system

II. External Communication Interface:


This refers to the communication of embedded system with external world.

a. RS232C & RS485: (Here, RS means Recommended Standard.)


RS232C is full duplex, wired, Asynchronous serial communication
interface. An RS232C uses DB-9 and DB-25 pin connectors. RS232 is a point
to point communication interface and the devices connected together are
called DTE (Data Terminal Equipment) or DCE (Data Communication
Equipment).

12 PVP POLYTECHNIC,
Mallathalli Bangalore-56
Embedded Systems by PS CHANDRASHEKAR.
Chpt-2: Architecture of Embedded System 13.
RS485 is the enhanced version of RS232 and it supports multi drop
communication with up to 32 transmitting devices and 32 receiving devices.
b. Universal Serial Bus (USB): USB is a wired high speed serial bus for data
communication. An USB host can support up to 127 connections
.
c. IEEE 1394 (Fire wire): It is a wired isochronous (blocks of data
asynchronously sent) high speed serial Communication bus. This protocol
is popularly known as fire wire.

d. Infrared (IRDA): It is a serial half duplex, line of sight based wireless


technology for data communication between devices. This employs
Infrared waves of the electromagnetic spectrum for transmitting the data.

e. Bluetooth (BT): Bluetooth is a low cost, low power, short range wireless
technology for data and voice communication. Bluetooth operates at 2.4
GHz of the radio frequency spectrum. It supports the data rate of 1 MB/s
and has a range of around 30 feet for data communication.

f. Wi-Fi: It is known as Wireless Fidelity. It is a wireless communication


technique for networked communication of devices. It is essential to have
device identities in a multipoint communication to address specific devices
for data communications like IP address for IP based communication. The
Wi-Fi based communications require a wifi router/wireless access point to
manage communication. Wi-Fi operates at 2.4 GHz or 5 GHz of radio
spectrum. It supports 1 MB/s to 15 MB/s and offers a range of 100-300
feet.

g. Zigbee: Zigbee is a low power, low cost, Wireless network communication.


This is used for Wireless Personal Area Network (WPAN). It works in the
radio band of 2.400 to 2.484 GHz, 902 to 928 MHz and 868.0 to
868.6 MHz. It supports an operating distance of up to 100 meters and
data rate of 20 to 250 KB/s.

h. General Packet Radio Service (GPRS): It is a communication technique for


transferring data over a mobile communication network like GSM. Data is
sent as packets in GPRS communication. GPRS supports transfer rate of
171.2 KB/s. GPRS is mainly used mainly by mobile enabled embedded
devices for data communication.

13 PVP POLYTECHNIC,
Mallathalli Bangalore-56
Embedded Systems by PS CHANDRASHEKAR.
Chpt-2: Architecture of Embedded System 14.
2.8: Timing circuits:
1. Reset circuit:
The reset device is required to reset the device if the voltage is below the
operating value. The reset will make the firmware to execute from the reset
vector (normally 0x0000 is the vector address). The reset signal to the
processor can be applied at the power on through an external passive circuit
consisting of a capacitor, resistor and a freewheeling diode.

The reset pulse width can be adjusted by varying the value of R and C.

2. Brownout protection circuit:


A brownout protection circuit prevents the processor
from the malfunction when the voltage falls below a
reference value. The brownout protection circuit holds
the processor/controller in the reset state, as long as the
voltage is below the threshold value. A brownout
protection circuit consists of Zener diode and a transistor
as shown in the figure.
In the circuit, the transistor conducts when VCC is
greater than VBE +VZ. The transistor stops conducting
when supply voltage goes below VBE+VZ.

14 PVP POLYTECHNIC,
Mallathalli Bangalore-56
Embedded Systems by PS CHANDRASHEKAR.
Chpt-2: Architecture of Embedded System 15.
3. Real time clock:
An RTC (Real time clock) is a component of embedded system
which keeps track of time. RTC holds information like current time
(in hours, minutes and seconds) in 12 hour or 24 hour format, date,
month, year, day of the week etc. and it supplies the timing
reference to the system. RTC is provided with a battery backup cell
for functioning in the absence of power.
For operating system based embedded devices a timing device
is essential for synchronising the operations of OS kernel. RTC
interrupts the OS kernel so as to the OS kernel can update the
system date and time. The RTC interrupt can be used as an alarm at
predefined intervals.

4. Watch dog timer:


Watch dog timer is a hardware timer for
monitoring the firmware execution.
Watchdog timer updates the counter for
each clock pulse and resets if the counter
reaches the end. If the firmware execution
doesn’t complete before counting is
completed, then the system is made to
reset by watchdog timer. Watch dog timer in built or an external
watchdog timer IC can be employed.
If a watchdog timer exists in-built, it provides a status register for
writing the initial value which is used to control to watchdog timer. If
there is no watchdog timer available in-built, then the external
watch dog timer provides external hardware logic for
enabling/disabling and resetting.

15 PVP POLYTECHNIC,
Mallathalli Bangalore-56
Embedded Systems by PS CHANDRASHEKAR.
Chpt-2: Architecture of Embedded System 16.
5. PCB and Passive components:
Printed Circuit Board (PCB) is the back bone of every embedded system. After
deciding upon the components and the circuit to be used, a schematic design
is to be created and a PCB is fabricated according to the schematic. PCB acts
as a platform for mounting all the necessary components as per the design of
the system.
Also, among the other subsystems, passive electronic components like
resistors, capacitors, PN-diodes are provided on-board.
These components are the co-workers of various chips contained in an
embedded system. The uses of such components are for providing ripple-free
voltage supply, spike suppressing etc.

16 PVP POLYTECHNIC,
Mallathalli Bangalore-56

You might also like