Microcontroller Projects with Basic Stamps

Just getting started with microcontrollers? The Basic Stamp has taken the dedicated microcontroller out of the province of experts. It's a special microcontroller that requires very little (if any) supporting hardware. This book teaches what you need to know about solving problems with microprocessors in general, and the Basic Stamp in particular. You get clear explanations of the principles you need to design hardware and write software for the Basic Stamp. You also get a wealth of example projects and a Basic Stamp emulator that lets you experiment without so much as buying a Stamp!

Are you an old-hand at microcontroller design? Seasoned designers accustomed to using more arcane microcontrollers will find that Basic Stamps are easy, productive, and fun to use. You will find practical advice for PC interfacing, using EEPROMS and other devices, as well as a task-oriented command reference, and chapters that cover analog I/O, serial communications, and LCDs and keypads. The author also tells how to move programs to other processors when necessary, and covers the latest developments including the SX Basic Stamp and the Windows-based programming software.

Want to control a chemical process, or move a telescope by remote control? The Basic Stamp has opened microcontroller design to a wide range of people. And this book is a complete guide to developing practical solutions with the Stamp. Chapters provide exercises to confirm your understanding of key topics, or serve as an instructional tool in a microcontroller course. Sample projects include:

• A PC-connected frequency counter
• A homebrew analog to digital converter
• A resistance or capacitance meter
• A Morse code keyer
• A variety of illustrative games

The CD-ROM is packed with files and information about the Stamp. It features a Basic Stamp emulator and a PIC programmer based on the Basic Stamp for times when you need the power of assembly language.

Author bio: Al Williams is a consultant, teacher, and author. As a veteran hardware and software designer, Al has written several popular books on all aspects of computers. His columns appear regularly in Visual Developer and Web Techniques magazines. An amateur radio operator since 1977, Al is expert at providing a bridge between the hardware and software worlds. His company, AWC, provides microcontroller consulting and development tools for Basic Stamps and other microcontrollers.

   

Click Here!


432 sidor + CD 561:- inkl moms (449 ex) 0-87930-587-8

E-Mail till MUX-Elektronik Till robotics-menyn

 

Table of Contents

Introduction

The Challenge
Is This Book for You?
What You Need
How to Proceed

Chapter 1

Jump Right In
getting Started

Hardware

Other Prototyping Needs

The No-Hardware Approach

The Software

Your First Stamp Program

The Outside World

Digital Basics

Number Systems

Other Bases

Boolean Algebra

Connecting Hardware

Digital Systems in an Analog World: A Few Laws

Pull-up and Pull-down Resistors

Putting it All Together: Your Next Program

Summary

Exercises

Chapter 2

The Nitty Gritty -- A Stamp Reference

General Program Formatting and Labels

The Stamp I Memory Map and I/O

Stamp I Expressions

The Stamp II Memory Map and I/O

Stamp II Expressions

Handling Large, Negative, and Floating Point Expressions

Command Reference

Section I -- Data Commands

DEBUG I, II, IISX

SYMBOL I

CON II, IISX

VAR II, IISX

LET I

EEPROM I

BSAVE I

DATA II. IISX

READ I, II, IISX

WRITE I, II, IISX

PUT IISX

GET IISX

RANDOM I, II, IISX

Section II -- Flow Control

END I, II, IISX

PAUSE I, II, IISX

NAP I, II, IISX

SLEEP I, II, IISX

GOTO I, II, IISX

IF I, II, IISX

BRANCH I, II, IISX

GOSUB I, II, IISX

RETURN I, II, IISX

FOR I, II, IISX

NEXT I, II, IISX

RUN IISX

Section III -- Digital I/O

INPUT I, II, IISX

OUTPUT I, II, IISX

HIGH I, II, IISX

LOW I, II, IISX

TOGGLE I, II, IISX

REVERSE I, II, IISX

PULSOUT I, II, IISX

PULSIN I, II, IISX

COUNT II, IISX

BUTTON I, II, IISX

XOUT II, IISX

Section IV -- Analog I/O

PWM I, II, IISX

POT I

RCTIME II, IISX

SOUND I

FREQOUT II, IISX

DTMFOUT II, IISX

Section V -- Serial I/O

SERIN I, II, IISX

SEROUT I, II, IISX

SHIFTIN II, IISX

SHIFTOUT II, IISX

Section VI -- Tables

LOOKUP I, II, IISX

LOOKDOWN I, II, IISX

Section VII -- Math Operators

+ , - , * , / I, II, IISX

** I, II, IISX

*/ II, IISX

// I, II, IISX

>> , << II, IISX

MIN , MAX I, II, IISX

ABS II, IISX

SQR II, IISX

SIN , COS II, IISX

DIG II, IISX

Section VIII -- Logical Operators

& , | , ^ I, II, IISX

&/ , |/ , ^/ I

REV II, IISX

DCD II, IISX

NCD II, IISX

Exercises

Chapter 3

Digital I/O

I/O by Command

I/O with Registers

An LED Counter

Driving Larger Loads

Driving Relays and Other Inductive Loads

Switching a Relay

Switching Power with PNP Transistors

A PNP Driver

Other Switches

A Word About AC Loads

Simulating Open Collector Outputs

Working with Pulses

Counting Pulses

Reading Buttons

Experimenting with Button

Sharing I/O Pins

Expanding I/O

Summary

Exercises

Chapter 4

Analog Output

Sound and Tone Generation

Simple Speaker Circuits

Experimenting with PWM Noise

Amplifiers

Connecting to the Phone Line

An Example

Generating Voltages using PWM

Trying PWM

Other Uses for PWM

Traditional D/A

Summary

Exercises
 

Chapter 5

Analog Input

Careful What You Ask For

Reading Resistance or Capacitance

A Capacitance Meter Project

Using an ADC

A Homebrew ADC

Voltage to Pulse Conversion

The Simplest Analog Input

Summary

Exercises

Chapter 6

Serial I/O

Definitions

Simple Serial Protocols

Interfacing with the PAK-I

The I2C Bus

I2C Basics

Ending a Transmission

Slow Slaves

Arbitrating Multiple Masters

I2C Plans

Interfacing to an I2C EEPROM

Asynchronous Communications

RS232 Basics

Open Collector Async

A PC Frequency Counter

Extending PC I/O

Summary

Exercises

Chapter 7

LCDs and Keypads

Serial LCDs

LCD Interfacing

LCD Commands

LCD Software

Scanning a Keypad

Analog Keypads

Making the Most of Limited Keys

Graphical LCDs

Details

Summary

Exercises

Chapter 8

Motors

DC Motors

Using PWM

The H Bridge

About Stepper Motors

Servos

Cannibalizing Motors

Summary

Exercises

Chapter 9

Just Projects

LED Die

Reaction Game

Quiz Buttons

Logic Probe

PocketWatch

Morse Code IDer

Morse Code Keyer

Chapter 10

The Next Step

Why Not Stamps?

What You Will Need

Software

Other Software

Assembler Survival Guide

Hardware Shortcuts

Getting Started

The Real Thing

Beyond PICs

Stamps + PICs?

An Example PBP Program

Summary

Exercises

Chapter 11

On Your Own

The Parallax Mailing List

Web Sites

Appendix A

About the CD-ROM

About the Stamp I Simulator

Appendix B

The APP-I PIC Programmer

What's Needed?

Building It

Software

Troubleshooting

PICAWC Controls

Using the COM Port as a Power Supply

Appendix C

Making Cables

Stamp I

Stamp II and Stamp IISX

Answer Key

Chapter 1 Answers

Chapter 2 Answers

Chapter 3 Answers

Chapter 4 Answers

Chapter 5 Answers

Chapter 6 Answers

Chapter 7 Answers

Chapter 8Answers

Chapter 9 (No exercises)

Chapter 10 Answers
 



E-Mail till MUX-Elektronik Till robotics-menyn

MUX-Elektronik
 Butik: Kjellbergsgatan 5, 411 32 Göteborg. Tel / Fax 031 16 33 90


Copyright (C) 1996 (All Rights Reserved)