Embedded Systems

30
Embedded Embedded Systems Systems A Lecture Presented By Engr. Gilbert R. Hufana

description

Lecture on Embedded Systems

Transcript of Embedded Systems

Page 1: Embedded Systems

Embedded Embedded SystemsSystemsA Lecture Presented ByEngr. Gilbert R. Hufana

Page 2: Embedded Systems

What are Embedded What are Embedded Systems?Systems?a special-purpose computer system

designed to perform one or a few dedicated functions

encompass a variety of hardware and software components that performs specific functions in host systems

It is usually embedded as part of a complete device including hardware and mechanical parts.

Page 3: Embedded Systems

Its ApplicationIts ApplicationTelecommunications

◦Telephone switches◦Mobile phones◦Routers and bridges for networking

Consumer Electronics◦PDAs, MP3 players, mobile

phones…◦Digital cameras, DVP players…◦Household appliances…washing

machines, microwave oven etc.

Page 4: Embedded Systems

Its Application…cont.Its Application…cont.Health and Medicine

◦Vital signs monitoring◦Electronic stethoscope◦Imaging (PET, MRI, CT)

Page 5: Embedded Systems

Its Application…cont.Its Application…cont.Transportation systems

◦Internal guidance system and GPS in airplanes

◦Automatic 4W-drive cars◦Anti-lock braking system (ABS)◦Motor controllers◦Electronic Fuel Injection (EFI)

Page 6: Embedded Systems

CharacteristicsCharacteristicsdesigned to do some specific task,

rather than be a general-purpose computer for multiple tasks

not always standalone devices◦consist of small, computerized parts within

a larger device that serves a more general purpose

program instructions written for embedded systems are referred to as firmware, and are stored in read-only memory or Flash memory chips.

Page 7: Embedded Systems

FirmwareFirmwarea computer program that is

embedded in and controls a hardware device

Examples:◦BIOS in personal computers◦EPROM chips in digital music processors◦Timing and control system for washing

machines◦iPod’s control menus

Page 8: Embedded Systems

User InterfacesUser InterfacesNo interface

◦Dedicated to only one taskGraphical User Interface (GUI)

◦resemble modern computer desktop operating systems.

Page 9: Embedded Systems

The VNAThe VNA

Page 10: Embedded Systems

MicrocontrollerMicrocontrollera special-purpose computera functional computer system-on-

a-chip (http://en.wikipedia.org/wiki/Microcontroller)◦Basically contains:

a processor core, memory, and programmable

input/output peripherals.

Page 11: Embedded Systems

Basic Microcontroller Basic Microcontroller ArchitectureArchitecture

Page 12: Embedded Systems

The CPU/MicroprocessorThe CPU/MicroprocessorInstruction interpreterA module of arithmetic and logic

functionsIR (Instruction Register)

◦Register inside the CPU where the fetched instruction is loaded

PC (Program Counter)◦Holds the address of the instruction

to fetched next

Page 13: Embedded Systems

The Instruction CycleThe Instruction Cycle

HALT

Fetch Next Instruction

Fetch Cycle Execute Cycle

Execute Instruction

Check for Interrupt; Process Interrupt

START

Interrupts disabled

Interrupts enabled

Interrupt Cycle

Page 14: Embedded Systems

Memory: RAM vs ROMMemory: RAM vs ROMRAM (Random Access Memory)

◦Volatile

ROM (Read-only Memory)◦Non-volatile

Page 15: Embedded Systems

Types of ROMTypes of ROM1. PROM (Programmable ROM)

◦ Non-volatile and maybe written only once

◦ Writing process is performed electrically

2. EPROM (Erasable PROM)◦ Similar to PROM◦ Erasing is done by exposing the chip

to ultraviolet radiation◦ Holds data virtually indefinitely

Page 16: Embedded Systems

Types of ROMTypes of ROM3. EEPROM (Electrically erasable PROM)

◦ Can be written into at any time without erasing prior contents

◦ Combines the advantage of flexibility and non-volatility

4. FLASH MEMORY◦ Intermediate to EPROM and EEPROM◦ Uses electrical erasing technology◦ Erases just blocks of the memory rather

than entire chip

Page 17: Embedded Systems

CharacteristicsCharacteristics"embedded" inside some other

device (often a consumer product) so that they can control the features or actions of the product

dedicated to one task and run one specific program◦The program is stored in ROM (read-

only memory) and generally does not change.

Page 18: Embedded Systems

……Characteristics stillCharacteristics stillLow-power devices

◦Battery operated; 50 milliwattshas a dedicated input device and

often (but not always) has a small LED or LCD display for output

small and low cost◦The components are chosen to

minimize size and to be as inexpensive as possible.

ruggedized

Page 19: Embedded Systems

Programming Programming EnvironmentsEnvironmentsoriginally programmed only in

assembly language, but various high-level programming languages are now also in common use to target microcontrollers◦C – intermediate

Interpreter firmware is also available for some microcontrollers – BASIC Stamp

Page 20: Embedded Systems

The BASIC StampThe BASIC StampA microcontroller with a small,

specialized BASIC interpreter built into ROM.

made by Parallax, Inc. has been quite popular with

electronics hobbyists since the early 1990s due to its low threshold of learning and ease of use (due to its simple BASIC language).

http://www.parallax.com

Page 21: Embedded Systems

Technical SpecificationsTechnical SpecificationsA Microcontroller containing the

CPU, a built in ROM containing the BASIC interpreter, and various peripherals

Memory (a serial EEPROM)A clock, usually in the form

of a ceramic resonatorA power supplyExternal input and output

Page 22: Embedded Systems

VersionsVersions

BASIC Stamp 1 (BS1)BASIC Stamp 2 (BS2), with six

sub-variants: ◦BS2e,BS2sx,BS2p24,BS2p40,BS2pe,B

S2pxJavelin StampSpin Stamp

Page 23: Embedded Systems

BASIC Stamp 2p 24-Pin BASIC Stamp 2p 24-Pin ModuleModule$79.00 as of December 12, 2008Technical Specifications:

Processor Speed = 20 MHz Turbo Program Execution Speed = ~12,000

instructions/sec. RAM Size = 38 Bytes (12 I/O, 26 Variable) EEPROM (Program) Size = 8 x 2K Bytes, ~4,000

instructions I/O Pins = 16 +2 Dedicated Serial Voltage Requirements = 5 - 12 vdc Current Draw at 5V = 40 mA Run / 350 µA Sleep PBASIC Commands = 61 Size = 1.2"x0.6"x0.4"

Page 24: Embedded Systems

Programming the BASIC Programming the BASIC StampStampYou program a BASIC Stamp

using the BASIC programming language.

If you already know BASIC, then you will find that the BASIC used in a Stamp is straightforward but a little stripped-down.

Page 25: Embedded Systems

Standard BASIC Standard BASIC InstructionsInstructionsfor...next - normal looping

statement gosub - go to a subroutine goto - goto a label in the program

(e.g. - "label:") if...then - normal if/then decision let - assignment (optional) return - return from a subroutine end - end the program and sleep

Page 26: Embedded Systems

Other Instructions…Other Instructions…Instructions having to do with I/O pins

◦Button, high, input, low etc.Instructions specific to the BASIC Stamp

◦Branch, debug, eeprom etc.Operators – Arithmetic, Logical and

Comparison◦+,-,*,/, and, or, not, xor, nand, =, <, >, <=,

etc.Variables are predefined but can be

changed

Page 27: Embedded Systems

BASIC Stamp Starter KitBASIC Stamp Starter KitThe BASIC Stamp 1

Starter Kit includes a special BS1 Serial Adapter that allows you to program in the Windows environment.

Due to the small size (1.4"x.6"x.1") it's also perfect for fitting in tight applications.

Approx. $80.00

Page 28: Embedded Systems

Things you can do with BSThings you can do with BSDigital clockDigital thermometerOthers…

Page 29: Embedded Systems

Before Ending…Before Ending…Embedded systems development

is an interesting field in IT…◦It creates a lot of opportunities…◦It enhances one’s intuitiveness, logic

and creativity…◦It spawns a new dimension for higher

quality of living…I dare each one to converge for

the challenge…make a difference.

Page 30: Embedded Systems

THANK YOU!!!THANK YOU!!!Embedded Systems: A Lecture