Elements of Embedded Systems

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

ELEMENTS OF EMBEDDED SYSTEMS

Dr. E. Effah
ELEMENTS OF
EMBEDDED
SYSTEMS:

• An embedded system is a
combination of 3 things,
Hardware, Software and
Mechanical Components
• A typical embedded system
contains a single chip
controller which acts as the
master brain of the system.
ELEMENTS OF EMBEDDED
SYSTEMS

• ES basically regulates a physical variable


(temperature, height, position, etc) or
manipulates the state of devices via
actuators or devices connected to the
output port system (e.g. Air Conditioner,
light, pump/motor, etc), in response to the
input signal provided by the end users or
sensors from the input ports.
• ES can be a reactive system.
• The control is achieved by processing the
information coming from the sensors and
user interfaces and controlling some
actuators that regulate the physical
variable.
ELEMENTS OF EMBEDDED
SYSTEMS

The memory of the system is responsible for


holding the code (control algorithm and other
important configuration details). There are
two types of memories are used in any
embedded system. Fixed memory (ROM) is
used for storing code or program.

The user cannot change the firmware in this


type of memory. The most common types of
memories used in embedded systems for
control algorithm storage are OTP, PROM,
UVEPROM, EEPROM and FLASH
ELEMENTS OF EMBEDDED
SYSTEMS

• 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 ES, the controller
may contain internal memory for storing
code such controllers are called Micro-
controllers with on-chip ROM, eg. Atmel
AT89C51.
The Core of the Embedded Systems

• The core of the embedded system falls into any one of the following categories.

• General Purpose and Domain Specific Processors


• Microprocessors
• Microcontrollers
• Digital Signal Processors

• Programmable Logic Devices (PLDs)


• Application Specific Integrated Circuits (ASICs)
• Commercial off the shelf Components (COTS)

• Almost 80% of ESs are processor/ controller based. The processor may be microprocessor
or a microcontroller or digital signal processor, depending on the domain and application.
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

• In general the CPU contains the Arithmetic and Logic Unit (ALU), Control Unit and
Working registers

• Microprocessor is a dependant unit and it requires the combination of other hardware like
Memory, Timer Unit, and Interrupt Controller etc for proper functioning.
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
General Purpose Processor (GPP) Vs Application
Specific Instruction Set Processor (ASIP)

• GPP is a processor designed for general computational tasks


• GPPs are produced in large volumes and target the general market. Due to the high-volume production, the
per unit cost for a chip is low compared to ASIC or other specific ICs.
• A typical GPP contains an Arithmetic and Logic Unit (ALU) and Control Unit (CU)
• ASIPs are processors with architecture and instruction set optimized to specific domain/application
requirements like Network processing, Automotive, Telecom, media applications, digital signal processing,
control applications, etc.

• ASIPs fill the architectural spectrum between GPP and Application Specific Integrated Circuits (ASICs). The
need for an ASIP arises when the traditional GPP is unable to meet the increasing application needs
• Some Microcontrollers (like Automotive AVR, USB AVR from Atmel), System on Chips, Digital Signal Processors,
etc. are examples of ASIPs. ASIPs incorporates a processor and on-chip peripherals, demanded by the
application requirement, program and data memory
Digital Signal Processors (DSPs)

• Powerful special purpose 8/16/32 bit microprocessors designed specifically to meet the computational
demands and power constraints of today's embedded audio and video signal processing, telecommunication
and multimedia applications.
• Digital Signal Processors are 2 to 3 times faster than the GPPs in signal processing applications
• DSPs implement algorithms in hardware which speeds up the execution whereas general purpose processors
implement the algorithm in firmware and the speed of execution depends primarily on the clock for the
processors

• DSP can be viewed as a microchip designed for performing high speed computational operations for
„addition‟, „subtraction‟, „multiplication‟ and „division‟
• A typical Digital Signal Processor incorporates the following key units:
• Program Memory
• Data Memory
• Computational Engine
• I/O Unit
RISC V/s CISC
Processors/Controllers
RISC V/s CISC Processors/Controllers

• CISC and RISC: (Complex/Reduced Instruction Set Computer, respectively) are dominant
processor architecture paradigms. Computers of the two types are differentiated by the
nature of the data processing instruction sets interpreted by their central processing units
(CPUs).
• The terms Harvard and Von-Neumann refers to the
processor architecture design.

• Microprocessors/controllers based on the Von-Neumann


architecture shares a single common bus for fetching both
instructions and data. Program instructions and data are
Harvard V/s Von- stored in a common main memory.
Neumann
Processor/Controller • Microprocessors/controllers based on the Harvard
architecture will have separate data bus and instruction
Architecture 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”)
Harvard V/s Von-Neumann
Processor/Controller Architecture
Harvard V/s Von-Neumann
Processor/Controller Architecture types
Harvard V/s Von-Neumann
Processor/Controller Architecture types
Application Specific Integrated Circuit (ASIC)
• A microchip designed to perform a specific or unique application. It is used as a replacement for
conventional general-purpose logic chips.
• 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
Application Specific Integrated Circuit (ASIC)
• 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)
• The ASSP is marketed to multiple customers just as a general-purpose product, but to a smaller
number of customers since it is for a specific application.
• Some ASICs are proprietary products, the developers are not interested in revealing the internal details.
Programmable Logic Devices (PLDs)
• Logic devices provide specific functions, including device-to-device interfacing, data communication,
signal processing, data display, timing and control operations, and almost every other function a system
must perform.
• Logic devices can be classified into two broad categories: Field Programmable Gate Arrays (FPGAs)
and Complex Programmable Logic Devices (CPLDs) are the two major types of PLDs

• 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
• PLDs are based on re-writable memory technology and the device is reprogrammed to change the
design
Programmable Logic Devices (PLDs)
• ADVANTAGES OF PLDs:
• PLDs offer customers much more flexibility during the 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.
• PLDs are reprogrammable even after a piece of equipment is shipped to a customer.
• The manufacturers are able to add new features or upgrade the PLD-based products that are in the
field by uploading new programming file
Commercial off the Shelf Component (COTS)
• A Commercial off-the-shelf (COTS) product is one that
is used as it is
• COTS products are designed in such a way to provide
easy integration and interoperability with existing
system components
• Typical examples for the COTS hardware unit are
Remote Controlled Toy Car control unit including the
RF Circuitry part, High performance, high frequency
microwave electronics (2 to 200 GHz), High bandwidth
analog-to-digital converters, Devices and components
for operation at very high temperatures, Electro-optic
IR imaging arrays, UV/IR Detectors etc
Commercial off the Shelf Component (COTS)
• A COTS component in turn contains a GPP or Application
Specific Instruction Set Processor (ASIP) or Application
Specific Integrated Chip (ASIC)/Application Specific Standard
Product (ASSP) or Programmable Logic Device (PLD)

• 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 extent.
• There is no need to design the module yourself and write the
firmware.
• Everything will be readily supplied by the COTs manufacturer.
Commercial off the Shelf Component
(COTS)
• The major problem faced by the end-user is that there are no
operational and manufacturing standards.

• The major drawback of using COTs component in embedded


design is that the manufacturer may withdraw the product or
discontinue the production of the COTs at any time if rapid
change in technology

• This problem adversely affects a commercial manufacturer of


the embedded system which makes use of the specific COTs
Memory
Memory
• The memory used in an ES can be either
• Program Storage Memory (ROM)
• Data memory (RAM)

• Certain Embedded processors/controllers contain built-in program memory and data memory and this
memory is known as on-chip memory
• Certain Embedded processors/controllers do not contain sufficient memory inside the chip and requires
external memory called off-chip memory or external memory.

• Memory – Program Storage Memory:


Stores the program instructions
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
Memory –
Program Storage
Memory
Depending on the fabrication, erasing and
programming techniques they are classified
Masked ROM (MROM):
• One-time programmable memory. Uses hardwired technology for storing data. The device is factory
programmed by masking and metallization process according to the data provided by the end user.
• The primary advantage of MROM is its low cost for high-volume production. MROM is the least expensive
type of solid-state memory.
• Different mechanisms are used for the masking process of the ROM, like
• Creation of an enhancement or depletion mode transistor through channel implant.
• 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.

• The limitation of 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
Programmable 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.
• It is programmed by a PROM programmer which selectively burns the fuses according to the bit pattern to be
stored.
• Fuses that are not blown/burned represent a logic “1” whereas fuses that are blown/burned represent a logic
“0”. The default state is logic “1”.

• OTP is widely used for commercial production of embedded systems whose prototyped versions are proven
and the code is finalized.
• It is a low-cost solution for commercial production.
• OTPs cannot be reprogrammed.
Erasable Programmable Read Only Memory (EPROM):
• Erasable Programmable Read Only (EPROM) memory gives the flexibility to re-program the same chip.

• During the development phase, code is subject to continuous changes and using an OTP is not economical.
• EPROM stores the bit information by charging the floating gate of a 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 needs to be put in a UV eraser device for 20 to 30 minutes
Electrically Erasable Programmable Read Only Memory
(EEPROM)
• Erasable Programmable Read Only (EPROM) memory gives the flexibility to re-program the same chip using
electrical signals
• 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 within the 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).
Program Storage Memory – FLASH
• FLASH memory is a variation of EEPROM technology.
• FLASH is the latest ROM technology and is the most popular ROM technology used in today’s embedded
designs
• It combines the re-programmability of EEPROM and the high capacity of standard ROMs
• FLASH memory is organized 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.
Read-Write Memory/Random Access Memory (RAM)

• RAM is the data memory or working


memory of the controller/processor
• 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)
Read-Write Memory/Random Access Memory (RAM)
1. Static RAM (SRAM):
• Static RAM stores data in the form of Voltage.
• They are made up of flip-flops
• In a typical implementation, an SRAM cell (bit) is realized using 6 transistors (or 6 MOSFETs).
• Four of the transistors are used for building the latch (flip-flop)
• Static RAM is the fastest form of RAM available.
• SRAM is fast in operation due to its resistive networking and switching capabilities

2. Dynamic RAM (DRAM)


• 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
Read-Write Memory/Random Access Memory (RAM)
Read-Write Memory/Random Access Memory (RAM)

3. Non-Volatile RAM (NVRAM):

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 an 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
Memory selection for Embedded Systems
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

• Selection of suitable memory is very much essential step in high-performance application because the
challenges and limitations of the system performance are often decided on the type of memory architecture.

• Systems memory requirements depend primarily on the nature of the application that is planned to run on the
system.

• Memory performance and capacity requirements for low-cost systems are small, whereas memory throughput
can be the most critical requirement in a complex, high-performance system.

• 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 the applications for
which it is designed.
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.

• If the embedded system is designed for any controlling purpose, the system will produce some changes in
controlling variable to bring the controlled variable to the desired value.
• It is achieved through an actuator connected to the out port of the embedded system.

Sensor:
A transducer device that converts energy from one form to another for any measurement or control
purpose. Sensors act as input device.
Sensors
Actuators
A form of transducer device (mechanical or electrical) which converts signals to corresponding physical
action (motion). Actuator acts as an output device

You might also like