104
16-2-2010 1 EMBEDDED SYSTEMS & ITS APPLICATIONS Prepared by N.SHANMUGASUNDARAM Professor – ECE Department Vidyaa Vikas College of Engg & Tech

Embedded System Basics

Embed Size (px)

DESCRIPTION

Embedded system Basics (Prepared by N.Shanmugasundaram)

Citation preview

Page 1: Embedded System Basics

116-2-2010

EMBEDDED SYSTEMS & ITS APPLICATIONS

Prepared by

N.SHANMUGASUNDARAMProfessor – ECE Department

Vidyaa Vikas College of Engg & Tech

Page 2: Embedded System Basics

216-2-2010

1. What is Embedded system?

2. Components of Embedded system

3. Hardware Components

4. Programming languages

5. Embedded system development tools

6. Typical application development

7. Exemplary cases of Embedded applications

8. Opportunities & Career in Embedded systems

Overview of the Presentation

Page 3: Embedded System Basics

316-2-2010

Page 4: Embedded System Basics

416-2-2010

Embedded systems are combination of hardware and software.

Any CPU based system other than general purpose computers

An embedded system has specific requirements and performs pre-defined tasks.

An embedded system is a programmed hardware device.

Often the user of the device is not even aware that a computer is present.

What is Embedded System?

Page 5: Embedded System Basics

516-2-2010

What is Embedded System?

DRIVES

Embedded system is a Hardware with Software embedded in it,

for a dedicated application.

Page 6: Embedded System Basics

616-2-2010

Why Embedded system?

There are Environments where the general purpose computers system do not really get into action.

For example: AC has a temperature control sub-system It is not viable to use a PC’s there for achieving task

Page 7: Embedded System Basics

716-2-2010

Redefining - Embedded System

Embedded system is a

Microcontroller based hardware

Software driven

Real time control system

Autonomous or Human interactive

Reliable system

Operating in diverse environments

Page 8: Embedded System Basics

816-2-2010

SMART Embedded Systems …

Page 9: Embedded System Basics

916-2-2010

SMART Embedded Systems …

Page 10: Embedded System Basics

1016-2-2010

SMART Embedded Systems …

Page 11: Embedded System Basics

1116-2-2010

SMART Embedded Systems …

Page 12: Embedded System Basics

1216-2-2010

SMART Embedded Systems …

Page 13: Embedded System Basics

1316-2-2010

SMART Embedded Systems …

Page 14: Embedded System Basics

1416-2-2010

ASIMO Robot made by Honda, Japan.

• Robot can run at speed of 6 kmph & walking speed 1 kmph• Turns ON light switches, open doors, carry objects, and push carts.

Embedded System in ROBOTICS

Page 15: Embedded System Basics

1516-2-2010

SMART Embedded Systems …

Page 16: Embedded System Basics

1616-2-2010

Applications of Embedded Systems

Consumer Electronics

Automobile

Communication

Office EquipmentsHousehold Appliances

Avionics

Page 17: Embedded System Basics

1716-2-2010

Applications of Embedded Systems

Consumer Electronics Industrial Applications Automobiles Communication systems Aerospace Robotics Medical instrumentation Military applications

and Every where in our day-to-day life.

Page 18: Embedded System Basics

1816-2-2010

Page 19: Embedded System Basics

1916-2-2010

CLASSIFICATION of Embedded Systems

Classification is made based on the following…

Processor type

Complexity of H/w & S/w design

Usage of RTOS (Real Time Operating System)

Usage of Source code engg. tools

Type of Power supplied

Page 20: Embedded System Basics

2016-2-2010

• SMALL SCALE: 8/16 bit CPU, little H/w, less S/w complexity, No RTOS, Battery operated. Eg. Toys, Washing machine, …

• MEDIUM SCALE: 16/32 bit µC or DSPs, Complex H/w & S/w design, RTOS Source code Engg tools, IDE. Eg. Mobile phone, ATM, …

• SOPHISTICATED: Configurable processors, Cutting edge applications, Highly complex H/w and S/w design. Eg. RT Video processing, …

CLASSIFICATION of Embedded Systems

Page 21: Embedded System Basics

2116-2-2010

SKILLS for Embedded System Engineer

HARDWARE skills required in:

• Processors (µP, µC, DSP, EP, …)

• Memories (EEPROM, RAM, ..)

• Peripheral devices (8255, 8251, 8253, 8279,…)

• Sensors (Temp, Pressure, Light,…),

• Electronic system design,

• Digital electronics,

• Computer architecture,

• Control system,

• Data communication.

Page 22: Embedded System Basics

2216-2-2010

SKILLS for Embedded System Engineer

SOFTWARE skills required in :

Programming languages - Assembly, C, C++, Java

IDE - Editor, Assemblers, Compilers, Linkers, Debuggers, Simulator.

RTOS – µC / OS-II, Vxworks, Win CE, RTLinux, etc.

Page 23: Embedded System Basics

2316-2-2010

Page 24: Embedded System Basics

2416-2-2010

Let us begin with Mobile phone…

Page 25: Embedded System Basics

2516-2-2010

What are the hardware present

in

MOBILE PHONE?

Page 26: Embedded System Basics

2616-2-2010

Contents inside Mobile phone…

• Processors i.e., GPP, DSP, ASSP, etc.

• Memory EEPROM (Flash), RAM, etc.

• Peripheral ICs ADC/DAC, Ports, Timers, etc.

• Communication circuits Modulation/De-Modulation ckts

• Power supply circuits

Page 27: Embedded System Basics

2716-2-2010

HARDWARE Processor, RAM, ROM, ADC, DAC, Timers, Ports, etc.

APPLICATION SOFTWARE written in Assembly, C, C++, Java, etc.

RTOS (to supervise the Application Software) µC OS-II, Win CE, VxWorks, Embedded Linux, etc.

3 MAIN COMPONENTS of Embedded System

Page 28: Embedded System Basics

2816-2-2010

Page 29: Embedded System Basics

2916-2-2010

COMPONENTS of Embedded System Hardware

Page 30: Embedded System Basics

3016-2-2010

PROCESSORS for Embedded Systems

ALU

Control Unit

PROCESSOR

Types of Processor

• General Purpose Processor (µc, µP, DSP, EP,MP)

• Application Specific System Processor

• Multiprocessor system

• GPP/ASIP core with other hardware integrated in ASIC chip.

Page 31: Embedded System Basics

3116-2-2010

Microprocessor Vs Microcontroller

ALU

ACC.

REGISTERS

PC

INT

SP

CLK

ALU

REG.

ACC.

INT.RAM

SP

T/C

INT.ROM

I/O

I/O

INTCLK

PC

UART

No in-built Peripherals No Bit Manipulation, General Purpose

More in-built Peripherals Bit Manipulation operations, Dedicated Purpose

PROCESSORS for Embedded Systems

Page 32: Embedded System Basics

3216-2-2010

PROCESSORS for Embedded Systems

DSP Processor:

It has additional hardware to perform special operations like

CONVOLUTION, FFT, DFT, DCT, etc.

Embedded Processor:

Processor specially designed for Embedded system applications

with FAST CONTEXT SWITCHING and LATENCY CONTROL.

Page 33: Embedded System Basics

3316-2-2010

Intel 8051 Family (8051, 89C51, 8752…) - 8 bit

PIC 16Fxx Family (PIC 16F77, …) - 8 bit

ARM Family (ARM7TDMI, ARM9TDMI, …) - 32 bit

Other processors from Motorola, Philips, Renaisse, …

PROCESSORS for Embedded Systems

Commonly used PROCESSORS for Embedded system applications are ….

Page 34: Embedded System Basics

3416-2-2010

Intel 8051 Family Microcontrollers

Page 35: Embedded System Basics

3516-2-2010

OTHER HARDWARE for Embedded Systems

1. Power supply circuit

2. Memory - EPROM, RAM, EEPROM (flash), CACHE

3. I/O Ports - 8255 (PPI), 8251 (UART)

4. Timers - 8253

5. ADC / DAC - ADC0809, DAC0800

6. Display & Keyboard Controllers - 8279

7. Programmable Interrupt Controllers - 8259

Page 36: Embedded System Basics

3616-2-2010

Types of I/O Devices

Page 37: Embedded System Basics

3716-2-2010

Structure of Serial Port

Page 38: Embedded System Basics

3816-2-2010

Structure of Parallel Port

Page 39: Embedded System Basics

3916-2-2010

BUSES for Communication

I2C : Bus for communication between multiple ICs.CAN: Bus used in automobiles with centrally controlled network.USB: Bus for communication between CPU and devices like mouse, etc.

ISA, EISA, PCI are standard buses for parallel communication used in PCs, computer network devices, etc.

Page 40: Embedded System Basics

4016-2-2010

Types of TIMERS

Page 41: Embedded System Basics

4116-2-2010

Structure of Hardware Timer

Page 42: Embedded System Basics

4216-2-2010

Usage of TIMERS

1 Real Time Clock (RTC) for the system

2 Initiating an Event after a preset time delay

3 Initiating an Event after a comparison of preset times

4 Capturing the count value in timer on an event

5 Finding time interval between two events

6 Watchdog timer

7 Baud rate control for Serial communication

8 Scheduling of various tasks in RTOS

9 Time slicing of various tasks

10 Time division multiplexing

Page 43: Embedded System Basics

4316-2-2010

Page 44: Embedded System Basics

4416-2-2010

SOFTWARE Components in Embedded Systems

Programming Languages: 1. Machine code

2. Assembly language

3. High level languages ie., C, C++

Editor Simulator

Assembler Loader

Compiler Stethoscope

Linker Trace scope

Debugger IDE

Software Tools:

Page 45: Embedded System Basics

4516-2-2010

SOFTWARE Tools

Editor to TYPE the program. Eg. Notepad, Wordpad, …

Assembler to COVERT Assy program (x.asm) into object file (x.obj).

Compiler to COVERT C program (x.c) into object file (x.obj).

Linker to LINK Object file (x.obj) with Library functions into (x.exe).

Simulator to SIMULATE all Functions of ES hardware circuit.

Debugger to CHECK and TRACE errors.

Stethoscope to dynamically TRACK any variable in program.

RTOS Real Time Operating SystemOS for Embedded system. Eg. Vxworks

IDE Integrated Development EnvironmentA single package comprising of all S/w tools.

Page 46: Embedded System Basics

4616-2-2010

Assembler, Compiler & Linker

Page 47: Embedded System Basics

4716-2-2010

Software Development Chain

Page 48: Embedded System Basics

4816-2-2010

Assembly Language Programming

Advantage

Assembly Language programming is the efficient programming language for accessing the hardware features.

The assembly language op codes directly work on the target machine, so it is faster in operation.

Disadvantage

Tough to understand and Program.

Have to learn instruction set for different processors.

Page 49: Embedded System Basics

4916-2-2010

Programming using C

Modularity

Usage of Scalar data types, Control statements, …

Easy maintenance

Reusable codes

Portability

Minimal hardware knowledge required

Page 50: Embedded System Basics

5016-2-2010

Programming Embedded Systems using C++

Combines the advantage of OOPS, C & Assembly.

Special features: Data Encapsulation, inheritance, etc.

Advantages : Reusability of software components.

Disadvantages: Standard C++ programming makes code complex and lengthy, due to features like Templates, Multiple inheritance, Exception handling, Virtual base classes, Namespaces, etc.

Solution : Special version of C++ (Embedded C++) has provision for selective disabling of features.

Page 51: Embedded System Basics

5116-2-2010

STRUCTURE of Operating System

Page 52: Embedded System Basics

5216-2-2010

KERNEL of Operating System

- OS is a middle layer between Application Software & Hardware.

- It consists of KERNEL and other functions not provided by Kernel.

KERNEL Services

Process Management Memory Management Inter Process Communication I/O management Interrupt Control Device drivers

Page 53: Embedded System Basics

5316-2-2010

Application

Operating System

Device Driver

Firmware

Hardware

ApplicationSoftware

combined withRTOS, DD & FW

Hardware

General Purpose COMPUTER (GPC) EMBEDDED SYSTEM

GENERAL PURPOSE COMPUTER (GPC) and EMBEDDED SYSTEM

Page 54: Embedded System Basics

5416-2-2010

Typical Device Driver

Page 55: Embedded System Basics

5516-2-2010

Real Time Operating System (RTOS)

RTOS is an OS for Embedded system

for response time and event controlled processes.

RTOS Services:

• Basic OS functions - PM, RM, MM, DM, FSM, I/o, etc.

• RTOS main functions - RT Task scheduling and Latency control

• Time management - Time Allocation, time slicing & monitoring for efficiency.

• Predictability - Predicting time behaviour and initiation of task synchronization

• Priorities Management - Allocation and Inheritance

• IPC - Synchronization of Tasks using IPC.

Page 56: Embedded System Basics

5616-2-2010

Why need RTOS?

Reasons for need of RTOS Occasions for NO need of RTOS

When efficient scheduling in needed for multitasks with time constraints.

Task synchronization is needed.

Interrupt Latency Control is essential.

Small scale embedded system never use RTOS.

Instead of functions in RTOS, standard lib functions in C can be used.

eg. malloc(), free(),

fopen(), fclose(), etc.

Page 57: Embedded System Basics

5716-2-2010

Real Time Systems

Hard real time - Systems with Hard Deadlines

No Critical Deadlines can be missed

Eg. Missile Control Systems, Atomic Reactors, …

Soft real time - Timing Constraints a little tolerable Occasional misses are permitted Average response time for an event should be within a specified time

Eg. Washing machines, Microwave oven, …

In RTS, “ A late answer is a wrong answer ”.

Page 58: Embedded System Basics

5816-2-2010

Options in RTOS

Page 59: Embedded System Basics

5916-2-2010

µC/OS-II (MUCOS)

µC/OS-II is Free Open-source RTOS designed by Jean J. Labrosse in 1992.

µC/OS-II is intended for Non-commercial use.

µC/OS-II codes are in C and few CPU specific modules are in ASSY.

µC/OS-II code Port on MANY Processors that are commonly used in ES design.

Page 60: Embedded System Basics

6016-2-2010

Page 61: Embedded System Basics

6116-2-2010

Page 62: Embedded System Basics

6216-2-2010

EMBEDDED DEVELOPMENT TOOLS

PROM Programmer

Chip Programmer

CPU Emulator

In-Circuit-Emulator

In-Circuit-Debugger

Oscilloscope , Logic Probe, DVM, Logic-Analyzer etc…

ROM Emulator

IDE – integrated development environment

{Hardware & peripherals simulator, project manager, debugger, linker, Compiler, Assembler}

Page 63: Embedded System Basics

6316-2-2010

PROM Programmer

Page 64: Embedded System Basics

6416-2-2010

HOST

ROM EMULATOR

ROM Emulator

TARGET Board

Page 65: Embedded System Basics

6516-2-2010

Chip programmer

HOST

TARGET Board

CPU Programmer

Page 66: Embedded System Basics

6616-2-2010

Device Programmer Tools (for PIC µC)

• PRO MATE II Universal Programmer

• PICSTART Plus

• PROPIC XP

Page 67: Embedded System Basics

6716-2-2010

Others Software Tools

MPLAB IDE for PIC Microcontrollers

MPASM (Assembler)

MPLAB-C (C Compiler)

MPLAB-SIM (Simulator)

Other Compilers

Kiel C (for Intel family µCs)

Hi-Tech C

CCS C

Pacific C

Page 68: Embedded System Basics

6816-2-2010

Issues in Embedded System Designs

Energy-efficient

Real-time

Safety

Upgradeable

Cost sensitive

Security

Page 69: Embedded System Basics

6916-2-2010

Energy efficiency:Must run for years on a tiny battery (Hearing aid, Pacemaker and Remote operating devices)

Real-time:Great harm is done, if deadlines are missed. (process control, avionics, weapons)Few time constraints (microwave)

Page 70: Embedded System Basics

7016-2-2010

Safety critical:Device is safety critical (nuclear plant)Some processes in furnace petrochemical

Upgradeability: Impossible to update (spacecraft, pacemaker)

Availability / fault-toleranceMust be operating all the time (pacemaker, spacecraft control)

Can shutdown at any time (cell phone)

Page 71: Embedded System Basics

7116-2-2010

Page 72: Embedded System Basics

7216-2-2010

Architecture of 8051 Family

Page 73: Embedded System Basics

7316-2-2010

Pin Diagram of 8051 µC

Page 74: Embedded System Basics

7416-2-2010

AT89C2051 Micro controller

Page 75: Embedded System Basics

7516-2-2010

Pin configuration of AT89C2051

Page 76: Embedded System Basics

7616-2-2010

Minimum configuration - AT89C2051

Page 77: Embedded System Basics

7716-2-2010

Page 78: Embedded System Basics

7816-2-2010

Compiler for the project

Page 79: Embedded System Basics

7916-2-2010

Operation of the Project

Page 80: Embedded System Basics

8016-2-2010

Page 81: Embedded System Basics

8116-2-2010

Circuit Diagram for the project

Page 82: Embedded System Basics

8216-2-2010

LED Pattern displayed for different DICE numbers

Page 83: Embedded System Basics

8316-2-2010

Page 84: Embedded System Basics

8416-2-2010

Page 85: Embedded System Basics

8516-2-2010

Software coding (in C)

Page 86: Embedded System Basics

8616-2-2010

Page 87: Embedded System Basics

8716-2-2010

Page 88: Embedded System Basics

8816-2-2010

Page 89: Embedded System Basics

8916-2-2010

Page 90: Embedded System Basics

9016-2-2010

Page 91: Embedded System Basics

9116-2-2010

Page 92: Embedded System Basics

9216-2-2010

Breakthrough in Embedded System Designs

Page 93: Embedded System Basics

9316-2-2010

HOT167C-1 Version 2.5

Engine Control

Anti- Lock

Brakes

Trans- mission Control

Active Suspension

Dash- board

Lighting A/CPower Locks

Power Seats

Power Windows

Airbag

Embedded systems in Passenger Car

Page 94: Embedded System Basics

9416-2-2010

Automotive embedded systems

• Today’s high-end automobile have > 80 microprocessors

• 4-bit microcontroller checks seat belt

• microcontrollers run dashboard devices

• 16/32-bit microprocessor controls engine

• Millions lines of code

Page 95: Embedded System Basics

9516-2-2010

BMW 850i Brake and Stability control system

Anti-lock brake system (ABS): pumps brakes to reduce skidding.

Electronic stability control (ASC+T): controls brakes and engine to improve stability.

Page 96: Embedded System Basics

9616-2-2010

Embedded system in Digital camera

Microcontroller

CCD preprocessor Pixel coprocessorA2D

D2A

JPEG codec

DMA controller

Memory controller ISA bus interface UART LCD ctrl

Display ctrl

Multiplier/Accum

Digital camera chip

lens

CCD

Page 97: Embedded System Basics

9716-2-2010

Page 98: Embedded System Basics

9816-2-2010

According to analyst firm, the embedded system opportunity is expected to touch

• US$ 360 billion (in terms of devices)

• US$ 36 billion (up from the existing US$ 2 billion).

Experts also predict that there will be a ten-fold increase in the number of people employed in the embedded systems industry,

from the current 60,000 professionals to over six lakh people by 2015.

- Source: NASSCOM

Market Potential for Embedded Systems

Page 99: Embedded System Basics

9916-2-2010

A few of the Embedded Majors

HCL INFOSYS TCS Cognizant Agilent Technologies Boeing BPL Ford Hitachi Hyundai Philips Playstation Sega Siemens Sony SCM Microsystems TATA ELXSI Texas Instruments Tektronix Vestion

Page 100: Embedded System Basics

10016-2-2010

Embedded Systems Companies in Bangalore

SadhanasoftClick Technologies (I) Pvt. Ltd.

Nihar Infoway Ltd. Infobahn (India) Pvt. Ltd.

Vision Comptech Integrators Ltd

Datamation Consultants Pvt. Ltd.

Koenig Solutions Pvt. Ltd. Convergent Communications (India) Pvt. Ltd.

Optimal Infotech Pvt. Ltd. Compucom Software Ltd. Surya Soft-Tech Ltd Kale Consultants Ltd

Datamation Consultants Pvt. Ltd.

Surya Soft-Tech Ltd Mphasis-BFL Ltd Rhombus Technologies Pvt. Ltd.

Mphasis-BFL Ltd Global Automation ( Kale Consultants Ltd MindEdge Solutions

Karishma Software Ltd. Parsec Technologies (India) Ltd.

Binary Semantics Ltd. Netmumbai

Virgosys Software Pvt. Ltd. Polaris Software Lab Ltd Cybersol Technologies Pvt Ltd

SolutionNet India Pvt. Ltd.

IQura Technologies Pvt. Ltd. SDI Infotech Pvt. Ltd.

Datum Technologys (India) Ltd

Gateway WebSystems Pvt. Ltd.

Worldwide Infotech Inc. Java Softech Pvt. Ltd. Binary Semantics Ltd. Learnet India Ltd.

Intrepid Solutions Private Ltd

Global Software Initiatives Pvt. Ltd.

Webspectrum Software Pvt. Ltd.

KPIT Infosystems Ltd

iBilt Technologies Ltd iTech Workshop Pvt. Ltd. Datum Technologys (India) Ltd

Perfect E Com Solution Pvt Ltd.

Page 101: Embedded System Basics

10116-2-2010

References

Page 102: Embedded System Basics

10216-2-2010

References (Contd.)

Page 103: Embedded System Basics

10316-2-2010

References (Contd.)

Page 104: Embedded System Basics

10416-2-2010

Thank Youfor your PATIENCE.