EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications...

49
EMBEDDED SYSTEM BASICS

Transcript of EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications...

Page 1: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

EMBEDDED SYSTEM BASICS

Page 2: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

2

TOPICS TO BE DISCUSSED • System• Embedded System• Components• Classifications• Processors• Other Hardware• Software• Applications

Page 3: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

3

INTRODUCTIONWhat is a system?

A system is a way of working, organizing or doing one or many tasks according to a fixed plan, program or set of rules.

A system is also an arrangement in which all its units assemble and work together according to the plan or program.

Page 4: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

4

SYSTEM EXAMPLESWATCH

It is a time display SYSTEMParts: Hardware, Needles, Battery, Dial, Chassis and Strap

Rules1.All needles move clockwise only2.A thin needle rotates every second3.A long needle rotates every minute 4.A short needle rotates every hour5.All needles return to the original position after 12 hours

Page 5: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

5

SYSTEM EXAMPLES WASHING MACHINE

It is an automatic clothes washing SYSTEMParts: Status display panel, Switches & Dials, Motor, Power supply & control unit, Inner water level sensor and solenoid valve.

Rules1.Wash by spinning 2.Rinse3.Drying 4.Wash over by blinking 5.Each step display the process stage6.In case interruption, execute only the remaining

Page 6: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

6

EMBEDDED SYSTEMDefinition: An Embedded System is a system that has computer hardware with software embedded in it as one of its important components.

SOFTWARE PROGRAM

#include <16f876a.h>#use delay (clock=20000000)#byte PORTB=6main(){set_tris_b(0);portb=255;        //decimaldelay_ms(1000);portb=0x55;        //hexadecimaldelay_ms(1000);portb=0b10101010;  //binarydelay_ms(500);}

Its software embeds in ROM (Read Only Memory). It does not need secondary memories as in a computer

HARDWARE

Page 7: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

7

1. “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.” – Present Book

2. “An embedded system is one that has a dedicated purpose software embedded in a computer hardware.” – Present Book

Embedded System Definitions

Page 8: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

8

3. “It is a dedicated computer based system for an application(s) or product. It may be an independent system or a part of large system. Its software usually embeds into a ROM (Read Only Memory) or flash.” – Present Book

4. “It is any device that includes a programmable computer but is not itself intended to be a general purpose computer. ” – Wayne Wolf

5. “Embedded Systems are the electronic systems that contain a microprocessor or a microcontroller, but we do not think of them as computers– the computer is hidden or embedded in the system.” – Todd D. Morton

Page 9: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

9

Best Definition of Embedded Systems

• “Embedded Systems are the electronic systems that contain a microprocessor or a microcontroller, but we do not think of them as computers– the computer is hidden or embedded in the system.”

• It is a combination of Software and Hardware”

• It is Specific to an application

• E.g. Biometric Finger Print System

Page 10: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

10

Embedded System v/s General Purpose System

• An embedded system is a microprocessor-based system that is incorporated into a device to monitor and control the functions of the components of the device. They are used in many devices ranging from a microwave oven to a nuclear reactor.

• Unlike personal computers that run a variety of applications, embedded systems are designed for performing specific tasks.

• An embedded system used in a device (for instance the embedded system in washing machine that is used to cycle through the various states of the washing machine) is programmed by the designers of the system and generally cannot be programmed by the end user.

Page 11: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

11

COMPUTER HARDWARE

A Microprocessor

A Large Memory(Primary and Secondary)(RAM, ROM and caches)

Input Units(Keyboard, Mouse, Scanner, etc.)

Output Units(Monitor, printer, etc.)

Networking Units(Ethernet Card, Drivers, etc.)

I/O Units(Modem, Fax cum Modem, etc.)

Page 12: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

12

COMPONENTS OF EMBEDDED SYSTEM

• It has HardwareProcessor, Timers, Interrupt controller, I/O Devices, Memories, Ports, etc.

• It has main Application SoftwareWhich may perform concurrently the series of tasks or multiple tasks.

• It has Real Time Operating System (RTOS)RTOS defines the way the system work. Which supervise the application software. It sets the rules during the execution of the application program. A small scale embedded system may not need an RTOS.

Page 13: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

13

EMBEDDED SYSTEM HARDWARE

Page 14: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

14

EMBEDDED SYSTEM CONSTRAINTS

An embedded system is software designed to keep in view three constraints:

– Available system memory

– Available processor speed

– The need to limit the power dissipation

When running the system continuously in cycles of wait for events, run, stop and wakeup.

Page 15: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

15

What makes embedded systems different?

• Real-time operation• Size• Cost• Time• Reliability• Safety• Energy• Security• Software up-gradation capability

Page 16: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

16

Four example embedded systems with approximate attributes.

Page 17: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

17

CLASSIFICATIONS OF EMBEDDED SYSTEM

1. Small Scale Embedded System

2. Medium Scale Embedded System

3. Sophisticated Embedded System

Page 18: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

18

SMALL SCALE EMBEDDED SYSTEM

• Single 8 bit or 16bit Microcontroller.

• Little hardware and software complexity.

• They May even be battery operated.

• Usually “C” is used for developing these system.

• The need to limit power dissipation when system is running continuously.

Programming tools: Editor, Assembler and Cross Assembler

Page 19: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

19

MEDIUM SCALE EMBEDDED SYSTEM

• Single or few 16 or 32 bit microcontrollers or Digital Signal Processors (DSP) or Reduced Instructions Set Computers (RISC).

• Both hardware and software complexity.

Programming tools:

RTOS, Source code Engineering Tool, Simulator, Debugger and Integrated Development Environment (IDE).

Page 20: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

20

SOPHISTICATED EMBEDDED SYSTEM

• Enormous hardware and software complexity

• Which may need scalable processor or configurable processor and programming logic arrays.

• Constrained by the processing speed available in their hardware units.

Programming Tools:

For these systems may not be readily available at a reasonable cost or may not be available at all. A compiler or retargetable compiler might have to be developed for this.

Page 21: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

21

PROCESSOR• A Processor is the heart of the Embedded

System.

• For an embedded system designer knowledge of microprocessor and microcontroller is a must.

Two Essential Units: Operations

Control Unit (CU), Fetch

Execution Unit (EU) Execute

Page 22: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

22

VARIOUS PROCESSOR

1. General Purpose processor (GPP)MicroprocessorMicrocontroller Embedded ProcessorDigital signal Processor

2. Application Specific System Processor (ASSP)

3. Multi Processor System using GPPs

Page 23: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

23

MICROPROCESSOR

• A microprocessor is a single chip semi conductor device also which is a computer on chip, but not a complete computer.

• Its CPU contains an ALU, a program counter, a stack pointer, some working register, a clock timing circuit and interrupt circuit on a single chip.

• To make complete micro computer, one must add memory usually ROM and RAM, memory decoder, an oscillator and a number of serial and parallel ports.

Page 24: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

24

HISTORY OF MICROPROCESSOR

1st Generation (4 bit processors)4004 and 4040 4 bit in early 1970 by Intel (Integrated Electronics)

2nd Generation (8 bit processors)8008 and 8080 8 bit in 1974 Intel with +5 V Input supply 8080 8085 8 bit

3rd Generation (16 bit processors)8086 16 bit. Same as 8086, the 8088 introduced 8088 has only 8 bit data bus (This made it easier to interface to the common 8 bit peripheral devices available at the time)

Followed by:The 80186 & 80286 (16 bit processor), the 80386 & 80486 (a 32 bit processor), leading to the Pentium range of microprocessors (64 bit processors) available today. The 80x86 and Pentium processors have all been designed for use in personal computer type applications and have large memory maps.

Page 25: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

25

VARIOUS MICROPROCESSORS

Intel 4004, 4040 8080, 80858086, 8088, 80186, 80188 80286, 80386 x86-64

Motorola

6800 6809 68000G3, G4, G5

Zilog

Z80, Z180, eZ80 Z8, eZ8

and others

Page 26: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

26

MICROCONTROLLER

• A microcontroller is a functional computer system-on-a-chip. It contains a processor, memory, and programmable input/output peripherals.

• Microcontrollers include an integrated CPU, memory (a small amount of RAM, program memory, or both) and peripherals capable of input and output.

Page 27: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

27

VARIOUS MICROCONTROLLERS

INTEL 8031,8032,8051,8052,8751,8752

PIC 8-bit PIC16, PIC18, 16-bit DSPIC33 / PIC24, PIC16C7x

MotorolaMC68HC11

Page 28: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

28

MICROPROCESSOR Vs MICROCONTROLLER

MICROPROCESSOR MICROCONTROLLER

The functional blocks are ALU, registers, timing & control units

It includes functional blocks of microprocessors & in addition has timer, parallel i/o, RAM, EPROM, ADC & DAC

Bit handling instruction is less, One or two type only

Many type of bit handling instruction

Rapid movements of code and data between external memory & MP

Rapid movements of code and data within MC

It is used for designing general purpose digital computers system

They are used for designing application specific dedicated systems

Page 29: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

29

EMBEDDED PROCESSOR

• Special microprocessors & microcontrollers often called, Embedded processors.

• An embedded processor is used when fast processing fast context-switching & atomic ALU operations are needed.

Examples : ARM 7, INTEL i960, AMD 29050.

Page 30: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

30

DIGITAL SIGNAL PROCESSOR

• DSP as a GPP is a single chip VLSI unit.

• It includes the computational capabilities of microprocessor and multiply & accumulate units (MAC).

• DSP has large number of applications such as image processing, audio, video & telecommunication processing systems.

• It is used when signal processing functions are to be processed fast.

Examples : TMS320Cxx

Page 31: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

31

APPLICATION SPECIFIC SYSTEM PROCESSOR (ASSP)

• ASSP is dedicated to specific tasks and provides a faster solution.

• An ASSP is used as an additional processing unit for running the application in place of using embedded software.

Examples : W3100A

Page 32: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

32

MULTI PROCESSOR SYSTEM USING GPPs

• Multiple processors are used when a single processor does not meet the needs of different task.

• The operations of all the processors are synchronized to obtain an optimum performance.

Page 33: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

33

Design Processes AndDesign Metric For An

Embedded-system Design

Page 34: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

34

DESIGN PROCESSES IN EMBEDDED SYSTEM

• Abstraction• Hardware & Software• Extra functional Properties• System Related Family of designs:• Modular Design• Mapping• User interface Design• Refinements

Page 35: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

35

• Each problem component first abstracted.

• For example, Display picture and text as an abstract class

• Robotic system problem abstraction in terms of control of motors in different degrees of freedoms.

• Application software abstracted as concurrently running multiple threads and interrupt service threads

Abstraction

Page 36: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

36

Hardware and Software architecture

• Assumed to consists multiple layers

• Each architectural layer be well understood before a design

Page 37: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

37

Extra functional Properties

• Extra functionalities required in the system being developed be well understood from the design.

Page 38: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

38

Modular Design• Decomposition of software into modules that are to

be implemented.

• Modules should be such that they can be composed (coupled or integrated) later.

• Effective Modular design should ensure effective (i) Function independence, (ii) Cohesion( It is a measure of how strongly-related each piece of

functionality expressed by the source code of a software module is)

(iii) Coupling.

Page 39: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

39

Modules

• Be clearly understood and maintain continuity.

• Appropriate protection strategies are necessary

for each module. A module is not permitted to change or modify another module functionality.

• For example, protection from a device driver modifying the configuration of another device

Page 40: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

40

Mapping• Mapping into various representations done

considering the software requirements.

• For example, an image is input data to a system; it can have a different number of pixels and colors of each pixel. The system has to store or process each pixel and color Transform mapping of image is done by appropriate compression and storage algorithms.

• Transaction mapping is done to define the sequence of the images

Page 41: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

41

User Interfaces Design

• Designed as per user requirements, analysis of the environment and system functions.

• For example, in an automatic chocolate vending machine(ACVM) system, the user interface is a LCD matrix display. It can display a welcome message as well as specify the coins needed to be inserted into the machine for each type of chocolate. Same ACVM may be designed with touch screen GUI.

• Same ACVM may be designed with Voice User Interfaces (VUIs). A GUI or VUI or user interface or LCD matrix display

Page 42: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

42

Refinements

• Each component and module design needs to be refined iteratively till it becomes the most appropriate for implementation by the software team.

Page 43: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

43

OTHER HARDWARE• Power Source

• Clock Oscillator

• Real Time Clock (RTC)

• Reset Circuit, Power-up Reset and watchdog timer Reset

• Memory

• I/O Ports, I/O Buses

• Interrupt Handler

• DAC and ADC

• LCD and LED Display

• Keypad/Keyboard

Page 44: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

44

1. Power Supply

• System own supply with separate supply rails for IOs, clock, basic processor and memory and analog units,

• Supply from a system to which the embedded system interfaces

• Charge pump concept used in a system of little power needs.

• A Charge Pump is an electronic circuit that converts the supply voltage VDD to a DC output voltage Vout that is several times higher than VDD (i.e., it is a DC-DC converter whose input voltage is lower than the output one).

Page 45: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

45

Circuit of Charge Pump

• CPs are only made of capacitors and switches (or diodes), thereby allowing integration on silicon.

Page 46: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

46

2. Clock Oscillator Circuit and ClockingUnits

1. Appropriate clock oscillator circuit

2. Real Time Clock*( System Clock) and Timers driving hardware and software.

A timer circuit is suitably configured as the real time clock (RTC) that generates system interrupts periodically for the schedulers.

Page 47: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

47

3. Reset Circuit

1. Reset on Power-up It means on switching-on reset of the system or on detection of

low voltage.

2. External and Internal Reset circuit

3. Reset on Timeout of Watchdog timer.

Page 48: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

48

SOFTWARE

SIMULATOR

Masm

SOFTWARE C C++ Dot Net

COMPILER RIDEKEIL

Page 49: EMBEDDED SYSTEM BASICS. 2 TOPICS TO BE DISCUSSED System Embedded System Components Classifications Processors Other Hardware Software Applications.

49

• Household appliances:Microwave ovens, Television, DVD Players & Recorders

• Audio players

• Integrated systems in aircrafts and missiles

• Cellular telephones

• Electric and Electronic Motor controllers

• Engine controllers in automobiles

• Calculators

• Medical equipments

• Videogames

• Digital musical instruments, etc.

APPLICATIONS