Mces - Unit 1
Mces - Unit 1
EMBEDDED SYSTEMS
Overview
4
Introduction to
Embedded Systems…
• An embedded system is an application that
contains at least one programmable computer
(typically in the form of a microcontroller, a
microprocessor or a digital signal processor
chip).
• “An embedded system is a system that has
software embedded into computer-hardware,
which makes a system dedicated for an
application (s) or specific part of an application
or product or part of a larger system.”
• Software usually embeds into a ROM or flash.
• Independent system or part of a large system.
5
Introduction to
Embedded
Systems…
6
What is an Embedded System?
• An embedded system is a combination of hardware and software
designed to perform a specific function.
• Examples:
• - Microwave ovens
• - Smartwatches
• - Automotive ABS
• - Industrial Robots
Embedded System Vs Desktop System
8
Domain Examples
Washing machines, Smart TVs,
Consumer
Microwave ovens
ABS, Cruise control, Airbag
Automotive
controllers
9
Architecture of Embedded Systems
• Core Components:
• - Sensors
• - Processor (Microcontroller / Microprocessor)
• - Actuator
• - Memory
• - Communication Interfaces
Block Diagram of Embedded system
11
Sensors
• Function: Detect physical quantities (temperature, pressure, light,
etc.)
• Examples:
• - LM35 (Temperature)
• - IR Sensor
• - Ultrasonic Sensor
Processor: Microcontroller vs. Microprocessor
• Microcontroller:
• - Dedicated tasks
• - On-chip memory
• - Low cost
• - Examples: ATmega328, PIC16F877A
• Microprocessor:
• - General purpose
• - External memory
• - Higher cost
• - Examples: Intel i5, ARM Cortex-A
Actuators
• Function: Convert control signals into physical action.
• Examples:
• - Motors (DC, Stepper)
• - Relays
• - Solenoids
Classification of
Embedded Systems
15
Classification of Embedded Systems
• Based on Performance:
• - Real-Time Systems (Hard / Soft)
• - Standalone Systems
• - Networked Systems
• - Mobile Embedded Systems
• Based on Complexity:
• - Small Scale
• - Medium Scale
• - Sophisticated Systems
Standalone Embedded Systems
1. Based on
Real-Time Embedded Systems
Functionality
• Respond to inputs or events within strict timing constraints.
• Critical for systems where delays may cause failure.
• Types:
• Hard Real-Time: Missing deadlines can be catastrophic.
Example: Anti-lock Braking System (ABS), Airbag system.
• Soft Real-Time: Delays are tolerated to some extent.
Example: Video conferencing, online gaming.
17
Networked Embedded Systems
18
Small-Scale Embedded Systems
19
Microcontroller-Based Systems
20
Characteristics of
Embedded Systems
21
Characteristics of Embedded Systems
• - Task-specific
• - Real-time operations
• - Limited resources (memory, processing)
• - Designed for reliability
• - Often reactive systems
1. Dedicated Functionality
• Designed to perform a specific task or a set of predefined tasks.
• Unlike general-purpose computers, they do not run multiple
unrelated applications.
Characteristics 2. Real-Time Operation
of Embedded • Operate under strict timing constraints to respond to external
Systems events.
• Real-time systems are classified into:
• Hard Real-Time: Missing a deadline can lead to system failure.
• Soft Real-Time: Occasional deadline misses are tolerable.
3. Low Power Consumption
• Often deployed in battery-operated or energy-constrained
environments.
• Optimized to operate with minimal power for prolonged
durations.
23
4. Compact Size
• Embedded systems are generally small in size and easily integrable into
larger systems.
• System-on-Chip (SoC) designs integrate CPU, memory, and peripherals
into one chip.
5. Reliability and Stability
Characteristics • Designed to run continuously for long durations without human
intervention.
of Embedded • Must handle environmental factors such as temperature, noise, and
voltage variations.
Systems…
6. Efficient Resource Usage
• Limited computing resources: RAM, ROM, CPU speed, and I/O
capabilities.
• Efficient software and hardware co-design is necessary to meet
performance within constraints.
7. Minimal or No User Interface
• Operate automatically with little or no human interaction.
• Interactions may be through sensors, actuators, or predefined control
buttons.
24
8. Reactive and Event-Driven
9. Embedded Software
Characteristics of
• Runs firmware (software embedded in hardware)
Embedded often written in C or assembly.
Systems… • Firmware is typically stored in non-volatile
memory and tightly coupled to hardware.
25
Embedded System Design Challenges
• - Power consumption
• - Cost constraints
• - Limited memory
• - Safety and reliability
• - Real-time deadlines
Applications of Embedded Systems
• - Aerospace
• - Telecommunications
• - Home automation
• - Robotics
• - Smart cities / IoT
Summary
• - Embedded systems are everywhere.
• - They integrate hardware (sensors, actuators) and software.
• - Microcontrollers are the brain of most embedded systems.
• - Real-time, efficient, and reliable design is critical.
Architecture of
Microprocessors
29
Definition of a Computer
• A computer is a programmable electronic device that can store,
retrieve, and process data. It performs a set of instructions, known as a
program, to carry out arithmetic, logical, control, and input/output
operations automatically.
Evolution of Stored-Program Computers
• All modern general-purpose computers are based on the stored-program digital computer model.
• The stored-program concept originated at the Princeton Institute of Advanced Studies in the
1940s.
• The concept was first realized in the ‘Baby’ machine in June 1948 at the University of Manchester,
England.
30
Technological Progress
Over 50+ years, computers have become faster, cheaper, and more
efficient. Over Time
31
The Win-Win of Transistor Scaling
32
• Computer architecture describes the
user's view of the computer.
COMPUTER • The instruction set, visible registers,
ARCHITECTURE memory management table structures
and exception handling model are all part
of the architecture.
33
Computer organization describes the user-invisible implementation of the
architecture.
Computer
organization It gives details about components involved in how a processor is internally
structured and optimized to execute instructions efficiently.
34
• The RISC (Reduced Instruction Set Computer) idea
ranks amongst these advances, offering cost-
effectiveness of computer technology:
RISC is a CPU design philosophy that uses a small
set of simple instructions that can be executed
very quickly, usually in one clock cycle.
35
MICROPROCESSORS,
MICROCOMPUTERS AND
MICROCONTROLLERS
36
Operation of any computing system
• CPU
• Carries out all the computations.
• Fetches instructions from the program memory and executes it.
• Accesses data memory whenever necessary
• Input/output block
• Allows users to interact with the systems.
Instruction set architecture (ISA) of CPU
38
Von Neumann Architecture
39
What is a microprocessor??
• It is an entire CPU fabricated on a single chip.
• Consists of set of registers
• Consists of ALU
• Control units
• Mechanisms to interface external devices via buses (address/data/control bus)
What is a Microcomputer?
PC Microcontrollers
43
Evolution of microcontrollers
44
Advantages of microcontrollers
45
What is a digital signal processor?
46
Key Features of DSPs
Specialized addressing
Pipelining and parallel Low interrupt latency for
modes: circular, bit-
processing supported. time-critical applications.
reversed, auto-increment.
47
Applications of DSPs
48
Comparison: Microprocessor vs
Microcontroller vs DSP
Feature Microprocessor (MPU) Microcontroller (MCU) Digital Signal Processor (DSP)
Specialized processor for signal processing
Definition General-purpose CPU System-on-chip for control applications
tasks
Primary Use Data-intensive computing Control-based embedded applications Real-time digital signal operations
CPU + RAM + ROM + I/O + Timers on a single CPU + Multiply and Accumulate (MAC) +
Integration CPU only
chip Specialized memory + Peripherals
External (RAM, ROM connected Separate data & instruction memory
Memory Interface Internal memory
separately) (Harvard arch.)
Instruction Set General-purpose General-purpose with I/O control support Optimized for MAC and parallel processing
Execution Speed High (GHz range) Moderate (MHz range) High (optimized for real-time execution)
A system designed with the embedding of hardware and software together for a
specific function with a larger area is embedded system design.
• Abstraction
In this stage the problem related to the system is
abstracted.
Refinement
• Every component and module must be refined
appropriately so that the software team can understand.
Embedded Systems Design
Architectural description language is used to describe the software design.
• Control Hierarchy
• Partition of structure
• Data structure and hierarchy
• Software Procedure.
Embedded Systems Design
• Embedded System Design Software Development Process Activities
• There are various design metric required to design any system to function properly, they are
Design Metrics /
Design Parameters
of an Embedded
System
Function
Power Dissipation Always maintained low
Performance Should be high
Process Deadlines The process/task should be completed within a specified time.
Manufacturing Cost Should be maintained.
Engineering Cost It is the cost for the edit-test-debug of hardware and software.
Maintenance Proper maintenance of the system must be taken, in order to avoid system failure.
Time to market It is the time taken for the product/system developed to be launched into the market.
Embedded Systems Design
Challenges
• Environment adaptability
• Power consumption
• Area occupied
• Packaging and integration
• Updating in hardware and software
• Security
• There are various challenges the designers face while testing the design like
Embedded hardware testing, Verification stage, Validation Maintainability
Embedded System Design
Examples
• Automatic chocolate vending machine (ACVM)
• Digital camera
• Smart card
• Mobile phone
• Mobile computer..etc.
Embedded System Design
Automatic Chocolate Vending Machine (ACVM)
• The design function of ACVM is to provide chocolate to the child whenever the
child inserts a coin into ACVM.
Design Steps
• The design steps mainly include the following.
• Requirements
• Specifications
• Hardware and software functioning.
Automatic Chocolate Vending Machine (ACVM)
Requirements
• When a child inserts a coin into the machine and selects the particular chocolate
that he wants to purchase.
Inputs
• Coins, user selection.
• An interrupt is generated at each port whenever a coin is inserted.
• A separate notification is sent to each port.
Outputs
• Chocolate
• Refund
• A message is displayed on LCD like date, time, welcome message.
Automatic Chocolate Vending Machine (ACVM)
System Function
• Using a graphical user interface, the child commands to the system which
chocolate the child wants to purchase.
• Where the graphical user interface has an LCD, keypad, touch screen.
• The machine delivers the chocolate when the child inserts the coin if the coins
inserted are excess than the actual cost of selected chocolate. The ACVM machine
refunds the money back.
• Using a Universal synchronous bus, the owner of the ACVM can keep track of
client location.
Automatic Chocolate Vending Machine (ACVM)
Design Metrics
Power Dissipation
• The design should be made as per display size and mechanical components.
Process Deadline
• Timer must be set, so that whenever the child inserts the coin the ACVM must respond within few
seconds in delivering the chocolates and refunding if excess.
For example, if the response time is 10seconds, the ACVM should deliver the chocolate and refund
the money if excess within 10 seconds as soon as the child inserts the coin and place a request for
chocolate.
Specifications
• From the below ACVM system, when the child inserts the coin. The coins get segregated
according to the ports presented, Port1, Port2, Port5. On receiving coin an interrupt is generated by
the port, this interrupt is sent to reading the amount value and increasing.
Automatic Chocolate Vending Machine (ACVM)
Automatic Chocolate Vending Machine (ACVM)
Hardware
• ACVM hardware architecture has the following hardware specifications
• Microcontroller 8051
• 64 KB RAM and 8MB ROM
• 64 KB Flash memory
• Keypad
• Mechanical coin sorter
• Chocolate channel
• Coin channel
• USB wireless modem
• Power supply
Automatic Chocolate Vending Machine (ACVM)
Software of ACVM
• Many programs have to be written so that they can be reprogrammed when
required in RAM /ROM like,