MicroSeeker PIC/Smalltalk

PIC/Smalltalk allows me to write code for the PIC microcontroller in Smalltalk (or at least something that looks like Smalltalk), and then translate it to assembler.

Why bother? Well, the real project I'm working on is to build a fairly complex autonomous underwater vehicle (AUV), called Micro Seeker. This sub will use PIC microcontrollers for brains, and the language used to program a PIC is pretty annoying to use, given that I've been using Smalltalk for over twelve years now. I've kind of gotten used to Smalltalk...

So, I decided to see if I could do something similar to what Squeak does for its VM, and write code in a Smalltalk-like syntax that is translated into assembler source code, and then assembled and run on the end platform. I decided to code the translator in Visual Smalltalk, since it was my favourite Smalltalk. I've since ported it to Dolphin 2.1, and will be porting to Squeak at some point.

Here's an example of the kind of Smalltalk code I can write in this system, and what it ends up looking like.

The amazing thing is, it works! I can translate code that actually uses the hardware features of the PIC, and have it do interesting stuff...

The list of things I have made PIC/Smalltalk do so far:

  • Send output to a serial LCD panel
  • Communicate between multiple PIC chips on a 2-wire serial bus (a custom 2-wire master/slave bus I wrote)
  • Interface to a servo
  • Interface to an ADXL202 tilt chip
  • Interface to a MotorMind B serial speed controller
  • Interface to an IIC EEPROM

Things I am still working on:

  • Interfacing to a serial ADC chip
  • Interface to a Vector 2XG compass
  • Interface to a simple sonar system

If you're really adventurous, and you know Smalltalk, and can deal with Squeak, you can get PIC/Smalltalk here...


If you have any comments or ideas, please email me...


Go back to my MicroSeeker page...
Go back to my Smalltalk page...