Unit 1B Typical Emb Sys

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 52

EMBEDDED SYSTEMS

CHAPTER 1
THE TYPICAL EMBEDDED SYSTEM
INDEX
1. Core of embedded systems
• General purpose and domain specific processor.
• Microprocessors
• Microcontrollers.
• Digital signal processors
• Application Specific Integrated Circuits. (ASIC)
• Programmable logic devices(PLD’s)
• Commercial off-the-shelf components(COTs)
2. Memory
3. Sensors & Actuators
4. Communication Interface
5. Embedded Firmware
6. Other System Components
ELEMENTS OF AN EMBEDDED SYSYTEM.

FIRM-
MEMORY WARE

I/P PORTS SYSTEM CORE O/P PORTS

OTHER DEVICES
• Embedded hardware/software systems are basically designed to regulate a physical
variable or to manipulate the state of some devices by sending some signals to the
actuators or devices connected to the O/P port system, 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.
• Keyboards, push button, switches, etc. are example of common user interface input
devices.
• LED’s, liquid crystal displays, piezzo electrical buzzers, etc. are examples of common
user interface output devices for a typical embedded systems.
5

• Some embedded systems do not require any manual interventions for their
operations.

• The memory of the system is responsible for holding the control algorithm and
other important configuration details.

• An embedded system without the control algorithm implemented memory, ie.


having all the peripherals but not capable of making decissions depending on the
situational as well as real world changes.

• In a controller based embedded system, the controller may contain internal


memory for storing control algorithm.

• Such controllers are called controllers with on-chip ROM, eg. Atmel AT89C51.
CORE OF THE 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.
CORE: -
1.General purpose and Domain Specific Processors
1.1. Microprocessors
1.2. Microcontrollers
1.3. Digital Signal Processors
2. Application Specific Integrated Circuits.(ASIC’s)
3. Programmable logic devices(PLD’s)
4. Commercial off-the-shelf components(COTs)
GENERAL PURPOSE AND DOMAIN SPECIFIC
PROCESSORS.

•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.
MICROPROCESSOR.

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.
 Intel – Intel 4004 – November 1971(4-bit).
 Intel – Intel 4040.
 Intel – Intel 8008 – April 1972.
 Intel – Intel 8080 – April 1974(8-bit).
 Motorola – Motorola 6800.
 Intel – Intel 8085 – 1976.
 Zilog - Z80 – July 1976.
Architectures used for processor design are Harvard or Von- Neumann.
RISC and CISC are the two common Instruction Set Architectures (ISA)
available for processor design.
GENERAL PURPOSE PROCESSOR
vs.
APPLICATION SPECIFIC INSTRUCTION SET PROCESSOR.

A general processor is a processor designed for general computational tasks.


Application specific instruction set processors(ASIPs)are processors with
architecture and instruction set optimized to specific-domain/application requirements
like network processing, automotive, control applications, etc.
The need for an ASIP arises when the traditional general purpose processor are
unable to meet the increasing application needs.
Most of the embedded systems are built around application specific instruction set
processor.
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.
MICROPROCESSOR V/S
MICROCONTROLLER
Microprocessor Microcontroller
 A silicon chip representing a central  A microcontroller is a highly integrated
processing unit(CPU),which is capable chip that contains CPU ,scratchpad
of performing arithmetic as well as RAM, special and general purpose
logical operations according to a pre- register arrays, on chip ROM/FLASH
memory for program storage, timer and
defined set of instructions. interrupt control units and dedicated I/O
ports.
 It is a dependent unit. It requires the
combination of other chips like timers,  It is a self-contained unit and it doesn’t
program etc. for functioning. require external interrupt controller,
timer, UART, etc. for functioning.
 Most of the time general purpose in
design and operation.  Mostly application-oriented or domain-
specific
Microprocessor Microcontroller

 Doesn’t contains a built in I/O port.  Most of the processors contain


The I/O port functionality needs to be multiple built-in I/O ports which can
implemented with the help of external be operated as a single 8 or 16 or 32
programmable peripheral interface bit port or as individual port pins.
chips like 8255.

 Targeted for high end market where  Targeted for embedded market where
performance is important. performance is not important.

 It saves less power as compared to  It saves more power.


microcontroller.
DIGITAL SIGNAL PROCESSOR(DSP)

 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 the two.
 DSPs implement algorithms in hardware which speeds up the execution whereas
general purpose processor implement the algorithm in software and the speed of
execution depends primarily on the clock for the processors.
DSP includes following key units:
1. Program memory:
2. Data memory:
3. Computational engine:
4. I/O unit:
5. Calculations
1. Program memory: It is a memory for storing the program required by DSP to
process the data.
2. Data memory: It is a working memory for storing temporary variables and
data/signal to be processed.
3. 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.
4. 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. Examples: Audio video signal processing, telecommunication and
multimedia applications.
5. Calculations :- SOP(Sum of Products) calculation, convolution, FFT (Fast
Fourier Transform), DFT(Discrete Fourier Transform), etc are some of the
operation performed by DSP.
RISC V/S CISC

 The term RISC stands for Reduced Instruction Set Computing.


 Atmel AVR microcontroller is an example for a RISC processor and
its instruction set contain only 32 instructions.
 The term CISC stands for Complex Instruction Set Computing.
 The original version of 8051 microcontroller (eg.AT89C51) is a
CISC controller and its instruction set contains 255 instructions.
SOME OF THE CRITERIA OF RISC V/S CISC ARE
GIVEN BELOW:
RISC CISC
 It contains lesser number of instructions.  It contains greater number of instructions.

 Instruction pipelining and increased  Generally no instruction pipelining


execution speed. feature.

 Orthogonal instruction set(allows each  Non-orthogonal set(all instructions are


instruction to operate on any register and not allowed to operate on any register and
use any addressing mode. use any addressing mode.

 Operations are performed on registers  Operations are performed on registers or


only, only memory operations are load memory depending on instruction.
and store.

 A large number of registers are  Limited number of general purpose


available. registers are available.
RISC CISC
 Programmer needs to write more code  Instructions are like macros in C
to execute a task since instructions are language. A programmer can achieve
simpler ones. the desired functionality with a single
instruction which in turn provides the
effect of using more simpler single
instruction in RISC.
 It is single, fixed length instruction.  It is variable length instruction.
 More silicon usage since more
 Less silicon usage and pin count. additional decoder logic is required to
implement the complex instruction
decoding.
 Can be Harvard or Von-Neumann
 With Harvard Architecture. Architecture.
HARVARD V/S VON-NEUMANN
ARCHITECTURE
 The term Harvard and Von-Neumann refers to the processor architecture design.
 Harvard architecture have separate data bus and instruction bus.
 Von-Neumann architecture shares single common bus for fetching both instructions
and data.
 It was developed by the Princeton University and so it is referred as Princeton
architecture.
Harvard v/s Von-Neumann Architecture

Harvard architecture Von-Neumann Architecture


 It has separate buses for instruction  It shares single common bus for
and data fetching. instruction and data fetching.

 Easier to pipeline, so high  Low performance as compared to


performance can be achieve. Harvard architecture.

 Comparatively high cost.  It is cheaper.

 No memory alignment problems.  Allows self modifying code.

 Since data memory and program  Since data memory and program
memory are stored physically in memory are stored physically in the
different locations, no chances for same chip, chances for accidental
accidental corruption of program corruption of program memory.
memory.
BIG-ENDIAN V/S LITTLE-ENDIAN
PROCESSORS

 Endianness specifies the order which the data is stored in the


memory by processor operations in a multi byte system.
 If the word length is two byte then data can be stored in 2
different ways:
a) Higher order of data byte at the higher memory and lower order of
data byte at location just below the higher memory.
b) Lower order of data byte at the higher memory and higher order of
data byte at location just below the higher memory.
 Little-endian means lower order  Big-endian means the higher order
data byte is stored in memory at the data byte is stored in memory at the
lowest address and the higher order lowest and the lower order data byte
data byte at the highest address. at the highest address.
 For e.g, 4 byte long integer Byte3,  For e.g. a 4 byte integer Byte3,
Byte2, Byte1, Byte0 will be store in Byte2, Byte1, Byte0 will be stored in
the memory as follows: the memory as follows:
Application Specific Integrated Circuits
(ASICs)
1) ASICs is a microchip design to perform a specific and unique applications.
2) Using single chip for integrating several functions reduces the system
development cost.
3) Most of the ASICs are proprietary (which having some trade name) products, it
is referred as Application Specific Standard Products(ASSP).
4) 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.
5) The developers of such chips may not be interested in revealing the internal
detail of it .
PLD(Programmable Logic Device)

1) A programmable logic device or PLD is an electronic component used to build


reconfigurable digital circuits.

2) Unlike a logic gate, which has a fixed function, a PLD has an undefined function
at the time of manufacture.

3) PLDs offer customers a wide range of logic capacity, features, speed, voltage
characteristics.

4) PLDs can be reconfigured to perform any number of functions at any time.

5) With programmable logic devices, designers use inexpensive software tools to


quickly develop, simulate and test their 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 logic density, most features and the highest
performance
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.

3. PLDs can be reprogrammed even after a piece of equipment is shipped to a


customer
Commercial Off The Shelf Components(COTS)

1) A Commercial Off The Shelf product is one which is used 'as-is'.

2) The COTS components itself may be develop around a general purpose or


domain specific processor or an ASICs or a PLDs.

3) The major advantage of using COTS is that they are readily available in
the market and a developer can cut down his/her development time to a
great extent

4) 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.
Memory
ⱡ Classification of Memory
ⱡ RAM
ⱡ SRAM
ⱡ DRAM
ⱡ ROM
ⱡ ROM
ⱡ PROM
ⱡ EPROM
ⱡ EEPROM
Sensor
1) A sensor is a transducer device that converts energy from one form to
another or any measurement or control purpose.

2) A sensors acts as an input device.

3) One form of sensor technology is radio frequency identification


(RFID).RFID is based on tags that contain microscopic chips used to store
information about the item to which it is attached .
4) Examples:
ⱡ Push button switch
ⱡ Optocoupler
ⱡ Keyboard
Actuators
1) A actuator is a form of transducer device(mechanical or electrical)
which converts signals to corresponding physical action.

2) Actuator acts as an output device.

3) Actuators are devices, such as valves and switches, that perform


actions such as turning things on or off or making adjustments in an
operational system.
Light Emitting Diode (LED)
1) LED is an important output device for visual indication in any embedded system

2) LED can be used as indicator for the status of various signals or situations.

3) LED is a p-n junction diode and it contains an anode and cathode.

4) For proper functioning of the LED the anode of it should be connected to +ve
terminal of the supply voltage and cathode to be -ve terminal of the supply
voltage
5) A resister is used in series between the power supply and LED to limit the current
throw the LED.
7-segment LED display

1) The 7 segment LED display is an output device for displaying alpha numeric
characters.

2) It contains 8 light emitting diodes segments arranged in a special form.

3) Out of 8 LED segments, 7 are used for displaying alpha numeric characters and 1 is
used for representing decimal point in decimal number display.

4) The LED segment are named A to G and the decimal point LED segments is named
as DP.

5) The LED segments A to G are should be lit accordingly to display numbers and
characters.

6) For e.g. for displaying number 4 the segments F,G,B and C are lit.
COMMUNICATION INTERFACE

 Internal Communication Interface


 Inter Integrated Circuit(12C) Bus

 Serial Peripheral Interface (SPI) Bus

 Universal Asynchronous Receiver Transmitter (UART)

 1-Wire Interface

 Parallel Interface

 External Communication Interface


COMMUNICATION INTERFACE
 Communication interface is essential for communicating with
various subsystems of the embedded system and with the
external world.

 For an embedded product , the communication interface can be


viewed in two different perspectives namely:
 Onboard Communication Interface
 External Communication Interface
Onboard Communication
Interfaces
 Internal Communication Interface is an interface which is used
by Embedded system to communicate with on board
components/devices.
 Inter Integrated Circuit(12C) Bus
 Serial Peripheral Interface (SPI) Bus
 Universal Asynchronous Receiver Transmitter (UART)
 1-Wire Interface
 Parallel Interface
Inter Integrated Circuit (I2C) Bus
 The Inter Integrated Circuit Bus (I2C-Pronounced ‘I square C’) is a
 synchronous
 bi-directional
 half duplex (one-directional communication at a given point of time)
 two wire
 serial interface bus.

 The I2C bus comprise of two bus lines , namely;


(a) Serial Clock-SCL
(b) Serial Data-SDA.

 SCL line is responsible for generating synchronization clock pulses


 SDA is responsible for transmitting the serial data across devices.
• I2C bus is shared bus system to which many number of I2C devices can be
connected.

• Devices connected to the I2C bus can act as a ‘Master Device’ or ‘Slave
Device’.

• Master and Slave devices can act as either transmitter or receiver regardless
whether a Master is acting as transmitter or receiver.

• The synchronization clock signal is generated by the Master device only.

3
Serial Peripheral Interface (SPI) Bus
 The Serial Peripheral Interface Bus (SPI) is a
 synchronous
 bi-directional
 full-duplex
 four wire
 serial interface bus.

 SPI is a single master multi-slave system.

 It is possible to have a system where more then one SPI device can be master
, provided the condition only one master device is active at any given point
of time, is satisfied.

4
SPI requires four signal lines for
Communication
 Master Out Slave In (MOSI):  Signal line carrying the data from Master to Slave
device
 It is also known as Slave input

 Master In Slave Out (MISO):  Signal line carrying the data from Slave to Master
device
 It is also known as Slave output.

 Serial Clock (SCLK):


 Signal line carrying the clock signal.

 Slave Select (SS):  Signal line for slave device select .


 It is an active low signal.
External Communication Interface

 External Communication Interface is an interface which is used by


Embedded system to communicate to external world.
 The following sections gives an overview of the various interfaces
for external communication.
1. Recommended Standard number 232.
2. Universal Serial Bus(USB).
3. IEEE 1394 (Firewire)
4. Infrared (IrDA)
5. Bluetooth
6. Wi-Fi
7. Zig Bee
8. General Packet Radio Service (GPRS)
Recommended Standard number 232

 RS 232 is a legacy full duplex, wired, asynchronous serial communication


interface.
 RS 232 extends the UART communication signals for external communication.
 RS 232 follows the EIA standard for bit transmission. As per the EIA standard a
logic 0 is represented with voltage between 3 to 25 and a logic 1 is represented
with voltage between 3 to 25.
 RS 232 supports two different types of connectors namely:
 DB 9(9 pin connector) and
 DB 25(25 pin connector).
Universal Serial Bus (USB)

 USB is a wired high speed serial interface for data communication.

 USB communication follows the star topology with a USB host at the center and
USB transmits data in packet format.

 Each data packet has a standard format.

 The USB host contain a controller which is responsible for controlling the data
communication including establishing connectivity with USB slave devices.

 The physical communication between a USB peripheral device and master device
is established with a USB cable.
 The USB cable supports communication distance of up to 5 meters.

 The USB standards uses two different types of connector at the ends of the cable
for connecting the USB peripheral device and host device
 TYPE A connector is used for upstream connection(connection with host)
 TYPE B connector is used for downstream connection(connection with slave
device).

Star topology

Source: http://www.l-com.com/what-is-a-
usb-cable
Star topology

Source: http://www.l-com.com/what-is-a-usb-cable
 Data Transfer Types
 Control transfer is used by system software to query configure issue commands to
the USB device.
 Bulk transfer is used for sending a block of data to a device.
 Isochronous data transfer is used for real-time data communication
 Interrupt is used for transferring small amount of data.

 USB supports four different data rates namely:


 Low speed(1.5 mbps),
 Full speed(12 mbps),
 High speed(480 mbps),
 Super speed(4.8 Gbps).
Embedded Firmware
ⱡ Control algorithm and or the configuration settings that are stored into the
program memory of the embedded system.
ⱡ Essential part of embedded system.
ⱡ Methods for development of embedded firmware
ⱡ Write a high level program and use IDE (containing editor, compiler,
linker, debugger, simulator etc). This process is called ‘hex file
creation.’
ⱡ Write assembly language program using instruction supported by
controller or processor used in the application.
ⱡ Embedded programs are written using one of the following two approaches
ⱡ Super loop approach
ⱡ Function scheduler approach.
Other System Components

ⱡ Reset Circuit
ⱡ Brown – out protection circuit
ⱡ Oscillator unit
ⱡ Real time clock
ⱡ Watchdog Timer
ⱡ PCB and Passive components
THANK YOU

You might also like