Machine Interface

Not a huge leap of reasoning here, but it became very clear to me that we won't make any show-off level progress until we get the basic machine interface in place. The goal is to get some response from the main hardware players: dedicated switches, switch matrix, lamp matrix, flash lamps and coils. Our first proof of concept touched the dedicate switches and was done in the Propeller's high level programming language (spin). In order to push past this stage there was a bit of a ramp up required. Read on as we go on a search for software tools and retrain our brain to think in way it hasn't for quite awhile.

I've been trying to recall the last time I did any significant work in any assembly language. I'm exposed to it every day (controllers and drivers for embedded systems on PowerPC, XScale, MIPs), but the last time I set out to design a system largely in assembly was, well...hmm...for the Apple ][. So yes, it has been awhile. Do those old cobwebby brain cells still fire? Apparently they do. At least enough to make good sense of the propeller assembly language guides, tutorials and examples.

The chip being used is the Parallax Propeller, a 32 bit multi core microcontroller. It is designed to run either asm or an interpreted byte code language called Spin. Spin is adequate for a lot of tasks, but it does not lend itself toward fine tuned small fast sections of code. That and I simply don't like it. I see little gain in learning a new language that applies only to one niche controller. For what we are doing, the code needs to be small, fast and (for the most part) deterministic. The propeller assembly code lends itself to these needs very well. And it is assembly code which, with a few notable exceptions, is just like coding assembly for any other chip (even the 6502).

I spent a lot of my free time reading the propeller assembly docs, a wide assortment of propeller assembly tutorials and pawing through as many propeller assembly examples as I could find. There is no short cut for this. You will need to *gasp* study. All of the information needed is linked from the Parallax Propeller forums.

I also searched out some tools to help with the coding process and found that there is a decent Propeller emulator available. GEAR allows you to load binary images created with the Parallax Propeller tool (IDE) and run the code on an emulated chip. This is exceptionally useful and is well worth the time to install and learn how to use.

The results? Great. My asm chops are coming back pretty well. In fact I have made some significant progress on the interface code which I'll share next time.