Embedded System Basics
-
Upload
nshanmugasundaram -
Category
Documents
-
view
380 -
download
3
description
Transcript of Embedded System Basics
116-2-2010
EMBEDDED SYSTEMS & ITS APPLICATIONS
Prepared by
N.SHANMUGASUNDARAMProfessor – ECE Department
Vidyaa Vikas College of Engg & Tech
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
316-2-2010
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?
516-2-2010
What is Embedded System?
DRIVES
Embedded system is a Hardware with Software embedded in it,
for a dedicated application.
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
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
816-2-2010
SMART Embedded Systems …
916-2-2010
SMART Embedded Systems …
1016-2-2010
SMART Embedded Systems …
1116-2-2010
SMART Embedded Systems …
1216-2-2010
SMART Embedded Systems …
1316-2-2010
SMART Embedded Systems …
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
1516-2-2010
SMART Embedded Systems …
1616-2-2010
Applications of Embedded Systems
Consumer Electronics
Automobile
Communication
Office EquipmentsHousehold Appliances
Avionics
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.
1816-2-2010
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
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
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.
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.
2316-2-2010
2416-2-2010
Let us begin with Mobile phone…
2516-2-2010
What are the hardware present
in
MOBILE PHONE?
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
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
2816-2-2010
2916-2-2010
COMPONENTS of Embedded System Hardware
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.
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
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.
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 ….
3416-2-2010
Intel 8051 Family Microcontrollers
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
3616-2-2010
Types of I/O Devices
3716-2-2010
Structure of Serial Port
3816-2-2010
Structure of Parallel Port
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.
4016-2-2010
Types of TIMERS
4116-2-2010
Structure of Hardware Timer
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
4316-2-2010
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:
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.
4616-2-2010
Assembler, Compiler & Linker
4716-2-2010
Software Development Chain
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.
4916-2-2010
Programming using C
Modularity
Usage of Scalar data types, Control statements, …
Easy maintenance
Reusable codes
Portability
Minimal hardware knowledge required
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.
5116-2-2010
STRUCTURE of Operating System
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
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
5416-2-2010
Typical Device Driver
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.
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.
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 ”.
5816-2-2010
Options in RTOS
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.
6016-2-2010
6116-2-2010
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}
6316-2-2010
PROM Programmer
6416-2-2010
HOST
ROM EMULATOR
ROM Emulator
TARGET Board
6516-2-2010
Chip programmer
HOST
TARGET Board
CPU Programmer
6616-2-2010
Device Programmer Tools (for PIC µC)
• PRO MATE II Universal Programmer
• PICSTART Plus
• PROPIC XP
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
6816-2-2010
Issues in Embedded System Designs
Energy-efficient
Real-time
Safety
Upgradeable
Cost sensitive
Security
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)
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)
7116-2-2010
7216-2-2010
Architecture of 8051 Family
7316-2-2010
Pin Diagram of 8051 µC
7416-2-2010
AT89C2051 Micro controller
7516-2-2010
Pin configuration of AT89C2051
7616-2-2010
Minimum configuration - AT89C2051
7716-2-2010
7816-2-2010
Compiler for the project
7916-2-2010
Operation of the Project
8016-2-2010
8116-2-2010
Circuit Diagram for the project
8216-2-2010
LED Pattern displayed for different DICE numbers
8316-2-2010
8416-2-2010
8516-2-2010
Software coding (in C)
8616-2-2010
8716-2-2010
8816-2-2010
8916-2-2010
9016-2-2010
9116-2-2010
9216-2-2010
Breakthrough in Embedded System Designs
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
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
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.
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
9716-2-2010
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
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
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.
10116-2-2010
References
10216-2-2010
References (Contd.)
10316-2-2010
References (Contd.)
10416-2-2010
Thank Youfor your PATIENCE.