- Shopping Bag ( 0 items )
- Spend $25, Get FREE SHIPPING
List Price
$56.95
Textbook Details
Used & New From our Trusted Marketplace Sellers
To try again, please visit the B&N Marketplace.
Complete BS2P command reference Demo projects include:
• Internet-to-Stamp gateways
• Infrared remote controls
• Test instrumentation
• Robot motor controls Want to build an electronic game, a robot, or an automated manufacturing process? A
Updated with a complete, task-oriented command reference for the BS2P Stamp and detailed instructions for new projects including Internet-to-Stamp gateways, test instruments, infrared remote controls, and robot motor controls. Includes practical advice for PC interfacing and analog I/O capabilities. CD contains a Basic Stamp emulator and a tool to program PIC chips.
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 regularly appear in New Architect Magazine (formerly Web Techniques). He has also written columns for Visual Developer, Dr. Dobb's Sourcebook, and other publications. An amateur radio operator since 1977, Al is expert at providing a bridge between the hardware and software worlds. His company, AWC, provides consulting and development tools for Basic Stamps and other microcontrollers. Visit his Stamp Web site at http://www.al-williams.com/awce.htm
| Introduction | xi | |
| The Challenge | xii | |
| Is This Book for You? | xii | |
| What's New in the Second Edition? | xiii | |
| What You Need | xiii | |
| How to Proceed | xiv | |
| Chapter 1 | Jump Right In | 1 |
| Getting Started | 2 | |
| Hardware | 3 | |
| Other Prototyping Needs | 7 | |
| The No-Hardware Approach | 9 | |
| The Software | 9 | |
| Your First Stamp Program | 10 | |
| The Outside World | 12 | |
| Digital Basics | 12 | |
| Number Systems | 13 | |
| Other Bases | 14 | |
| Boolean Algebra | 15 | |
| Connecting Hardware | 16 | |
| Digital Systems in an Analog World: A Few Laws | 19 | |
| Pull-up and Pull-down Resistors | 23 | |
| Putting it All Together: Your Next Program | 25 | |
| Summary | 26 | |
| Exercises | 26 | |
| Chapter 2 | The Nitty Gritty--A Stamp Reference | 29 |
| General Program Formatting and Labels | 33 | |
| The Stamp I Memory Map and I/O | 35 | |
| Stamp I Expressions | 39 | |
| The Stamp II Memory Map and I/O | 40 | |
| Stamp II Expressions | 44 | |
| Handling Large, Negative, and Floating Point Expressions | 46 | |
| Command Reference | 54 | |
| Section I | Data Commands | 55 |
| Debug I, II, IISX, IIE, IIP | 56 | |
| Symbol I | 59 | |
| Con II, IISX, IIE, IIP | 60 | |
| VAR II, IISX, IIE, IIP | 61 | |
| Let I | 62 | |
| Eeprom I | 63 | |
| Bsave I | 64 | |
| Data II, IISX, IIE, IIP | 65 | |
| Read I, II, IISX, IIE, IIP | 67 | |
| Write I, II, IISX, IIE, IIP | 68 | |
| Put IISX, IIE, IIP | 70 | |
| Get IISX, IIE, IIP | 72 | |
| Random I, II, IISX, IIE, IIP | 73 | |
| Section II | Flow Control | 75 |
| End I, II, IISX, IIE, IIP | 76 | |
| Pause I, II, IISX, IIE, IIP | 77 | |
| Nap I, II, IISX, IIE, IIP | 78 | |
| Sleep I, II, IISX, IIE, IIP | 79 | |
| Goto I, II, IISX, IIE, IIP | 80 | |
| If I, II, IISX, IIE, IIP | 81 | |
| Branch I, II, IISX, IIE, IIP | 84 | |
| Gosub I, II, IISX, IIE, IIP | 86 | |
| Return I, II, IISX, IIE, IIP | 90 | |
| For I, II, IISX, IIE, IIP | 91 | |
| Next I, II, IISX, IIE, IIP | 93 | |
| Run IISX, IIE, IIP | 94 | |
| Section III | Digital I/O | 95 |
| Input I, II, IISX, IIE, IIP | 96 | |
| Output I, II, IISX, IIE, IIP | 97 | |
| High I, II, IISX, IIE, IIP | 98 | |
| Low I, II, IISX, IIE, IIP | 99 | |
| Toggle I, II, IISX, IIE, IIP | 100 | |
| Reverse I, II, IISX, IIE, IIP | 101 | |
| Pulsout I, II, IISX, IIE, IIP | 102 | |
| Pulsin I, II, IISX, IIE, IIP | 103 | |
| Count II, IISX, IIE, IIP | 105 | |
| Button I, II, IISX, IIE, IIP | 106 | |
| Xout II, IISX, IIE, IIP | 108 | |
| Section IV | Analog I/O | 110 |
| PWM I, II, IISX, IIE, IIP | 111 | |
| Pot I | 113 | |
| Rctime II, IISX, IIE, IIP | 114 | |
| Sound I | 116 | |
| Freqout II, IISX, IIE, IIP | 117 | |
| Dtmfout II, IISX, IIE, IIP | 119 | |
| Section V | Serial I/O | 120 |
| Serin I, II, IISX, IIE, IIP | 121 | |
| Serout I, II, IISX, IIE, IIP | 128 | |
| Shiftin II, IISX, IIE, IIP | 130 | |
| Shiftout II, IISX, IIE, IIP | 131 | |
| Section VI | Tables | 132 |
| Lookup I, II, IISX, IIE, IIP | 133 | |
| Lookdown I, II, IISX, IIE, IIP | 134 | |
| Section VII | Specialized I/O | 135 |
| Auxio, Mainio IIP | 136 | |
| 12CIN, 12COUT BSIIP | 137 | |
| Ioterm BSIIP | 138 | |
| Lcdcmd, Lcdin, Lcdout BSIIP | 139 | |
| Owin, Owout BSIIP | 141 | |
| Section VIII | Event Handling | 142 |
| Pollin BSIIP | 143 | |
| Pollmode BSIIP | 144 | |
| Pollout BSIIP | 145 | |
| Pollrun BSIIP | 146 | |
| Pollwait BSIIP | 147 | |
| Section IX | Math Operators | 149 |
| +, -, *, / I, II, IISX, IIE, IIP | 150 | |
| ** I, II, IISX, IIE, IIP | 151 | |
| */ II, IISX, IIE, IIP | 152 | |
| // I, II, IISX, IIE, IIP | 153 | |
| >>, << II, IISX, IIE, IIP | 154 | |
| MIN, MAX I, II, IISX, IIE, IIP | 155 | |
| ABS II, IISX, IIE, IIP | 156 | |
| SQR II, IISX, IIE, IIP | 157 | |
| SIN, COS II, IISX, IIE, IIP | 158 | |
| DIG II, IISX, IIE, IIP | 159 | |
| Section X | Logical Operators | 160 |
| &, |, ^ I, II, IISX, IIE, IIP | 161 | |
| &/, |/, ^/ I | 162 | |
| REV II, IISX, IIE, IIP | 163 | |
| DCD II, IISX, IIE, IIP | 164 | |
| NCD II, IISX, IIE, IIP | 165 | |
| Exercises | 166 | |
| Chapter 3 | Games and Tools: Digital I/O | 169 |
| I/O by Command | 170 | |
| I/O with Registers | 172 | |
| An LED Counter | 173 | |
| Driving Larger Loads | 175 | |
| Driving Relays and Other Inductive Loads | 178 | |
| Switching a Relay | 178 | |
| Switching Power with PNP Transistors | 179 | |
| A PNP Driver | 180 | |
| Other Switches | 180 | |
| A Word About AC Loads | 181 | |
| Simulating Open Collector Outputs | 181 | |
| Working with Pulses | 182 | |
| Counting Pulses | 183 | |
| Reading Buttons | 185 | |
| Experimenting with Button | 186 | |
| Sharing I/O Pins | 187 | |
| Expanding I/O | 192 | |
| Polling | 194 | |
| LED Die | 198 | |
| Reaction Game | 200 | |
| Quiz Buttons | 204 | |
| Logic Probe | 205 | |
| Automated Cable Tester | 208 | |
| Under the Hood | 209 | |
| Summary | 210 | |
| Exercises | 210 | |
| Chapter 4 | A Digital Power Supply: Analog Output | 211 |
| Sound and Tone Generation | 212 | |
| Simple Speaker Circuits | 212 | |
| Experimenting with PWM Noise | 213 | |
| Amplifiers | 214 | |
| Connecting to the Phone Line | 214 | |
| An Example | 215 | |
| Generating Voltages Using PWM | 216 | |
| Trying PWM | 219 | |
| Other Uses for PWM | 220 | |
| Traditional D/A | 220 | |
| A Digital Power Supply | 222 | |
| Summary | 225 | |
| Exercises | 226 | |
| Chapter 5 | A Recording Voltmeter: Analog Input | 227 |
| Careful What You Ask For | 228 | |
| Reading Resistance or Capacitance | 228 | |
| A Capacitance Meter Project | 229 | |
| Using an ADC | 232 | |
| Averaging Readings | 234 | |
| A Homebrew ADC | 237 | |
| The Recording Voltmeter | 241 | |
| Voltage to Pulse Conversion | 242 | |
| The Simplest Analog Input | 243 | |
| Summary | 247 | |
| Exercises | 247 | |
| Chapter 6 | Stamp to Internet: Serial I/O | 249 |
| Definitions | 250 | |
| Simple Serial Protocols | 251 | |
| Interfacing with the PAK-I | 251 | |
| The 12C Bus | 261 | |
| 12C Basics | 262 | |
| Ending a Transmission | 263 | |
| Slow Slaves | 263 | |
| Arbitrating Multiple Masters | 264 | |
| 12C Plans | 264 | |
| Interfacing to an 12C EEPROM | 265 | |
| A BS2P Datalogger | 275 | |
| Asynchronous Communications | 280 | |
| RS232 Basics | 280 | |
| Open Collector Async | 283 | |
| A PC Frequency Counter | 284 | |
| More Power Supply | 294 | |
| Extending PC I/O | 295 | |
| Stamps on the Net | 306 | |
| Summary | 311 | |
| Exercises | 311 | |
| Chapter 7 | A Pong Game: LCDs and Keypads | 313 |
| Serial LCDs | 314 | |
| LCD Interfacing | 314 | |
| The BSIIP | 316 | |
| LCD Commands | 316 | |
| LCD Software | 317 | |
| Scanning a Keypad | 322 | |
| Analog Keypads | 324 | |
| Making the Most of Limited Keys | 325 | |
| Graphical LCDs | 325 | |
| Details | 326 | |
| Summary | 338 | |
| Exercises | 338 | |
| Chapter 8 | A Remote Control Robot: Motors | 339 |
| DC Motors | 340 | |
| Using PWM | 343 | |
| The H Bridge | 344 | |
| About Stepper Motors | 345 | |
| Servos | 348 | |
| Cannibalizing Motors | 359 | |
| Summary | 362 | |
| Exercises | 362 | |
| Chapter 9 | Morse Code Projects | 363 |
| Morse Code IDer | 364 | |
| Morse Code Keyer | 366 | |
| An Keyboard Keyer | 377 | |
| Reading Code | 387 | |
| Chapter 10 | The Next Step | 391 |
| Why Not Stamps? | 392 | |
| What You Will Need | 392 | |
| Software | 393 | |
| Other Software | 394 | |
| Assembler Survival Guide | 396 | |
| Hardware Shortcuts | 397 | |
| Getting Started | 402 | |
| The Real Thing | 406 | |
| Beyond PICs | 406 | |
| Stamps + PICs? | 407 | |
| A Sample PBP Program | 408 | |
| Summary | 409 | |
| Exercises | 409 | |
| Chapter 11 | On Your Own | 411 |
| The Parallax Mailing List | 411 | |
| Web Sites | 412 | |
| Appendix A | About the CD-ROM | 415 |
| About the Stamp I Simulator | 415 | |
| Appendix B | The APP-I PIC Programmer | 419 |
| What's Needed? | 419 | |
| Building IT | 420 | |
| Software | 420 | |
| Troubleshooting | 421 | |
| PICAWC84 Controls | 421 | |
| Using the COM Port as a Power Supply | 422 | |
| Appendix C | Making Cables | 423 |
| Stamp I | 423 | |
| Stamp II, IISX, IIE, and IIP | 424 | |
| Answer Key | 425 | |
| Chapter 1 Answers | 425 | |
| Chapter 2 Answers | 426 | |
| Chapter 3 Answers | 426 | |
| Chapter 4 Answers | 431 | |
| Chapter 5 Answers | 433 | |
| Chapter 6 Answers | 435 | |
| Chapter 7 Answers | 441 | |
| Chapter 8 Answers | 446 | |
| Chapter 9 (No exercises) | 448 | |
| Chapter 10 Answers | 448 | |
| Chapter 11 (No exercises) | 449 | |
| Index | 451 | |
| What's on the CD-ROM? | 464 |
To try again, please visit the B&N Marketplace.



