Parallax Propeller

Home Getting Started Tips Timing Pulse Generation 3rd Party Hardware Object Exchange 3rd Party or Forum Software Programming Examples FAQ

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
There's a good index here.
bullet

Object Exchange (Free software for Propeller)

bullet
Local Index
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

3rd Party Hardware

bullet

FAQ

bullet

Details

bullet

Manual (Bookmarked Local Copy) <--  You'll want this !!!!

bullet

Datasheet (ver. 1)  (local copy)

bullet

Propeller is a CMOS device running at 3.3 VDC. 

bulletExtra circuitry is 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 two boards available from Parallax, Demo and Proto:

bulletDemo board is ready to go with VGA, sound, keyboard, mouse, USB, and power connectors
bulletSchematic:    Photo: 
bulletOptional kit with keyboard, mouse, and display available

 

bulletProto board is more basic (but cheaper and more versitile):
bulletDocumentation  Schematic:   Photo: 
bulletOptional kit has the resistors and connectors you need for VGA, mouse and keyboard.

 

bullet

Parallax also offers the Hydra game development kit (so you can make your own 80's style arcade games)

bullet

Some new boards can be found in the user Forum

bullet

Franz Achatz sells this one:   

bullet
bullet

Programming

bullet

New! Prop Tool 1.1 just released (26Mar08)

bullet

Programming done via serial connection (normal or USB) with Parallax's "Propeller Tool" Windows program.  Latest version is 1.06 (get it here

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.
bulletParallax maintains an "Object Exchange" library of copyright free user contributed code objects.
bulletA great deal of code can be found by digging through the user forum.
bulletDebugging can be difficult.  Many people seem to be using a terminal window on the PC and the "FullDuplexSerial" object to send messages to the PC.