Programming the Propeller with Spin: A Beginner's Guide to Parallel Processing
"This book should find a place on any Propellerhead's bookshelf, between Parallax's Propeller Manual and its Programming and Customizing the Multicore Propeller volumes." Make: 24

Programming the Propeller with Spin: A Beginner's Guide to Parallel Processing walks you through the essential skills you need to build and control devices using the Propeller chip and its parallel processing environment. Find out how to use each of the identical 32-bit processors, known as cogs, and make the eight cogs effectively interact with each other. The book covers Propeller hardware and software setup, memory, and the Spin language. Step-by-step projects give you hands-on experience as you learn how to:

  • Use Propeller I/O techniques with extensive Spin code examples
  • Display numbers with seven segment displays
  • Create accurate, controlled pulse sequences
  • Add a 16 character by two line LCO display
  • Control R/C hobby servos
  • Use motor amplifiers to control small motors
  • Run a bipolar stepper motor
  • Build a gravity sensor-based auto-leveling table
  • Run DC motors with incremental encoders
  • Run small AC motors

You'll also find hundreds of lines of ready-to-run documented Spin code as well as PDFs of all the schematics on McGraw-Hill's website: Downloads available at www.mhprofessional.com/computingdownload

"This book should find a place on any Propellerhead's bookshelf, between Parallax's Propeller Manual and its Programming and Customizing the Multicore Propeller volumes." Make: 24

"1103373480"
Programming the Propeller with Spin: A Beginner's Guide to Parallel Processing
"This book should find a place on any Propellerhead's bookshelf, between Parallax's Propeller Manual and its Programming and Customizing the Multicore Propeller volumes." Make: 24

Programming the Propeller with Spin: A Beginner's Guide to Parallel Processing walks you through the essential skills you need to build and control devices using the Propeller chip and its parallel processing environment. Find out how to use each of the identical 32-bit processors, known as cogs, and make the eight cogs effectively interact with each other. The book covers Propeller hardware and software setup, memory, and the Spin language. Step-by-step projects give you hands-on experience as you learn how to:

  • Use Propeller I/O techniques with extensive Spin code examples
  • Display numbers with seven segment displays
  • Create accurate, controlled pulse sequences
  • Add a 16 character by two line LCO display
  • Control R/C hobby servos
  • Use motor amplifiers to control small motors
  • Run a bipolar stepper motor
  • Build a gravity sensor-based auto-leveling table
  • Run DC motors with incremental encoders
  • Run small AC motors

You'll also find hundreds of lines of ready-to-run documented Spin code as well as PDFs of all the schematics on McGraw-Hill's website: Downloads available at www.mhprofessional.com/computingdownload

"This book should find a place on any Propellerhead's bookshelf, between Parallax's Propeller Manual and its Programming and Customizing the Multicore Propeller volumes." Make: 24

43.0 In Stock
Programming the Propeller with Spin: A Beginner's Guide to Parallel Processing

Programming the Propeller with Spin: A Beginner's Guide to Parallel Processing

by Harprit Singh Sandhu
Programming the Propeller with Spin: A Beginner's Guide to Parallel Processing

Programming the Propeller with Spin: A Beginner's Guide to Parallel Processing

by Harprit Singh Sandhu

Paperback

$43.00 
  • SHIP THIS ITEM
    Qualifies for Free Shipping
  • PICK UP IN STORE
    Check Availability at Nearby Stores

Related collections and offers


Overview

"This book should find a place on any Propellerhead's bookshelf, between Parallax's Propeller Manual and its Programming and Customizing the Multicore Propeller volumes." Make: 24

Programming the Propeller with Spin: A Beginner's Guide to Parallel Processing walks you through the essential skills you need to build and control devices using the Propeller chip and its parallel processing environment. Find out how to use each of the identical 32-bit processors, known as cogs, and make the eight cogs effectively interact with each other. The book covers Propeller hardware and software setup, memory, and the Spin language. Step-by-step projects give you hands-on experience as you learn how to:

  • Use Propeller I/O techniques with extensive Spin code examples
  • Display numbers with seven segment displays
  • Create accurate, controlled pulse sequences
  • Add a 16 character by two line LCO display
  • Control R/C hobby servos
  • Use motor amplifiers to control small motors
  • Run a bipolar stepper motor
  • Build a gravity sensor-based auto-leveling table
  • Run DC motors with incremental encoders
  • Run small AC motors

You'll also find hundreds of lines of ready-to-run documented Spin code as well as PDFs of all the schematics on McGraw-Hill's website: Downloads available at www.mhprofessional.com/computingdownload

"This book should find a place on any Propellerhead's bookshelf, between Parallax's Propeller Manual and its Programming and Customizing the Multicore Propeller volumes." Make: 24


Product Details

ISBN-13: 9780071716666
Publisher: McGraw Hill LLC
Publication date: 05/28/2010
Series: Tab Electronics
Pages: 368
Product dimensions: 7.30(w) x 9.10(h) x 0.80(d)

About the Author

Harprit Singh Sandhu, BSME, MSCerE, is the founder of Rhino Robots, Inc., a major manufacturer of both robots and computer numeric-controlled machines. He is the author of Making PIC Microcontroller Instruments and Controllers and Running Small Motors with PIC Microcontrollers.

Table of Contents

Preface xiii

Part I The Propeller/Spin System 1

Introduction for the Beginner 1

Chapter 1 A General Introduction to the Propeller Chip 3

The Propeller Manual 3

Parallax, Inc. 5

Overall System Description 5

The Propeller Tool 7

Instruments Needed to Support Your Experiments 8

Chapter 2 The Propeller Chip: An Overall Description 9

Basic Propeller Specifications 10

Voltage and Amperage Requirements 10

The Operation of the Eight Cogs 10

The Cogs 11

The Hub 12

Forty Pins Total, 32 Pins I/O 12

Connecting to the Propeller 13

The System Counter 14

Program Storage and Execution 14

Objects, Methods, and Other Definitions 15

Chapter 3 The Hardware Setup 19

Setting Up the Hardware 21

A Fundamental Reality We Have to Consider 23

Chapter 4 Software Setup: The "Propeller Tool" Environment 25

Classroom Analogy 27

Getting Ready to Use the Propeller 28

Installing the Software 28

Our First Program 29

The Typical Spin Program 32

Program Structure 34

General Pin Assignments Used in the Book 36

Propeller FAQ* 38

Chapter 5 The Various Propeller Memories 43

Assigning Memory for a New Cog 45

A New Cog Can Be Started to Run a Private or Public Method 45

Chapter 6 The How and Why of Shared Memory 47

Memory Usage 48

Variable Validity 49

Loops 50

Chapter 7 Understanding One Cog 51

Static Versus Dynamic 53

One Cog 55

Counters 58

Counter: General Description 59

Assignment of the 32 Bits in Each of the Counters 59

Using Counter A for PWM Generation 60

Chapter 8 The Eight Cogs 65

The Cogs 65

The Flags 66

Special Memory Locations 66

The System Clock 66

Programming 67

The ROM 67

Chapter 9 Special Terms and Ideas 69

The Hardware 69

The Software 70

New Hardware-Related Definitions 70

New Software-Related Definitions 71

Chapter 10 The Spin Language 75

CON 77

VAR 77

OBJ 78

PUB or PRI 78

Creating a Program with Two Cogs 83

Chapter 11 Tasks Suited to Parallel Processing 85

Parallel Programming Examples 85

Summary 87

Part II Input and Output: The Basic Techniques to Be Mastered-Learning by Doing 89

Chapter 12 General Discussion of Input/Output 91

Chapter 13 Binary Pulsing 95

Chapter 14 Setting Up a 16-Character-by-2-Line Liquid Crystal Display 101

Chapter 15 Binary Input and Output: Reading a Switch and Turning on an LED if the Switch Is Closed 109

Discussion 111

The Repeat Command 112

Chapter 16 Reading a Potentiometer: Creating an Input We Can Vary in Real Time 113

Analog Inputs 114

Advanced Techniques 118

Chapter 17 Creating and Reading Frequencies 129

Creating Audible Frequencies 130

Reading Frequencies 135

Chapter 18 Reading and Creating Pulses 139

Reading Pulse Widths 139

Determining the Pulse Width 140

Pulse Width Creation 146

Part III The Projects: Using What Was Learned to Build The Projects 149

Chapter 19 Seven-Segment Displays: Displaying Numbers with Seven-Segment LED Displays 151

Chapter 20 The Metronomes 159

Chapter 21 Understanding a 16-Character-by-2-Line LCD Display 163

8-Bit Mode 164

Sophisticated Total LCD Control 171

4-Bit Mode 182

Chapter 22 Running Motors: A Preliminary Discussion 189

R/C Hobby Servomotors 190

Stepper Motors (Bipolar) 190

Small Brush-Type DC Motors 191

DC Motors with Attached Encoders 191

Relays and Solenoids 191

Small A/C Motors at 120 Volts, Single Phase 192

Understanding the Concept of the "Response Characteristics" of a Motor 192

So What Does "Compliance" Mean? 192

DC Motor Operation Notes 193

Chapter 23 Motor Amplifiers for Small Motors 195

Amplifier Construction Notes (for Homemade Amplifiers) 197

Detailed "Use Information" for the Xavien Two-Axis Amplifier 198

Detailed "Use Information" for the Solarbotics Two-Axis Amplifier 199

Chapter 24 Controlling R/C Hobby Servos 203

Servo Control 204

Chapter 25 Controlling a Small DC Motor 211

The Software 214

Chapter 26 Running a Stepper Motor: Bipolar, Four-Wire Motors 225

Stepper Motor Power and Speed 226

Details on Bipolar Motors 226

Running the Motor 227

Programming Considerations 229

The Software 231

Chapter 27 Gravity Sensor Based Auto-Leveling Table 247

Sensor Specifications 248

Discussion 248

Chapter 28 Running DC Motors with Attached Incremental Encoders 257

Not about Motors 258

Discussion 258

DC Servo Motors with Encoders 261

Processor Connections 262

The Goal 262

PID Control in Greater Detail 263

Holding the Motor Position 265

Ramping 294

R/C Signal Use 305

Some Advanced Considerations You Should Be Aware Of 312

Chapter 29 Running Small AC Motors: Controlling Inductive Loads 313

Part IV Appendixes 315

Appendix A LCDRoutines4 and Utilities Object Listings 317

Appendix B Materials 327

Appendix C Turning Cogs On and Off 329

Appendix D Experiments Board 331

Appendix E Debugging 335

Debugging and Troubleshooting 335

Dumb Terminal Program 337

Signal injection Techniques 337

Notes on Solderless Breadboards 338

Debugging at the More Practical Level 339

Writing a Rudimentary Program for Testing the LCD 340

Another List of Simple Checks 341

Epilogue 343

Index 345

From the B&N Reads Blog

Customer Reviews