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

chapter 4






                                                              Programming the


                                                             Parallax Propeller



                                                                                           Chip






                        Introduction

                             The Parallax Propeller chip that was introduced in Chapter 1 will be discussed in this chapter
                             from hardware and software perspectives. I will also refer to the chip as the Prop from now
                             on for brevity’s sake.
                                The Prop was developed by Parallax engineers solely for an extended project that started
                             in the late 1990s and ran to its market introduction in 2006. It is still the only available
                             multicore processor designed specifically for the technical/hobbyist market. Intel and AMD
                             multicore processors are distinctly different technologies designed for PC and server
                             applications. The Prop also has a much lower clock speed than Intel processors, which is not
                             an issue because it serves a very different purpose than the Intel/AMD multicores do. Props
                             are also very inexpensive, typically less than $10 USD, making them ideal for experimentation
                             and prototyping. First, I will describe the Prop’s unique architecture before going on to cover
                             the software and programming details.

                        Prop Architecture

                             In Figure 4.1 is the Prop P8X32X block diagram showing the eight separate cores along with
                             other key elements.
                                One of the first things that you might have noticed is that the cores are called cogs in the
                             Prop diagram. Each cog is an independent processing element with its own 2-kB memory.
                             The  Prop  also  has  32-bit  data  and  address  busses,  which  means the  “word” size is also
                             32 bits. There are 32 general-purpose input/output (GPIO) pins that each cog can access. These
                             are shared GPIO pins; however, some or all may be dedicated to a specific cog or group of
                             cogs if you want. A GPIO pin so dedicated is also referred to as being mutually exclusive
                             indicating that the pin is being controlled by a designated cog.
                                All the cogs communicate with a hub that contains a common or shared 64-kB memory
                             that is divided as 32 kB of RAM and 32 kB of ROM. The hub also contains configuration,
                             power management, reset, and clock circuits.
                                The clock circuits are quite flexible and may use either an internal resistor-capacitor (RC)
                             oscillator or a crystal-controlled oscillator, which in turn requires an external crystal. Most
                             Prop boards that I have used operate with a crystal oscillator because it provides higher


                                                                                                   69
   85   86   87   88   89   90   91   92   93   94   95