34
A Brief Introduction to Embedded Systems K. Raghunathan Chartered Engineer FIETE, MIE, MCSI, MISTE, MISTD. MIIMM Retd. Dy. Controller (R&D) [MoD]

Embedded Systems - A Brief Introduction

Embed Size (px)

Citation preview

Page 1: Embedded Systems - A Brief Introduction

A Brief Introduction to

Embedded Systems

K. RaghunathanChartered Engineer

FIETE, MIE, MCSI, MISTE, MISTD. MIIMMRetd. Dy. Controller (R&D) [MoD]

Page 2: Embedded Systems - A Brief Introduction

Embedded Systems

• Overview of Embedded Systems

• Embedded System Design

• Embedded System Designer

• More Knowledge

Page 3: Embedded Systems - A Brief Introduction

Overview of Embedded Systems

• What is an Embedded System ?

• Examples of Embedded Systems

• Why an “Embedded” System ?

• Salient Features

Page 4: Embedded Systems - A Brief Introduction

What is an Embedded System ?

• A computer system, fitted as part of some Equipment which is not a computer

• The whole system is not called a computer - it is known by the name of the Equipment

• The embedded computer system controls the equipment in which it is embedded

• Performs only specific tasks, often in real-time

Page 5: Embedded Systems - A Brief Introduction

Examples of Embedded Systems

• Network Printer– Network Interfacing & Routing

• Handheld Barcode Scanner– Conversion of Image to Number

• Mobile Phone with Internet Connectivity– Browsing, eMail, FTP, Chat etc

Page 6: Embedded Systems - A Brief Introduction

Examples of Embedded Systems• CNC Machines & Robots

– Control the Sequence of Operations• Satellites

– Remote-sensing, Data-formatting, Communication, Navigation Control etc

• Televison Set– Digital on-screen display of menu, channel

number, subtitles etc• Washing Machines

– Control of Sequence of Operations, Motor speed & duration control etc

Page 7: Embedded Systems - A Brief Introduction

Why “embed” a Computer ?

• Computers are more suitable for

– Control– Data Processing– Decision Making– Digital Communication

Page 8: Embedded Systems - A Brief Introduction

Why “embed” a Computer ?

• Main Equipment is Larger & Costlier; computer is smaller, cheaper & used for only some specific purpose

• Using General-purpose computer involves additional space & wiring. It is better to fit a small computer inside [or onto] the equipment itself

• often, main equipment itself may have to be small & portable

Page 9: Embedded Systems - A Brief Introduction

Salient Features of Embedded Systems

• Purpose & Functionality– Specific Purpose; Limited Functionality

• Size– Small enough to fit into/onto the main eqpt

• Real-Time– Response within a specified Time-limit

• I/O Devices– Very Few; often, only Sensors & Activators– Conspicuous absence of conventional devices

like keyboard, CRT screen, hard disk etc

Page 10: Embedded Systems - A Brief Introduction

Embedded Systems

• Overview of Embedded Systems √

• Embedded System Design

• Embedded System Designer

• More Knowledge

Page 11: Embedded Systems - A Brief Introduction

Embedded System Design

• Selection of CPU & other Hardware• Design of the Hardware System• Design & Development of Software• Testing & Debugging• Loading the Software into the Embedded

System’s Memory

Page 12: Embedded Systems - A Brief Introduction

Selection of CPU & other Hardware

• CPU– Speed– Instruction Set– Multitasking Capabilities– Interrupt- handling Capabilities– Power Consumption– Heat Dissipation

Page 13: Embedded Systems - A Brief Introduction

Memory

• Non-Volatile [ROM/PROM/EPROM]– Code – Fixed Data

• Look-Up Tables, Constants, Initial Values of Variables

• Volatile [RAM] – Variable Data – temporary data

Page 14: Embedded Systems - A Brief Introduction

I/O Devices• Depends on :

– Main Equipment & its purpose/functions– Purpose to be served by the embedded

system

• May also need :– HW & SW Interfaces or Drivers for the i/o

devices

Page 15: Embedded Systems - A Brief Introduction

Software Development• Software has to be developed on some

other convenient computer system [Host System]

• The Code obtained in the Host system should run in the Embedded System [Target System]

Page 16: Embedded Systems - A Brief Introduction

Software Development

• HW configuration of Host & Target will be different

• Should use Cross Compilers & Cross Assemblers on the Host, to get Target System’s Machine Code as the Output

• Often, an RTOS [Real Time Operating System] is used

Page 17: Embedded Systems - A Brief Introduction

Software Development

• Usually the SW is developed as a set of Tasks [functions/procedures] & ISRs[Interrupt Service Routines]

• Tasks perform some specific actions – most likely, some of the primary functions of

the Main eqpt• ISRs interrupt running Tasks based on

certain events [inputs from sensors] – to take appropriate action for those inputs– to update data for the tasks

Page 18: Embedded Systems - A Brief Introduction

Testing & Debugging

• Often not possible to test the program by actually loading it into the target system & running it in the Main eqpt

• So, code has to be tested in the Host system itself

• Need Emulators which can emulate the embedded system’s CPU

Page 19: Embedded Systems - A Brief Introduction

Testing & Debugging

• Drivers & Scaffolds to be written – to simulate actual inputs & behaviour of the

main eqpt

• Test Data – normally expected range of values – out-of-range values– erroneous data

Page 20: Embedded Systems - A Brief Introduction

Loading SW in the Embedded System’s Memory

• No operating system in the embedded system

• Code generated on the Host system should include start-up [initialising] routines for the target system

• Use of RTOS ensures automatic addition of start-up code

Page 21: Embedded Systems - A Brief Introduction

Loading SW in the Embedded System’s Memory

• Special programs called Locators enable developer to specify which blocks of code should be loaded at what addresses in the embedded system’s memory

• Output of Locator is in the form of a file stored in the Host; this file will have a special format [not the standard executable file you get in desktop systems]

• Special programs called Loaders– understand the Locator’s file format– load the code in embedded systems memory

Page 22: Embedded Systems - A Brief Introduction

Tools for Embedded Software Development

• Cross Compilers• Cross Assemblers• Locators

• RTOS

• Loaders

Page 23: Embedded Systems - A Brief Introduction

RTOS• Easier Development Environment• Produce Machine Code of Target CPU• Automatic inclusion of code for Start-up &

system Initialisation & other necessary functionalities like memory management, process scheduling etc

• Many RTOSes available– iRMX86, uC-OS, VxWorks, pSOS, QNX etc

• Many of them written in C/C++– allow us to develop programs using C/C++

Page 24: Embedded Systems - A Brief Introduction

RTOS

• Main Features

– Multi-tasking– Task Scheduling Policies– Mutual Exclusion using Semaphores– Message Queues, Mailboxes and/or Pipes for

Inter-Process Communication

Page 25: Embedded Systems - A Brief Introduction

Hardware Design Considerations

• Physical Size– Small

• Power Consumption– Low

• Heat Dissipation– Very Low

• Cost– Low cost, without compromising Quality &

Performance

Page 26: Embedded Systems - A Brief Introduction

Software Design Considerations

• Real Time Response– No part of the code can take unpredictable

execution time– ISRs must be kept short– No Dead-Locks or Circular Waits

• Reliability– Should run without Human Intervention– Should NOT Crash– Robust & Fault Tolerant– Exception Handling without Malfunction or

unpredictable behaviour

Page 27: Embedded Systems - A Brief Introduction

Embedded Systems

• Overview of Embedded Systems √

• Embedded System Design √

• Embedded System Designer

• More Knowledge

Page 28: Embedded Systems - A Brief Introduction

Embedded System Designer• Specialist• Knowledge of Theory & Practical

Techniques of both Hardware & Software• Strong Foundation in

– Digital Logic Ckts, ADCs, DACs, PLCs, FPGAs– Microcontrollers & Interfacing Techniques– Assembly Language Programming– High Level Language Programming [C/C++]– Writing ISRs– RTOS

Page 29: Embedded Systems - A Brief Introduction

Job Oppurtunities• Employers

– Manufacturers of• Telecom Products• Automatons & Industrial Robots• Automated Production & Diagnostic Eqpt

– Software Development Firms

• Remuneration– Lucrative

Page 30: Embedded Systems - A Brief Introduction

Embedded Systems

• Overview of Embedded Systems √

• Embedded System Design √

• Embedded System Designer √

• More Knowledge

Page 31: Embedded Systems - A Brief Introduction

For More Knowledge

• Books

• Hands-on Training

Page 32: Embedded Systems - A Brief Introduction

Books on Embedded Systems• An Embedded System Primer

– David E Simon• Embedded System Design

– Steve Heath• The Art of Programming Embedded Systems

– Jack G Ganssle• Fundamentals of Embedded Software - Where C and

Assembly Meet– Daniel W Lewis

• Real Time Systems & Programming Languages– Alan Burns & Andy Wellings

• Real Time Programming– Moore Grehan

Page 33: Embedded Systems - A Brief Introduction

Training on Embedded Systems

• TCIL, & their Branches & Franchisees– Telecom Consultants India Ltd– formed by DoT

• ECIL, Hyderabad– Electronic Corporation of India Ltd

• Many institutes boast of embedded system training– teach only soldering & assembling, using kits– do not teach theory or design principles

Page 34: Embedded Systems - A Brief Introduction

Thank You !&

Best of Luck !