You are on page 1of 30

Embedded

Systems
A Lecture Presented By
Engr. Gilbert R. Hufana

What are Embedded


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.

Its Application
Telecommunications

Telephone switches
Mobile phones
Routers and bridges for networking
Consumer

Electronics

PDAs, MP3 players, mobile


phones
Digital cameras, DVP players
Household applianceswashing
machines, microwave oven etc.

Its Applicationcont.
Health

and Medicine

Vital signs monitoring


Electronic stethoscope
Imaging (PET, MRI, CT)

Its Applicationcont.
Transportation

systems

Internal guidance system


and GPS in airplanes
Automatic 4W-drive cars
Anti-lock braking system (ABS)
Motor controllers
Electronic Fuel Injection (EFI)

Characteristics
designed

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.

Firmware
a

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
iPods control menus

User Interfaces
No

interface

Dedicated to only one task


Graphical

User Interface (GUI)

resemble modern computer desktop


operating systems.

The VNA

Microcontroller
a

special-purpose computer
a functional computer system-ona-chip
(http://en.wikipedia.org/wiki/Microcontroller)

Basically contains:
a processor core,
memory, and
programmable
input/output peripherals.

Basic Microcontroller
Architecture

The CPU/Microprocessor
Instruction

interpreter
A module of arithmetic and logic
functions
IR (Instruction Register)
Register inside the CPU where the
fetched instruction is loaded
PC

(Program Counter)

Holds the address of the instruction


to fetched next

The Instruction Cycle


Fetch Cycle

Execute Cycle

Interrupt Cycle

Interrupts
disabled

START

Fetch Next
Instruction

Execute
Instruction

HALT

Interrupts
enabled

Check for
Interrupt;
Process
Interrupt

Memory: RAM vs ROM


RAM

(Random Access Memory)

Volatile

ROM

(Read-only Memory)

Non-volatile

Types of ROM
1.

PROM (Programmable ROM)

2.

Non-volatile and maybe written only


once
Writing process is performed
electrically

EPROM (Erasable PROM)

Similar to PROM
Erasing is done by exposing the chip
to ultraviolet radiation
Holds data virtually indefinitely

Types of ROM
3.

EEPROM (Electrically erasable PROM)

4.

Can be written into at any time without


erasing prior contents
Combines the advantage of flexibility
and non-volatility

FLASH MEMORY

Intermediate to EPROM and EEPROM


Uses electrical erasing technology
Erases just blocks of the memory rather
than entire chip

Characteristics
"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 (readonly memory) and generally does not
change.

Characteristics still
Low-power

devices

Battery operated; 50 milliwatts


has

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

Programming
Environments
originally

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

The BASIC Stamp


A

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

Technical Specifications
A

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 resonator
A power supply
External input and output

Versions

BASIC

Stamp 1 (BS1)
BASIC Stamp 2 (BS2), with six
sub-variants:
BS2e,BS2sx,BS2p24,BS2p40,BS2pe,B
S2px
Javelin

Stamp
Spin Stamp

BASIC Stamp 2p 24-Pin


Module

$79.00 as of December 12, 2008


Technical 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"

Programming the BASIC


Stamp
You

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.

Standard BASIC
Instructions

for...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

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

changed

are predefined but can be

BASIC Stamp Starter Kit


The

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

Things you can do with BS


Digital

clock
Digital thermometer
Others

Before Ending
Embedded

systems development
is an interesting field in IT
It creates a lot of opportunities
It enhances ones intuitiveness, logic
and creativity
It spawns a new dimension for higher
quality of living

dare each one to converge for


the challengemake a difference.

Embedded Systems: A Lecture

THANK YOU!!!

You might also like