Module 4
Module 4
TO
ELECTRONICS
ENGINEERING
(BESCK104C/BESCK204C)
Hardware +
Firmware
Specific Task
0
3
0
4
Definition, Embedded systems vs general computing systems, Classification of
Embedded Systems, Major application areas of Embedded Systems, Elements of an
Embedded System, Core of the Embedded System, Microprocessor vs Microcontroller,
RISC vs CISC.
0
5
Shibu K V Mike Tooley
Tata McGraw Hill Elsevier
Education Private 4th Edition,
Limited 2nd Edition, 2015
2017
6
Introduction
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 specialised to the application
domain.
Embedded Systems vs. General
Computing Systems
• The computing revolution began with the general purpose
computing requirements. Later it was realised that the
general computing requirements are not sufficient for the
embedded computing requirements.
• The embedded computing requirements demand
‘something special’ in terms of response to stimuli,
meeting the computational deadlines, power efficiency,
limited memory capability, etc.
General Purpose Computing System Embedded System
A system which is a combination of a generic hardware A system which is a combination of special purpose
and a General Purpose Operating System for executing a hardware and embedded OS for executing a specific set of
variety of applications applications
Contains a General Purpose Operating System (GPOS) May or may not contain an operating system for
functioning
Applications are alterable (programmable) by the user (It The firmware of the embedded system is pre-programmed
is possible for the end user to re-install the operating and it is non-alterable by the end-user (There may be
system, and also add or remove user applications) exceptions for system supporting OS kernel image flashing
through special hardware settings)
Performance is the key deciding factor in the selection of Application-specific requirements (like performance,
the system. Always, ‘Faster is Better’ power requirements, memory usage, etc.) are the key
deciding factors
Less/not at all tailored towards reduced operating power Highly tailored to take advantage of the power saving
requirements, options for different levels of power modes supported by the hardware and the operating
management system
Response requirements are not time-critical For certain category of embedded systems like mission
critical systems, the response time requirement is highly
critical
Need not be deterministic in execution behaviour Execution behaviour is deterministic for certain types of
embedded systems like ‘Hard Real Time’ systems
Classification of Embedded
•Systems
Some of the criteria used in the classification of embedded
systems are:
1. Based on generation
2. Based on complexity and performance requirements
3. Based on deterministic behaviour
4. Based on triggering
Classification Based on
•Generation
First Generation
• Second Generation
• Third Generation
• Fourth Generation
• Next Generation
Classification Based on
Generation (continued)
• First Generation
• Early embedded systems were built around 8-bit microprocessors
like 8085 and Z80 and 4-bit microcontrollers.
• Simple in hardware circuits with firmware developed in assembly
code.
• E.g.: Digital telephone keypads, stepper motor control units, etc.
Classification Based on
Generation (continued)
• Second Generation
• Embedded systems built around 16-bit microprocessors and 8-bit
or 16-bit microcontrollers.
• Instruction set were much more complex and powerful than the
first generation.
• Some of the second generation embedded systems contained
embedded operating systems for their operation.
• E.g.: Data acquisition systems, SCADA systems, etc.
Classification Based on
Generation (continued)
• Third Generation
• Embedded systems built around 32-bit microprocessors and 16-bit
microcontrollers.
• Application and domain specific processors/controllers like Digital
Signal Processors (DSP) and Application Specific Integrated Circuits
(ASICs) came into picture.
• The instruction set of processors became more complex and powerful
and the concept of instruction pipelining also evolved.
• Dedicated embedded real time and general purpose operating systems
entered into the embedded market.
• Embedded systems spread its ground to areas like robotics, media,
industrial process control, networking, etc.
Classification Based on
Generation (continued)
• Fourth Generation
• The advent of System on Chips (SoC), reconfigurable processors
and multicore processors are bringing high performance, tight
integration and miniaturisation into the embedded device
market.
• The SoC technique implements a total system on a chip by
implementing different functionalities with a processor core on
an integrated circuit.
• They make use of high performance real time embedded
operating systems for their functioning.
• E.g.: Smart phone devices, Mobile Internet Devices
(MIDs), etc.
Classification Based on
Generation (continued)
• Next Generation
• The processor and embedded market is highly dynamic and
demanding.
• The next generation embedded systems are expected to meet
growing demands in the market.
Classification Based on
Complexity and Performance
• Small-Scale Embedded Systems
• Medium-Scale Embedded Systems
• Large-Scale Embedded Systems/Complex Systems
Classification Based on
Complexity and Performance
•(continued)
Small-Scale Embedded Systems
• Simple in application needs and the performance requirements
are not time critical.
• E.g.: An electronic toy
• Usually built around low performance and low cost 8-bit or 16-bit
microprocessors/microcontrollers.
• May or may not contain an operating system for its functioning.
Classification Based on
Complexity and Performance
•(continued)
Medium-Scale Embedded Systems
• Slightly complex in hardware and firmware (software)
requirements.
• Usually built around medium performance, low cost 16-bit or 32-
bit microprocessors/microcontrollers or digital signal processors.
• Usually contain an embedded operating system (either general
purpose or real time operating system) for functioning.
• Ex.: Tablets, Automotive navigation system, dialysis
machine,etc
Classification Based on
Complexity and Performance
•(continued)
Large-Scale Embedded Systems/Complex Systems
• Highly complex in hardware and firmware (software) requirements.
• They are employed in mission critical applications demanding high
performance.
• Usually built around high performance 32-bit or 64-bit RISC
processors/controllers or Reconfigurable System on Chip (RSoC) or multi-
core processors and programmable logic devices.
• May contain multiple processors/controllers and co-units/hardware
accelerators for offloading the processing requirements from the main
processor of the system.
• Decoding/encoding of media, cryptographic function implementation, etc.
are examples of processing requirements which can be implemented using a
co-processor/hardware accelerator.
• Usually contain a high performance real time operating system (RTOS) for
task scheduling, prioritization and management.
Classification Based on
Deterministic Behaviour
• Applicable for ‘Real Time’ systems.
• The application/task execution behaviour can be either
deterministic or non-deterministic.
• Based on the execution behaviour, real time embedded systems are
classified into Hard Real Time and Soft Real Time systems.
Classification Based on
•Triggering
Embedded systems which are ‘Reactive’ in nature (like process
control systems in industrial control applications) can be classified
based on the trigger.
• Reactive systems can be either event-triggered or time-triggered.
Major Application Areas of
Embedded Systems
1. Consumer electronics: Camcorders, cameras, etc.
2. Household appliances: Television, DVD players, washing machine,
refrigerators, microwave oven, etc.
3. Home automation and security systems: Air conditioners,
sprinklers, intruder detection alarms, closed circuit television
(CCTV) cameras, fire alarms, etc.
4. Automotive industry: Anti-lock braking systems (ABS), engine
control, ignition systems, automatic navigation systems, etc.
5. Telecom: Cellular telephones, telephone switches, handset
multimedia applications, etc.
Major Application Areas of
Embedded Systems (continued)
6. Computer peripherals: Printers, scanners, fax machines, etc.
7. Computer networking systems: Network routers, switches, hubs,
firewalls, etc.
8. Healthcare: Different kinds of scanners, EEG, ECG machines, etc.
9. Measurements & Instrumentation: Digital multimeters, digital
CROs, logic analyzers, PLC systems, etc.
10. Banking & Retail: Automated teller machines (ATM) and currency
counters, point of sales (POS), etc.
11. Card readers: Barcode, smart card readers, hand held devices,
etc.
Major Application Areas of
Embedded Systems (continued)
12. Wearable Devices: Health and fitness trackers, Smartphone
screen extension for notifications, etc.
13. Cloud Computing and Internet of Things (IoT)
The Typical
Embedded System
ELEMENTS OF AN EMBEDDED SYSTEM
The Typical Embedded
System
It is a dependent unit. It requires the combination of other chips It is a self-contained unit and it doesn't require external interrupt
like timers, program and data memory chips, interrupt controllers, controller, timer, UART, etc. for its functioning
etc. for functioning
Most of the time, general purpose in design and operation Mostly application-oriented or domain-specific
Doesn't contain a built in I/O port. The I/O port functionality needs Most of the processors contain multiple built-in I/O ports which
to be implemented with the help of external programmable can be operated as a single 8 or 16 or 32 bit port or as individual
peripheral interface chips like 8255 port pins
Targeted for high end market where performance is important Targeted for embedded market where performance is not so
critical
Limited power saving options compared to microcontrollers Includes lot of power saving features
Microprocessor vs.
Microcontroller (continued)
Instruction pipelining and increased execution speed Generally no instruction pipelining feature
Orthogonal instruction set (Allows each instruction to operate on Non-orthogonal instruction set (All instructions are not allowed to
any register and use any addressing mode) operate on any register and use any addressing mode. It is
instruction-specific)
Operations are performed on registers only, the only memory Operations are performed on registers or memory depending on the
operations are load and store instruction
A large number of registers are available Limited number of general purpose registers
Programmer needs to write more code to execute a task since the Instructions are like macros in C language. A programmer can
instructions are simpler ones achieve the desired functionality with a single instruction which in
turn provides the effect of using more simpler single instructions in
RISC
Less silicon usage and pin count More silicon usage since more additional decoder logic is required
to implement the complex instruction decoding
Temperature Thermocouple Small e.m.f. generated at the junction between two dissimilar metals
(e.g. copper and constantan). Requires reference junction and
compensated cables for accurate measurement.
Angular position Rotary potentiometer Fine wire resistive element is wound around a circular former. Slider
attached to the control shaft makes contact with the resistive
element. A stable d.c. voltage source is connected across the ends of
the potentiometer. Voltage appearing at the slider will then be
proportional to angular position.
Transducers
(continued)
Temperature Heating element (resistor) Metallic conductor is wound onto a ceramic or mica former. Current
flowing in the conductor produces heat.
Angular position Rotary potentiometer Multi-phase motor provides precise rotation in discrete steps of 15°
(24 steps per revolution), 7.5° (48 steps per revolution) and 1.8° (200
steps per revolution).
Senso
•rs
A sensor is a special kind of transducer that is used to generate
an input signal to a measurement, instrumentation or control
system.
• The signal produced by a sensor is an electrical analogy of a
physical quantity, such as distance, velocity, acceleration,
temperature, pressure, light level, etc.
• The signals returned from a sensor, together with control inputs
from the user or controller (as appropriate) will subsequently be
used to determine the output from the system.
• The choice of sensor is governed by a number of factors including
accuracy, resolution, cost and physical size.
Sensors
(continued)
• Sensors can be categorized as either active or passive.
• An active sensor generates a current or voltage output.
• A passive transducer requires a source of current or voltage
and it modifies this in some way (e.g. by virtue of a change in
the sensor’s resistance).
• The result may still be a voltage or current but it is not generated by
the sensor on its own.
Sensors
•(continued)
Sensors can also be classed as either digital or analogue.
• The output of a digital sensor can exist in only two discrete
states, either ‘on’ or ‘off’, ‘low’ or ‘high’, ‘logic 1’ or ‘logic 0’,
etc.
• The output of an analogue sensor can take any one of an
infinite number of voltage or current levels. It is thus said to
be continuously variable.
Sensors
•(continued)
Some examples of input transducers (sensors)
Physical Quantity Input Transducer (Sensor) Notes
Angular position Resistive rotary position Rotary track potentiometer with linear law produces analogue
sensor voltage proportional to angular position.
Optical shaft encoder Encoded disk interposed between optical transmitter and receiver
(infrared LED and photodiode or photo-transistor).
Angular velocity Tachogenerator Small d.c. generator with linear output characteristic. Analogue
output voltage proportional to shaft speed.
Toothed rotor tachometer Magnetic pick-up responds to the movement of a toothed ferrous
disk. The pulse repetition frequency of the output is proportional to
the angular velocity.
Flow Rotating vane flow sensor Turbine rotor driven by fluid. Turbine interrupts infra-red beam. Pulse
repetition frequency of output is proportional to flow rate.
Sensors
(continued)
Linear variable differential Miniature transformer with split secondary windings and moving
transformer (LVDT) core attached to a plunger. Requires a.c. excitation and phase-
sensitive detector.
Magnetic linear position Magnetic pick-up responds to movement of a toothed ferrous track.
sensor Pulses are counted as the sensor moves along the track.
Sensors
(continued)
Physical Quantity Input Transducer (Sensor) Notes
Light level Photocell Voltage-generating device. The analogue output voltage produced is
proportional to light level.
Capacitive proximity Switching device which operates when a particular level is detected.
switch Ineffective with some liquids.
Diffuse scan proximity Switching device which operates when a particular level is detected.
switch Ineffective with some liquids.
Sensors
(continued)
Inductive proximity switch Target object modifies magnetic field generated by the sensor. Only
suitable for metals (non-ferrous metals with reduced sensitivity).
Capacitive proximity Target object modifies electric field generated by the sensor. Suitable
switch for metals, plastics, wood and some liquids and powders.
Optical proximity switch Available in diffuse and through scan types. Diffuse scan types
require reflective targets. Both types employ optical transmitters and
receivers (usually infra-red emitting LEDs and photo-diodes or photo-
transistors). Digital input port required.
Sensors
(continued)
Physical Quantity Input Transducer (Sensor) Notes
Strain Resistive strain gauge Foil type resistive element with polyester backing for attachment to
body under stress. Normally connected in full bridge configuration
with temperature-compensating gauges to provide an analogue
output voltage.
Vibration Electromagnetic vibration Permanent magnet seismic mass suspended by springs within a
sensor cylindrical coil. The frequency and amplitude of the analogue output
voltage are respectively proportional to the frequency and amplitude
of vibration.
Actuato
•rs
An actuator is a form of transducer device (mechanical or electrical)
which converts signals to corresponding physical action (motion).
The I/O
•Subsystem
The I/O subsystem of the embedded system facilitates the interaction
of the embedded system with the external world.
• The interaction happens through the sensors and actuators
connected to the input and output ports respectively of the
embedded system.
• The sensors may not be directly interfaced to the input ports, instead
they may be interfaced through signal conditioning and translating
systems like ADC, optocouplers, etc.
Light Emitting Diode
(LED)
• Light Emitting Diode (LED) is an important output device for visual
indication in any embedded system.
• LED can be used as an indicator for the status of various signals or
situations.
• E.g.: 'Device ON', 'Battery low' or 'Charging of battery’ conditions
• Light Emitting Diode is a p-n junction diode and it contains an
anode and a cathode.
Fig: LED interfacing
• For proper functioning of the LED, the anode is connected to +ve
terminal of the supply voltage and cathode to the -ve terminal of
supply voltage.
• The current flowing through the LED must be limited to a value
below the maximum current that it can conduct.
• A resister is used in series to limit the current through the LED.
• The ideal LED interfacing circuit is shown in the figure.
Light Emitting Diode (LED)
•(continued)
LEDs can be interfaced to the port pin of a processor/controller in
two ways:
• In the first method, the anode is directly connected to the port pin and
the port pin drives the LED.
• The port pin 'sources' current to the LED when the port pin is at logic High (Logic
‘1’).
• In the second method, the cathode of the LED is connected to the port
pin of the processor/controller and the anode to the supply voltage
through a current limiting resistor.
• The LED is turned on when the port pin is at logic Low (Logic '0’).
• Here the port pin 'sinks' current.
7-Segment LED
•Display
The 7-segment LED display is an output device
for displaying alpha numeric characters.
• It contains 7 LED segments arranged in a special
form used for displaying alpha numeric
characters and 1 LED used for representing
'decimal point' in decimal number display.
• The LED segments are named A to G and the
Fig: 7-Segment LED Display
decimal point LED segment is named as DP.
• The LED segments A to G and DP should be lit
accordingly to display numbers and characters.
7-Segment LED Display
•(continued)
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 cathodes of 8 LED segments are connected commonly.
• Figure illustrates the Common Anode and Cathode configurations.
7-Segment LED Display
•(continued)
Based on the configuration of the 7-segment LED unit, the LED segment's
anode or cathode is connected to the port of the processor/controller in
the order 'A' segment to the least significant port pin and DP segment to
the most significant port pin.
• The current flow through each of the LED segments should be limited to
the maximum value supported by the LED display unit.
• The typical value is 20mA.
• The current can be limited by connecting a current limiting resistor to the
anode or cathode of each segment.
• 7-segment LED display is used in low cost embedded applications like
Public telephone call monitoring devices, point of sale terminals,
etc.