module 4 Embedded Systems Lecture notes
module 4 Embedded Systems Lecture notes
MODULE 4
Embedded Systems
Embedded Systems
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
Harvard vs Von-Neumann
Communication Interface
UART
Parallel Interface
USB
Wi-Fi
GPRS
4.1Embedded System page2
Definition: An embedded system is a microcontroller or microprocessor based system which is designed to
perform a specific task in combination of both hardware and software.
E.g. Electronic Toys, Mobile Handsets, Washing Machines, Air Conditioners, Automotive Control Units, Set
Top Box, DVD Player etc…
For example, a fire alarm; it will sense only smoke.
Laser printers; it only prints
Firmware: programming instructions, referred to as firmware, are stored in read-only memory (ROM).
q Based on Generation
q Based on Complexity & Performance Requirements
q Based on deterministic behavior
q Based on Triggering
Based on Generation
First Generation
The earlier first-generation embedded systems were built around 8-bit microprocessors and 4-bit
microcontrollers. Such embedded system possesses simple hardware and firmware developed using assembly
code.
Ex: Digital telephone keypads, stepper motor control units.
Second Generation
After the evolution of the second generation embedded systems, the 8-bit processor and 4-bit controllers are
replaced by 16-bit microprocessors and 8-bit microcontrollers. They are more powerful and complex
compared to previous generation processors.
Ex: Data acquisition systems, SCADA systems.
page3
Third Generation
Embedded Systems built around high performance 32-bit microprocessors and 16-bit microcontrollers. Hence,
its operation has become much more powerful and complex than the second generation.
During this period, domain-specific processors/controllers like Digital Signal Processors (DSP), Application-
Specific Integrated Circuits (ASICs) and the concept of instruction pipelining, embedded real-time operating
system evolved into the embedded system industry.
Ex: Robotics, industrial process control, embedded networking.
Fourth Generation
Embedded Systems built around System on Chips (SoCs), Re-configurable processors and multi-core
processors, coprocessors also emerged into the embedded market to add more powerful performance
These systems also make use of the high-performance real-time operating system for their operation.
Ex: Smart devices, digital cameras, etc.
The core of the embedded system falls into any one of the following categories.
q General Purpose and Domain Specific Processors
Ø Microprocessors
Ø Microcontrollers
Ø Digital Signal Processors (DSP)
Microprocessor Microcontroller
Consists of a CPU, performs Arithmetic and Highly integrated chip contains CPU, RAM, on
Logical operations chip ROM/flash memory, I/O ports
Ex: Intel 8086 microprocessor Ex: Intel 8051 microcontroller
It is mainly used in Personal Computers It is mainly used in an embedded system
Complex and expensive, with a large number of Simple and inexpensive with less number of
instructions to process. instructions to process.
Dependent Unit Self contained unit
Consumes more power Consumes less power
Limited power saving options Includes lot of power saving features
Architecture is based on Von Neumann model Architecture is based on Harvard architecture
Uses an external bus to interface to RAM, ROM, Uses an internal controlling bus.
and other peripherals
RISC CISC
page6
Reduced Instruction Set Computer. Complex Instruction Set Computer.
Software centric design. Hardware centric design.
Low power consumption. High power consumption.
Requires more RAM Requires a minimum amount of RAM
Simple decoding of instruction. Complex decoding of instruction.
Processors are highly pipelined. Processors are not pipelined or less pipelined.
Execution time is very less Execution time is very high
Uses multiple registers. Uses a single register.
It does not require external memory for calculations It requires external memory for calculations
Compound addressing mode. Limited addressing mode.
RISC architecture can be used with high-end CISC architecture can be used with low-end
applications like telecommunication, image processing, applications like home automation, security system,
video processing, etc. consumer goods etc.
Small Code Size. Large Code Size.
Fixed Instruction format (32-bit) Varying formats (16 to 64 bits for each instruction).
Examples: ARM, PIC, Power Architecture, Alpha, Examples: VAX, Motorola 68000 family,
AVR, ARC and the SPARC. System/360, AMD and the Intel x86 CPUs.
The terms Harvard and Von-Neumann refers to the processor architecture design is depicted as shown below.
It is ancient computer architecture based model. It is modern computer architecture based model.
CPU is connected data memory (RAM) and program CPU is connected data memory (RAM) and program
memory (ROM) by a single memory. memory (ROM), separately.
CPU cannot access instructions and data at the same CPU can access instructions and data at the same
time. time.
Same physical memory address is used for Separate physical memory address is used for
instructions and data. instructions and data.
Common bus is used for data and instruction Separate buses are used for data and instruction
transfer. transfer.
The speed of execution is slower. It is because it is The overall speed of execution is faster. It is because
not capable of fetching the instructions and data both the processor is capable of fetching both instructions
at the same time. and data at the very same time.
It is cheaper in cost. It is costly.
Requires less hardware, but low performance. Requires more hardware, but high performance.
It is used in personal computers and small It is used in microcontrollers and digital signal
computers. processing.
3.2Sensors and Interfacing page7
Fig.1 shows the arrangement of an instrumentation system. The physical quantity to be measured (e.g.
temperature) acts upon a sensor that produces an electrical output signal.
This signal is an electrical analogue of the physical input but there may not be a linear relationship between
the physical quantity and its electrical equivalent.
Also, the output produced by the sensor may be small or may suffer from the presence of noise (i.e. unwanted
signals). Therefore, further signal conditioning will be required before the signal will be at an acceptable level
and in an acceptable form for signal processing, display and recording. The signal processing may use digital
rather than analog signals for this purpose ADC may be required.
Control systems
Ø Examples:
Ø A microphone is a transducer converting sound pressure variations into voltage or current.
Ø A loudspeaker is a transducer that converts low frequency electric current into audible sounds.
Difference between Sensor and Actuator
SENSOR ACTUATOR
It converts physical quantity into electrical signals. It converts electrical signals into physical quantity.
It takes input from environment. It takes input from the electric or electronic system.
Sensor generated electrical signals. Actuator generates heat, motion, vibration,etc.
It is placed at input port of the system. It is placed at output port of the system.
It is used to measure the physical quantity. It is used to measure the continuous and discrete
process parameters.
It gives information to the system about It accepts command from the system to perform a
environment. function.
Example: Photo-voltaic cell which converts light Example: Stepper motor where electrical energy
energy into electrical energy. drives the motor.
Sensor
A sensor is a transducer which converts energy from physical form to electrical form for any measurement or
control purpose. Sensors act as input device.
Example 1:
Example 3:
Transducers are also known as Input-Output subsystems. The I/O subsystem facilitates the interaction of the
embedded system with external world. The interaction happens through the sensors and actuators connected to
the input and output ports 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, Opto-
couplers etc.
Actuators
Actuator is a transducer which converts electrical signals to corresponding physical action (motion). Actuator
acts as an output device.
Example :1
Examples: electric motors, stepper motors, jackscrews, electric muscular stimulators in robots,
4.2.3Light Emitting Diode (LED) and 7-Segment LED Display page10
Light Emitting Diode (LED): is an output device for visual indication in any embedded system. It can be used as
an indicator for the status of various signals or situations. Typical examples are indicating the presence of
power conditions like device ON, battery low or charging of battery etc.
LED is a p-n junction diode and it contains an anode (+)
and a cathode (-). For proper functioning of the LED,
the anode is connected to +ve terminal and cathode to
the –ve terminal of supply voltage (forward bias
condition). The current flowing through the LED must
limited to a value below the maximum current that it can
conduct. A resister is used in series between the power
supply and the resistor to limit the current through it.
In order to display the required numbers (0 - 9) or HEX characters (A - F), the correct combination of LED
segments need to be illuminated based on the type of configuration. In the above example common cathode
configuration is used.