Tuesday, May 26, 2009

Biotrophic Parasitic Computing and sensor nets

Biotrophic Parasitic Computing is still fascinating to me. The parasite needs to be efficient and highly adaptable. Now, in addition, I think the parasite should be able to communicate with others (or a hive host).  Low power sensor net technology comes into play.
The smallest parasite will be the EZ430-T2012. It's tiny and cheap. It will need to be programmed in C (I'm avoiding assembly).Given that most new RF modules (like TI Chipcons and Zigbees) don't require much from outside microcontrollers, I could probablyget away with using a small parasite.
The next step up is the EZ430-RF2500T. It is more expensive (it includes an RF module). It can be programmed in Forth (SwiftX).
Each has its own particular appeal. I want to get back into Forth programming (I can't do this on the T2012 -- not enough RAM),but the T2012 is cheap ($3 a board) and hence has a certain ubiquity.  If I go with C, I can code both using Protothreads as my primary means of abstraction.
The advantage to using Forth on the RF2500T is that it will force me to understand the CC2500 RF module. I can't rely on a C library. I get the same advantage using C on the T2012 since it doesn't have enough space for a C library (like Simpliciti).

Eventually I'll roll my own board.

Forth and Microcontrollers

My second computer programming language was Forth. My first was BASIC.  I picked up Forth sometime around 1984. I used it first on Commodore 64 and then on a DEC2060 to do some graphic hacks for a Tektronix terminal (am I showing my age now?).  I remember tightly constrained resources. Despite spending a lot of time on a timesharing system (DEC20) I spent my youth trying to get every ounce of performance out of the likes of Commodore 64s and Atari STs.

By 1989 I  had moved on. I became a UNIX junkie. C became my "base" language and I had adopted TCL as my "scripting" language by 1995.  Over the years I've dipped my toe in many other languages including Perl, Python, Lisp, Smalltalk, Logo, Awk, Java, Lua, C++, Standard ML, etc.  By 2004 my main languages were TCL, C and (sometimes) Awk.  That is, whenever I could get away with using them.

So, now I am at full circle of sorts.  I work with 8/16 bit microcontrollers (tightly constrained resources!) and my primary language is C.

Over the years I kept abreast of what Forth was up to. Chuck Moore is something of a hero of mine. Of course, in the past 20 years I've dabbled in creating my own Forths (mostly in C). 

It was only recently that I've actually came back to actually using Forth to write applications/systems.

Forth is not dead, IMHO.  However,  while I don't think that it will make any resurgence, it does make me wonder why the Microcontroller world is still stuck using C.