Parallax Propeller

Home Custom PCB Boards Getting Started Tips Timing Pulse Generation Object Exchange FAQ Programming Examples

Info  Details  Boot Sequence  Boards  Programming Tools

bullet

Info

bullet

Parallax's Propeller Home Page

bullet

Getting Started Tips

bullet

User Forum 

bullet
Most interesting software and hardware info is to be found here (and maybe later posted to Object Exchange)! 
bullet

Object Exchange (Free software for Propeller)

bullet

My Programming Projects

bullet

The Propeller is exciting because one can easily:

bullet

Drive a VGA monitor (or NTSC/PAL video monitor) to display text utilizing built-in font or graphics.

bullet

Generate complex sounds, even human speech.

bullet

Take user input from standard computer keyboard and mouse.

bullet

Control I/O ports with 50-ns (20 MHz) precision (12.5 ns possible using internal counters).

bullet

Utilize multiple internal CPUs to control multiple, independent processes.

bullet

Interface via RS232, I2C, SPI

bullet

Interface with keyboard, mouse, ADCs 

bullet

Timing Pulse Generation (This is my initial interest regarding Propeller)

bullet

FAQ

bullet

Details

bullet

Manual

bullet

Datasheet (ver. 1.1)  (now includes speed ratings vs. temperature).

bullet

Propeller is a CMOS device running at 3.3 VDC. 

bulletExtra circuitry is sometimes required to interface to 5-V logic.
bulletCPU can draw a maximum of 300 mA, dissipating only 1 W

 

bullet

Block Diagram: 

bullet

The Propeller is a microcontroller comprising 8 independent 32-bit processors, called "cogs"

bullet

Each cog can run at up to 80 MHz.

bulletAll cogs share the same clock.
bulletAn internal PLL allows easy operation at 80 MHz using an external 5-MHz crystal.
bulletOther, lower speed, outputs of the PLL are also selectable.
bulletThere are also internal RC oscillators at 20 kHz and 12 MHz.
bulletThe user's program decides what clock source to use, can be set either upon program load or programmatically while running.  
bulletNearly all cog CPU instructions require 4 clock cycles, giving 20-MIPS operation (per cog) at 80 MHz
bulletOnly instructions involving the hub take more clock cycles.  The exact number of cycles is variable, depending on hub rotational position.

 

bullet

Each cog has 2 kB of full speed RAM (arranged as 512 longs)

bullet

Since all CPU operations work with 32-bit longs (rather than 8-bit bytes) and addresses are all words (16 bits), so it is often better to think in terms of words or longs rather than bytes for the Propeller.

bulletCogs also have access to the much larger Hub memory (see below)

 

bullet

Each cog has a hardware video generator and two special counters (CTRA and CTRB)

bulletBoth counters have 3 special registers (CTR, FRQ, PHS)
bulletThe basic function of the counter is to add the quantity in the FRQ register into the PHS register.  When and how this is done is determined by the setting of the CTR register.
bulletCounters can operate independently from cog CPU with clock rates (controlled by CTR, FRQ registers) from 500 kHz to 128 MHz.  This done via a PLL and VCO controlled by bit PHS[31].
bulletCTRA is used by the video generator, when the video generator is utilized.

 

bullet

A "Hub" controls the cogs

bullet

Hub has 32-kB RAM and 32-kB ROM 

bullet

Hub controls and all cogs have access to a system counter that increments at the clock frequency

bullet

Cogs interface hub memory with 16-bit address bus and 32-bit data bus.

bullet

Hub maintains "Locks", a special 8-bit register accessed by special instructions.

bullet

Programs that wish to use multiple cogs that may interfere with each other by attempt to access the same resources simultaneously, may wish to use these locks to ensure that only one cog has access at any given time.

bullet

All cogs share the same 32 I/O Pins, P0-P31 and 32 direction bits

bullet

Each cog has a 32 bit I/O output register and a 32-bit I/O direction register.  All 32 I/O outputs are OR'd together and all 32 I/O direction registers are OR'd together to determine actual settings.

bulletThis seems to be a unique feature of the Propeller.
bulletIf any cog's output is set to "1", the corresponding actual output will be a "1"
bulletThe actual output of a pin is "0" only if all corresponding cog outputs are "0"
bulletIf any cog's pin direction is "1", the corresponding actual pin direction with be "output"
bulletA pin's direction is "input" only if all corresponding cog directions are "0"

 

bullet

 I/O pins P0-P27 are general purpose, but pins P28-P31 are special

bulletPins P28-P29 are quasi-optional I2C connection (SCL, SDA) to external EEPROM
bulletPins P30-P31 are optional serial connection (TX, RX) to a controlling computer

 

bullet

Boot Sequence

  1. Power or reset applied

  2. After 50 ms, clock switches from 20 kHz RC to 12 MHz RC

  3. Cog 0 loads and runs "Boot Loader" from hub ROM

  4. Boot Loader checks for computer listening on serial port of I/O pins P30 and P31. 

    bullet
    If found, computer can either transfer a program to hub RAM and optionally to external EEPROM.  If successful, jumps to step 7, otherwise continues to step 5.
    bullet
    Computer can also instruct Propeller to suspend operation. 
  5. Boot Loader checks for response from EEPROM with I/O pins P28 and P29.

    bullet
    If found, 32 kB is transferred from EEPROM to hub RAM.  If successful, jumps to step 7.
  6. When no computer host found and no EEPROM found, cog 0 is stopped, all I/O pins set to input mode, and Propeller goes into shutdown mode.

  7. After successfully loading a program into hub RAM (and not instructed by computer to suspend):

    1. Cog 0 loads and runs the "Spin Interpreter" code from hub ROM
    2. Spin Interpreter executes code in hub RAM 
 

 

bullet

Boards & Kits

bullet

There are several boards available from Parallax including Quickstart, Demo and Proto:

bullet

Quickstart is a very low cost board with built in USB, 8 LEDs and 8 buttons:

bullet

Demo board is ready to go with VGA, sound, keyboard, mouse, USB, and power connectors

bulletSchematic:    Photo: 
bulletOptional kit with keyboard, mouse, and display available

 

bullet

Proto board is more basic (but cheaper and more versitile):

bulletDocumentation  Schematic:   Photo: 
bulletA USB version is now available.
bulletOptional kit has the resistors and connectors you need for VGA, mouse and keyboard.

 

bullet

The Propeller Platform is a great board for adding more advanced "shields" to.

bullet

Programming

bullet

Get the latest Prop Tool here 

bullet

Programming done via serial connection (normal or USB) with Parallax's "Propeller Tool" Windows program. 

bulletA program can consist of high-level "Spin" language code "objects" and low-level assembly code.
bulletAssembly code is optional, but some Spin code is required in all apps.
bulletThe Propeller Tool comes with many examples.
bulletOne key point is that you must select a "top" Spin object in the software, which defines the main procedure that runs first. 
bulletThen, you can either "Run->Compile Top->Load RAM" or "->Load EEPROM".  If you load RAM the program runs, but is erased by power loss or reset.  If you load EEPROM the program is retained even after power loss and restarts after reset or restoration of power.

 

bullet

Parallax maintains an "Object Exchange" library of copyright free user contributed code objects.

bullet

A great deal of code can be found by digging through the user forum.

bullet

Debugging can be a bit difficult.  One easy way to do debugging is to use a terminal window on the PC and the "FullDuplexSerial" object to send messages to the PC at places of interest in your code.  The Prop Tool now comes with "Parallax Serial Terminal" which can be used for this purpose.  There is also a "pst" object that can be used instead of fullduplexserial.

bullet

New!  PropGCC and Catalina are two ways to program the Propeller in C.  This wasn't so nice in the past because the although it was faster than Spin, the code size was much larger.  But now, both PropGCC and Catalina have CMM (compact memory model) working with code about the same size as Spin.  There  is also a Spin2Cpp tool that can be used to automatically convert Spin code into C or C++.