Page 115 - Build Your Own Quadcopter_ Power Up Your Designs with the Parallax Elev-8
P. 115

94     Bu il d  Y o ur  O w n  Q u a d c o p t e r


                                I would like to point out that the above code is so efficient that it can replace the need to
                             use assembly language code, which is ordinarily used to achieve the performance necessary
                             for this application. However, do not be dismayed. I will discuss assembly language in
                             Chapter 5, since it supports the demonstration program used to control an Elev-8 test motor.


                        Summary

                             The chapter began with an introduction to the Parallax Propeller chip’s unique architecture.
                             The cores or cogs were shown to be highly flexible computing elements capable of performing
                             parallel tasks to efficiently execute application instructions. I also discussed the hub that
                             coordinates cog activity and the highly flexible clock circuits that support the Prop chip.
                                The Propeller Spin Tool (PST) discussion included a demonstration of how easy it was to
                             create, load, and execute programs using the PST and a Prop development board.
                             I showed you the Propeller Board of Education (BOE) that I used for software development.
                             It includes a USB-to-serial interface chip that makes connecting the BOE to a PC running the
                             PST, an effortless task.
                                I next went through a series of LED blinker programs that demonstrated basic Spin
                             programming as well as some basic object-oriented (OO) techniques. The PST makes it very
                             easy to get started with Spin programming. Of course, continued study and practice is the
                             only way to develop solid software development skills.
                                One of the LED blinker programs was next transferred to a Parallax QuickStart
                             development board. I did this to show that transferring a Spin program developed on the
                             BOE to another Parallax development board raised no issues whatsoever.
                                Next came a clock-timing discussion in which I went through the various system clock
                             modes and explained the pros and cons for each one. I recommended that the external
                             crystal-controlled oscillator be used for your application program development. This clock
                             mode is accurate, fast, and readily available on most of the Parallax Prop development
                             boards.
                                I next showed you how to use actual time values in lieu of clock cycles when creating
                             your programs. Using time values expressed in milliseconds is far superior to using clock
                             cycles. This technique makes time values used in your program independent of the actual
                             running system clock.
                                A comprehensive pulse-width modulation (PWM) discussion followed the clock tutorial.
                             This PWM introduction lays the foundation for a proper understanding of the technology
                             integral to servo operation. Servo technology is used extensively in radio-controlled flight
                             systems as well as for the Elev-8 flight system. I used several programs to demonstrate how
                             basic servo-control algorithms function.
                                The chapter concluded with an introduction to the cog special purpose registers (SPR).
                             These registers are the key to creating efficient and very fast application programs.
                                The next chapter examines some of the Elev-8 critical components, including motors,
                             ESCs, and propellers (the ones that whirl, not the chip kind).
   110   111   112   113   114   115   116   117   118   119   120