Professional Documents
Culture Documents
Online Lectures:
• Embedded System Design, By:- Prof. Anupam Basu, IIT KGP
• Embedded System Design, By:- Prof. Indranil, IIT KGP
• Embedded System, By: Prof. Santanu Chaudhury, IIT Delhi
Contents:
• Introduction to ES
• Brief revision of basics of Microprocessors and
Microcontrollers
• Embedded system design and constraints
• Embedded processor and memory architecture
• ARM and its architecture
• PWM, D/A and A/D convertors
• Real-time operating systems
• Scheduling
• Multitasking
• Sensors and Actuators
• Communication protocols
• Interfacing
Evaluation
• Quizzes (4):20%
• Mid Sem Exam:25%
• End Sem Exam: 35%
• Projects:15%
• Day to Day Performance: 5%
Embedded System: Introduction
What is an Embedded System?
• An electronic/electro-mechanical system developed to perform a specific task.
Detailed ES Architecture
Simple Architecture
Implementing Embedded System
• Hardware:
• Processing Element (Microprocessor or Micro-controller)
• Peripherals
• Inputs and outputs
• Interfacing sensors & actuators
• Interfacing protocols
• Memory
• Buses
• Software:
• System software
• Application software
Source: Manyika, James, et al. Disruptive technologies: Advances that will transform life, business, and the
global economy.
Broad Overview
Embedded System: Fact Sheet
• The global market for ES is projected to reach US $234
billion by 2020. (Expected to grow at 6.4 %)
• Designing of secure ES
• Mobile market
• Smart automobiles
• Expanding role of electronics control
• Advances in healthcare
• Growing use of robots
• Internet of things
• Sophisticated functionalities
• Real-time operation: Hard/Soft
• Restricted memory
• Low manufacturing cost
• Application-dependent processor
• Low-power dissipation
Types of Embedded Systems
• General computing: PDA, video games, set-top boxes, ATM etc.
• Speed
• Packaging
• Power consumption
• The amount of RAM and ROM on chip
• The number of I/O pins and the timer on chip
• How easy to upgrade to higher performance or lower
power-consumption versions
• NRE and cost per unit
• Time to market
• Real-time response
Design Metrics
➢Non-recurring cost
➢Unit cost
Speed
➢Size
➢Performance
➢Power dissipation
➢Flexibility
Quality Cost
➢Maintainability
➢ Time to prototype
➢Time to market
➢Safety
Time to market design metric
• Crucial Metric which should be strictly
followed to make product commercially
viable
(CNR / N) + Cunit.
• Example:
CNR = 500000 INR and Cunit = 5000 INR
For manufacturing 100 units the total cost = 500000 + 5000*100 = 1000000
Per unit cost = 500000 / 100 + 5000 = 10000
Performance Design Metric
• Normally, these are used for evaluating processor performances/Speed.
• One can choose design alternatives based on speed (using above measures)
Hardware Evolution:
➢General Purpose Microprocessors and Microcontrollers
➢DSP Processor
➢System on Chip
Software Specifications:
• Code should be efficient or compact
• Accurate
• Fault tolerant
Basics of Microprocessors and Microcontrollers
The unit of data size:
• Bit : a binary digit that can have the value 0 or 1
• Byte : 8 bits
• Nibble : half of a bye, or 4 bits
• Word : two bytes, or 16 bits
The terms for amounts of memory:
• Kilobyte (K): 2^10 bytes
• Megabyte (M) : 2^20 bytes, over 1 milli
• Gigabyte (G) : 230 bytes, over 1 billion
• Terabyte (T) : 240 bytes, over 1 trillion
Basics of Microprocessors and Microcontrollers
General-purpose microprocessors contains
• No RAM
• No ROM
• No I/O ports
Microcontroller has
• CPU (microprocessor)
• RAM
• ROM
• I/O ports
• Timer
• ADC and other peripherals
Basics of Microprocessors and Microcontrollers
• Harvard:
• Instructions and data are stored
in separate memories
• Typically, followed in microcontrollers
• Instructions are stored in ROM, while
data are stored in RAM.
Microprocessors
• CPU fabricated within a single integrated circuit or IC chip
• Consists of a set of registers to store temporary data
• Consists of an ALU,
• Provide an interface to connect with external device (memory or
I/O) through buses
• Control unit for synchronization
Microcomputer
• It is computer system built using a microprocessor
• Since microprocessor itself doesn’t contain I/O and
memory, it needs to interfaced using a
microcomputer
Microcontrollers and Embedded System
• An embedded product uses a microprocessor (or microcontroller)
to do one task and one task only
• There is only one application software that is typically burned into ROM
• A PC, in contrast with the embedded system, can be used for any
number of applications
• In microcontroller
• No disk
• On-chip memory (ROM) stores the program
• Size of ROM limits the maximum size of the application
• No OS. Only low-level program/subroutine is running
stored in ROM
Microcontrollers
• Usage:
Typically used in power critical applications e.g.
household, automobile etc.
• Evolution of Microcontrollers:
• Evolved from microprocessor-based level design on a single chip
in the mid-70’s
• In mid 80’s, microcontrollers got embedded in ASIC
• Advantages of Microcontrollers:
• Fast, effective in particular application
• Low cost/Low power
• Compatibility: Opcodes and binaries same as in
PICs/80x51/ARM/PIC variants
Microcontrollers and Embedded System
• 8-bit microcontrollers
• Motorola’s 6811
• Intel’s 8051
• Microchip’s PIC
Requirements:
✓ End process of the product? The real world I/O? Operator interface?
✓In large companies, market or major customer drive the requirement
✓In small companies, engineers draw the requirement
Specifications:
• Harvard Architecture:
✓ Instruction and data in separate memories
✓Typically followed in microcontroller
✓Instructions are stored in ROM, data in RAM.
ES Design and Development Process
✓ development of individual
modules e.g. Memory, I/O
Interfaces, etc.
✓ Optimization Problem
Example:
Manufacturer Processor I/O Pins
Intel & Others 8031/8051 family 32
Microchip PIC17G42 33
Motorola 68HG05 Varying
Zilog ZB (ZB6E40) 32
Signetics/Philips 83G751 19
Atmel AT90S8515 32
Selection of Microprocessor/Microcontroller
According to functionality of final product, following
requirements are to be considered:
• Number of I/O pins
• Interfaces: Various USBs, serial interfaces, PWM, HDMI,
Auxiliary
Selection of Microprocessor/Microcontroller
According to functionality of final product, following
requirements are to be considered:
• Number of I/O pins
• Interfaces
• Memory requirements (ROM/ RAM): Suitable estimation is
highly appreciable as over estimation can increase cost and
underestimation limits the futuristic development.
• RAM Estimation: Number of variables + sum of all internal buffers +
FIFO’s, stacks. E.g. 8031 4 reg. * 32 bytes =96 usable bytes RAM,
• 8052 256 bytes of general purpose RAM but upper 128 bytes
are accessible only using indirect addressing
• Good compiler use less RAM
• ROM Estimation: Program code (size) + any ROM based tables
Selection of Microprocessor/Microcontroller
According to functionality of final product, following
requirements are to be considered:
• Number of I/O pins
• Interfaces
• Memory requirements (ROM/ RAM)
• Number of interrupts
Selection of Microprocessor/Microcontroller
According to functionality of final product, following
requirements are to be considered:
• Number of I/O pins
• Interfaces
• Memory requirements (ROM/ RAM)
• Number of interrupts
• Real-time considerations
Selection of Microprocessor/Microcontroller
According to functionality of final product, following
requirements are to be considered:
• Number of I/O pins
• Interfaces: Various USBs, serial interfaces, PWM, HDMI,
Auxiliary
• Memory requirements (ROM/ RAM)
• Number of interrupts
• Real-time considerations
• Development environment:
• Integrated development environment or cross compiler
• PROM programmer
• Debug hardware (e.g. Emulators)
Selection of Microprocessor/Microcontroller
According to functionality of final product, following requirements are
to be considered:
• Number of I/O pins
• Interfaces
• Memory requirements (ROM/ RAM)
• Number of interrupts
• Real-time considerations
• Development environment
• Processing speed:
• Sums up the interrupt latencies. Fast enough to handle stackup of worst-
case interrupts
• The length of the polling loop must be short so it shouldn’t miss a byte of
serial data or a byte from other interface
• In some cases, there is no use of higher speeds if wait states do not meet the
memory access time requirements.
• Relation of clock speed and processor speed
Selection of Microprocessor/Microcontroller
According to functionality of final product, following
requirements are to be considered:
• Number of I/O pins
• Interfaces:
• Memory requirements (ROM/ RAM)
• Number of interrupts
• Real-time considerations
• Development environment
• Processing speed
• Memory architecture: Von Neumann or Harvard
Selection of Microprocessor/Microcontroller
According to functionality of final product, following
requirements are to be considered:
• Number of I/O pins
• Interfaces:
• Memory requirements (ROM/ RAM)
• Number of interrupts
• Real-time considerations
• Development environment
• Processing speed
• Memory architecture
• Power requirement:
• Low power mode or sleep mode
• Turns off internal peripherals to save power
Selection of Microprocessor/Microcontroller
According to functionality of final product, following
requirements are to be considered:
• Number of I/O pins
• Interfaces
• Memory requirements (ROM/ RAM)
• Number of interrupts
• Real-time considerations
• Development environment
• Processing speed
• Memory architecture
• Power requirement
• Environmental requirement: Cooling, space, harmful gases etc.
• Life cycle cost: Production and servicing