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

Overview

Parallel Processing With the Propeller—Made Easy!

"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 ...

See more details below
Other sellers (Paperback)
  • All (11) from $14.82   
  • New (8) from $21.25   
  • Used (3) from $14.82   
Programming the Propeller with Spin: A Beginner's Guide to Parallel Processing

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK
  • NOOK HD/HD+ Tablet
  • NOOK
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$33.00
BN.com price

Overview

Parallel Processing With the Propeller—Made Easy!

"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

Read More Show Less

Product Details

  • ISBN-13: 9780071716666
  • Publisher: McGraw-Hill Professional Publishing
  • Publication date: 5/28/2010
  • Edition number: 1
  • Pages: 368
  • Sales rank: 1,423,435
  • Product dimensions: 7.30 (w) x 9.10 (h) x 0.80 (d)

Meet 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.

Read More Show Less

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

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)