Sunteți pe pagina 1din 24

Embedded Systems and the 8051 Microcontroller

By Dr. Min He.

Overview

Introducing Embedded Systems Difference between Software Development for Desktop and Embedded Systems The Process of Developing an Embedded System Embedded Software Development Tool Chain

Introducing Embedded Systems

Embedded system: any device that includes a programmable computer but is not itself a general-purpose computer. Take advantage of application characteristics to optimize the design:
dont need all the general-purpose bells and whistles.

Other Definitions

Embedded Systems are computers lodged in other devices where the presence of the computers is not immediately obvious. Computer Architecture A Quantitative Approach A special-purpose computer system designed to perform one or a few dedicated functions, often with real-time constraints. It is usually embedded as part of a complete device including hardware and mechanical parts. -Wikipedia

Embedded Systems are Everywhere

Personal digital assistant (PDA). Printer. Cell phone. Automobile: engine, brakes, dash, etc. Television. Household appliances. PC keyboard (scans keys). And more

Microwave

Microcontroller: 16 or 32 bit Used to control the clock/timer and the on/off cycles of the different functions like the Defrost or cooking power.
CECS347 Embedded Processors 6

Digital Photo Frame


32-bit RISC processor (based off ARM) Image rendering and video decoding together with provision for touch screen interfaces.

CECS347 Embedded Processors

Smartphone and Handheld Games


32-bit ARM7TDMI Processor Plays computer games

Microprocessor: 32 bit Cortex- M3 : The ARM processor Two features that may make it desirable for the lower two devices include that it has 32 levels of interrupt priority and 4 GB of addressable memory

CECS347 Embedded Processors

Universal Remote Control


8-bit Microprocessor Learning capability copies functions from original remotes

CECS347 Embedded Processors

Product: Sonicare Elite toothbrush. Microprocessor: 8-bit Has a programmable speed control, timer, and charge gauge

10

Product: Any PC Mouse, Keyboard, or USB Device


Microprocessor: 8-bit Microcontroller
Inside view of a Microsoft Mouse

11

Product: Any Printer Microprocessor: Intel, Motorola, or ARM 32-bit RISC

12

Product:Vendo Vue 40 vending machine.

Microprocessor: Two 16-bit Hitachi H8/300H Processors

A robot hand dispenses items


13

Product: Pavion Portable GPS Navigation & Multimedia System Microprocessor: ARM , DSP OS: Windows CE Also plays MP3s and Videos
14

Product: Dresser Wayne Ovation iX Gas Pump Microprocessor: Marvel Xscale (ARM)
OS: Windows CE Displays video ads & is networked to a gas stations back office computer system. Also has remote maintenance features.
15

Product: Bernina Artista 200 Sewing Machine Microprocessor: Marvel StrongARM OS: Windows CE

Can download new images from the internet and sew them
16

Difference Between Software Development for Desktop and Embedded Systems


Desktop The same desktop run many different programs. User program and the required data are loaded from disk to RAM when user need to run it and removed from RAM when the program is done. Embedded Systems The vast majority of embedded systems are required to run only one program. The program will start running from ROM when the microcontroller is powered up until power is turned off.

As a consequence, the simplest architecture in an embedded system is typically a form of Super Loop.

17

A Simple Super Loop Demonstration


void main (void) { // Prepare to run function X X_Init(); while (1) // for ever (Super Loop) { X(); } }

18

The Process of Developing an Embedded System

Edit source files on host machines Cross-compile, link for target on host machine Simulate and test on host machine Building embedded hardware Getting the embedded software into the target system Test on target machine

19

Embedded Software Development Tool Chain

Cross-compiler/Assembler vs. native tool


Host and target machine

Linker/Locators for Embedded Software Simulate and test on host machine Getting embedded software into the target systems

*Tool chain: a set of tools that is compatible with the target machine and is used to support the whole development process for embedded software.
20

Cross-Compiler, Cross-Assembler

Host Machine vs. Target Machine


Host machine: a computer system on which all the programming tools run. Target machine: the system that is shipped to customers.

Cross-compiler/assembler: A compiler/assembler that runs on your host system but produces the binary instructions that will be understood by your target microprocessor.
21

Native Tool Chain


ABBOTT.C int idunno; whosonfirst(idunno) Compiler ABBOTT.OBJ MOVE R1, (idunno); CALL whosonfirst Linker Memory HAHAHA.EXE MOVE R1, 2388 CALL 1547 1547 MOV R1, R5 2388 (value of idunno) 20000 HAHAHA.EXE MOVE R1, 22388 CALL 21547 MOV R1, R5 (value of idunno)
22

COSTELLO.C int whosonfirst (int x) { }


Compiler COSTELLO.OBJ whosonfirst:

Loader
21547 22388

Tool Chain for Building Embedded Software


C and C++ files Cross-compiler Assembly files Operations on the host Cross-assembler

Object files (may be any format) Linker/locator

Object files (may be any format)

Executable file (may be of any of various standard formats) Executable file is copied to target.

Target System
23

Reference Materials

An Embedded Software Primer, by David E. Simon, ISBN: 020161569X, Chapter 9 & 10.

24

S-ar putea să vă placă și