Skip to:Content
|
Bottom
Cover image for Programming the Propeller with Spin : a beginner's guide to parallel processing
Title:
Programming the Propeller with Spin : a beginner's guide to parallel processing
Personal Author:
Series:
Tab electronics
Publication Information:
New York : McGraw-Hill, 2010
Physical Description:
xvi, 352 pages : illustrations ; 24 cm.
ISBN:
9780071716666

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000010339319 TJ223.P76 S25 2010 Open Access Book Gift Book
Searching...
Searching...
33000000014859 TJ223.P76 S25 2010 Open Access Book Gift Book
Searching...

On Order

Summary

Summary

Publisher's Note: Products purchased from Third Party sellers are not guaranteed by the publisher for quality, authenticity, or access to any online entitlements included with the product.
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


Author Notes

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

Prefacep. xiii
Part I The Propeller/Spin Systemp. 1
Introduction for the Beginnerp. 1
Chapter 1 A General Introduction to the Propeller Chipp. 3
The Propeller Manualp. 3
Parallax, Inc.p. 5
Overall System Descriptionp. 5
The Propeller Toolp. 7
Instruments Needed to Support Your Experimentsp. 8
Chapter 2 The Propeller Chip: An Overall Descriptionp. 9
Basic Propeller Specificationsp. 10
Voltage and Amperage Requirementsp. 10
The Operation of the Eight Cogsp. 10
The Cogsp. 11
The Hubp. 12
Forty Pins Total, 32 Pins I/Op. 12
Connecting to the Propellerp. 13
The System Counterp. 14
Program Storage and Executionp. 14
Objects, Methods, and Other Definitionsp. 15
Chapter 3 The Hardware Setupp. 19
Setting Up the Hardwarep. 21
A Fundamental Reality We Have to Considerp. 23
Chapter 4 Software Setup: The "Propeller Tool" Environmentp. 25
Classroom Analogyp. 27
Getting Ready to Use the Propellerp. 28
Installing the Softwarep. 28
Our First Programp. 29
The Typical Spin Programp. 32
Program Structurep. 34
General Pin Assignments Used in the Bookp. 36
Propeller FAQ*p. 38
Chapter 5 The Various Propeller Memoriesp. 43
Assigning Memory for a New Cogp. 45
A New Cog Can Be Started to Run a Private or Public Methodp. 45
Chapter 6 The How and Why of Shared Memoryp. 47
Memory Usagep. 48
Variable Validityp. 49
Loopsp. 50
Chapter 7 Understanding One Cogp. 51
Static Versus Dynamicp. 53
One Cogp. 55
Countersp. 58
Counter: General Descriptionp. 59
Assignment of the 32 Bits in Each of the Countersp. 59
Using Counter A for PWM Generationp. 60
Chapter 8 The Eight Cogsp. 65
The Cogsp. 65
The Flagsp. 66
Special Memory Locationsp. 66
The System Clockp. 66
Programmingp. 67
The ROMp. 67
Chapter 9 Special Terms and Ideasp. 69
The Hardwarep. 69
The Softwarep. 70
New Hardware-Related Definitionsp. 70
New Software-Related Definitionsp. 71
Chapter 10 The Spin Languagep. 75
CONp. 77
VARp. 77
OBJp. 78
PUB or PRIp. 78
Creating a Program with Two Cogsp. 83
Chapter 11 Tasks Suited to Parallel Processingp. 85
Parallel Programming Examplesp. 85
Summaryp. 87
Part II Input and Output: The Basic Techniques to Be Mastered-Learning by Doingp. 89
Chapter 12 General Discussion of Input/Outputp. 91
Chapter 13 Binary Pulsingp. 95
Chapter 14 Setting Up a 16-Character-by-2-Line Liquid Crystal Displayp. 101
Chapter 15 Binary Input and Output: Reading a Switch and Turning on an LED if the Switch Is Closedp. 109
Discussionp. 111
The Repeat Commandp. 112
Chapter 16 Reading a Potentiometer: Creating an Input We Can Vary in Real Timep. 113
Analog Inputsp. 114
Advanced Techniquesp. 118
Chapter 17 Creating and Reading Frequenciesp. 129
Creating Audible Frequenciesp. 130
Reading Frequenciesp. 135
Chapter 18 Reading and Creating Pulsesp. 139
Reading Pulse Widthsp. 139
Determining the Pulse Widthp. 140
Pulse Width Creationp. 146
Part III The Projects: Using What Was Learned to Build The Projectsp. 149
Chapter 19 Seven-Segment Displays: Displaying Numbers with Seven-Segment LED Displaysp. 151
Chapter 20 The Metronomesp. 159
Chapter 21 Understanding a 16-Character-by-2-Line LCD Displayp. 163
8-Bit Modep. 164
Sophisticated Total LCD Controlp. 171
4-Bit Modep. 182
Chapter 22 Running Motors: A Preliminary Discussionp. 189
R/C Hobby Servomotorsp. 190
Stepper Motors (Bipolar)p. 190
Small Brush-Type DC Motorsp. 191
DC Motors with Attached Encodersp. 191
Relays and Solenoidsp. 191
Small A/C Motors at 120 Volts, Single Phasep. 192
Understanding the Concept of the "Response Characteristics" of a Motorp. 192
So What Does "Compliance" Mean?p. 192
DC Motor Operation Notesp. 193
Chapter 23 Motor Amplifiers for Small Motorsp. 195
Amplifier Construction Notes (for Homemade Amplifiers)p. 197
Detailed "Use Information" for the Xavien Two-Axis Amplifierp. 198
Detailed "Use Information" for the Solarbotics Two-Axis Amplifierp. 199
Chapter 24 Controlling R/C Hobby Servosp. 203
Servo Controlp. 204
Chapter 25 Controlling a Small DC Motorp. 211
The Softwarep. 214
Chapter 26 Running a Stepper Motor: Bipolar, Four-Wire Motorsp. 225
Stepper Motor Power and Speedp. 226
Details on Bipolar Motorsp. 226
Running the Motorp. 227
Programming Considerationsp. 229
The Softwarep. 231
Chapter 27 Gravity Sensor Based Auto-Leveling Tablep. 247
Sensor Specificationsp. 248
Discussionp. 248
Chapter 28 Running DC Motors with Attached Incremental Encodersp. 257
Not about Motorsp. 258
Discussionp. 258
DC Servo Motors with Encodersp. 261
Processor Connectionsp. 262
The Goalp. 262
PID Control in Greater Detailp. 263
Holding the Motor Positionp. 265
Rampingp. 294
R/C Signal Usep. 305
Some Advanced Considerations You Should Be Aware Ofp. 312
Chapter 29 Running Small AC Motors: Controlling Inductive Loadsp. 313
Part IV Appendixesp. 315
Appendix A LCDRoutines4 and Utilities Object Listingsp. 317
Appendix B Materialsp. 327
Appendix C Turning Cogs On and Offp. 329
Appendix D Experiments Boardp. 331
Appendix E Debuggingp. 335
Debugging and Troubleshootingp. 335
Dumb Terminal Programp. 337
Signal injection Techniquesp. 337
Notes on Solderless Breadboardsp. 338
Debugging at the More Practical Levelp. 339
Writing a Rudimentary Program for Testing the LCDp. 340
Another List of Simple Checksp. 341
Epiloguep. 343
Indexp. 345
Go to:Top of Page