As some of you may remember, I was having some trouble with the Atmel programming tools. Their Studio 6 assembler and simulator are excellent. But their chip programmers leave one or two things to be desired. Well I'm going to do the usual hardware guy solution. I'm going to hit the pins used for programming with lightning bolts. Which is to say — I'm going to use drivers with a low enough impedance so that even if the pins have 500 ohm loads on them, they will do the right thing. In addition, I'm going to watch those pins to see if they respond as commanded. Belts and suspenders. That is not too different from the usual engineering practice in difficult situations.

What is different is that I like to program in Forth and there is, as far as I can tell, no suitable Free Forth for the Atmel 8 bit series of chips. Well like any good Forther, I'm going to roll my own. But that would take weeks to get working. I don't want to spend weeks before I can accomplish anything useful. What to do? Well I did do a Forth for the Zilog Super8 many years ago, but in my many moves I lost the documentation. The ATmega644 is very similar to the Super 8, so what to do is obvious. Roll my own. The question is how?

The Studio 6 assembler has some nice functions for doing macros. So I'm going to program the chip in Forth using macros for the words most frequently used. Things like fetch (@ in Forth), store (!) AND, OR, +, -, *, etc. I will initially handle things like IF, ELSE, THEN, and loops and other decision constructs by hand.

All the code I'm developing will be useful in creating a full up Forth. And while I'm doing that, I can be making my programmer work with Forth so I can convert that to high level code after I get the various bits working.

And the chip I'm using for the programmer? The ATmega644. When I get the processor board finished, I'll be writing it up, and I will be writing up the programmer board as well. I have some ideas.

In addition, I will be Open Sourcing the ATeam Forth. With suitable modifications for the various I/O port locations, it will run on most of the Atmel 8 bitters except their very smallest ones with very small memories.

M. Simon's e-mail can be found on the sidebar at Space-Time Productions.