15.01.2013 Views

U. Glaeser

U. Glaeser

U. Glaeser

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FIGURE 23.2<br />

6808, I/O ports A and B exist as locations 0 and 1. Similar to most microcomputers, the I/O ports can<br />

be configured as inputs or outputs. The 6808 ports A and B have direction registers at locations 4 (DDRA)<br />

and 5 (DDRB), respectively. The software writes 0’s to the direction register to specify the pins as inputs,<br />

and 1’s to specify them as outputs. When the 6808 software reads from location 0 it gets information<br />

from Port A ( lda 0).<br />

When the software writes to location 1, it sends information out Port B ( sta 1).<br />

For example, the Motorola 6808 assembly language program, shown in Fig. 23.2, reads from a sensor<br />

© 2002 by CRC Press LLC<br />

TABLE 23.1<br />

Examples of Embedded Systems<br />

Category Examples What the Microcomputer Does<br />

Consumer Washing machines Controls the water and spin cycles<br />

Exercise bikes Monitors the workout<br />

TV remotes Accepts key touches and sends IR pulses<br />

Clocks and watches Maintains the time, alarm, and display<br />

Games and toys Entertains the child<br />

Audio/video Enhances performance<br />

Communication Answering machines Saves and organizes messages<br />

Phones and pagers Communication and security<br />

ATM machines Security and convenience<br />

Automotive Automatic breaking Stopping on slippery surfaces<br />

Noise cancellation Improves sound quality<br />

Theft deterrent devices Security<br />

Electronic ignition Controls sparks and fuel injectors<br />

Windows and seats Remember preferred settings<br />

Instrumentation Collects and provides information<br />

Military Smart weapons Does not fire at friendly targets<br />

Missile guidance Directs ordnance at the target<br />

Global positioning Where one is on the planet<br />

Industrial Set-back thermostats Controls temperature and save energy<br />

Traffic control systems Optimizes traffic<br />

Robot systems Performs complex tasks<br />

Bar codes Inventory control<br />

Sprinklers Optimizes farming<br />

Medical Monitors Measures and alarms<br />

Apnea Alarms if the baby stops breathing<br />

Cardiac Monitors heart functions<br />

Renal Studies kidney functions<br />

Drugs Automatic delivery<br />

Cancer treatments Controls radiation, drugs, heat<br />

Pacemakers Helps the heart beat regularly<br />

Prosthetic devices Increases mobility<br />

Dialysis machines Provides kidney functions<br />

labels op codes operands comments<br />

main: mov #0,4<br />

mov #$FF,5<br />

loop: lda 0<br />

cmp #73<br />

bhi off<br />

cmp #68<br />

bhs loop<br />

on: mov #1,1<br />

bra loop<br />

off: mov #0,1<br />

bra loop<br />

DDRA=0<br />

DDRB=$FF<br />

RegA=temperature<br />

Is RegA>73?<br />

Goto off if RegA>73<br />

Is RegA 73°F<br />

off<br />

turn on heat turn off heat<br />

68�T�73°F<br />

A bang-bang temperature controller with hysteresis implemented using a Motorola 6808.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!