Tuesday, March 31, 2009

Parallax Propeller

I thought I'd share some comments about a microcontroller, the Parallax Propeller.

First off, the essential web pages:



The Propeller is an eight core microcontroller that runs a custom language (called Spin) or assembly. It's main design feature is the replacement of interupts by multiple cores. This allows developers to create code that eaiser to debug and faster to implement, while mainting a solid timing scheme. 

In addition to the multiple cores (called 'cogs'), the most noticable trait of the Propeller is it's lack of hardware support for common tasks. These are meant to be (and are) programs that the developer can pick and choose from to suit his needs. For example, serial I/O (a very common operation) is implemented in several different 'objects' that create a very tight fit to the developers needs. Similar applications abound for such tasks as TV output, sensor input, and motor control. 

I like the Propeller for it's clean code structure (via Spin) and the ease at which multiple, simultaneous tasks can be performed. Here's some code I wrote for making series of 1 second duration 56kHz pulses:

CON
    _clkmode = xtal1 + pll16x
    _xinfreq = 5_000_000
                     
OBJ
    BS2 : "BS2_Functions"    ' Create BS2 Object

PUB Start 
    BS2.start (31,30)        ' Initialize BS2 Object timing, Rx and Tx pins for DEBUG

    waitcnt(clkfreq/100 + cnt)
    
    repeat
      BS2.FREQOUT(23, 1000, 56000)
      waitcnt(clkfreq + cnt)

Note the use of objects (for functions such as transmitting) and the clean code. 

Of course, the Propeller isn't perfect. First, it's high price ($8 as of April 1) prevents it's widespread use in commercial embedded systems, escpecially when compared to the PICs or AVRs. Secondly, it's very different architecture is a far cry from the interrupts used by most in the industry. 

None the less, the Parallax Propeller, with it's multiple cores, certainly makes development much easier for those who don't want to read through a 200 page PIC datasheet.

Cheers

Design Competition

I got an email recently from Digi (a wireless company) announcing their design competition. 





What caught my eye was that students get a 50% discount on the products that you use to enter the competition. There are some nice components there, most notably the xBee modules and interfaces from the Zigbee network to the internet. I thought a combination of http://www.digi.com/products/wirelessdropinnetworking/idigi-kits/x4-zb.jsp and http://www.digi.com/products/wirelessdropinnetworking/idigi-kits/bl4s100-addon-zb.jsp would be interesting. The second product has a module that apparently interfaces with a web browser (is it a server?) which allows you to remotely monitor and modify I/Os, and to also interface with Xbees. My only concerns though are that the module does act as a server (and hence would be difficult to use in the dorm) and that it requires poorly documented programming languages.

What can you do with something like this? The classic answer is probably a home security system. Monitor where Fido is at all times, keep track of the doors, warm up the house before you get home, etc. Another idea is to make a remote control car. By remote control I mean control an object in Japan from Rivereside. With the web browser capbility we're no longer limited to short range wireless ( <>

Cheers

Blog Format Questions to Team Members

Some questions that collaboration might help on:

What should the domain name be? I tried Orange, Team Orange and Orange Team: all taken. Currently, it is OrangeSC, but I can change that.

Can you guys edit the blog as a whole? (colors, fonts, layout, etc.) Let me know.

Anything else that you would like to see to personalize the blog? I used a standard template and changed a few things (along with a picture of Swiftsure the robot), but other than that I don't have a clue.