Back to Robots
Robotics is tied to microcontrollers. I have used Motorola's 68HC11 and now, it's intended replacement, the 68HC12. I also took a shot at the BasicX. If you've ventured very far into this field you have come to understand that it's a fast growing, fast changing arena with many players. Each chip that you tackle will take a large time investment so you need to pick your platform carefully.

The 68HC11/12 are really mid level uC's. The low level machines are the PIC's and the 6805/6809 type devices. The low level chips may cost just a couple dollars. They are typically programmed in machine language. They work very well for relatively simple specific tasks. Of course the high end low level uC's are starting to look like mid level devices. The high level embedded controllers are the X86 variants or similar. They typically run DOS. Programming in DOS would be nice, but they cost more, use more power and don't have the I/O capability of the 68HC12 series without add on boards. I could, however, see a combination of one of these and a 68HC12 making a pretty nice robot platform.

The 68HC12 sits in the middle. With an 8MHz clock and 32 Kb flash memory its processing power is limited. Where it shines is in I/O processing. The newest version , 68HC912HD128 comes with 16 10 bit A/D ports, four pulse accumulators, 6? 8 bit discrete I/O ports, very flexible timer functions, PWM outputs, 2 serial ports, an SPI port, 2 CAN ports, an I2C port and on and on. A lot of the processing is done outside the central CPU freeing up the developer to concentrate on working with the data. I think it's the ideal processor for low level robot functions. It has not become as popular as I thought it would - this may be to it's relatively high cost - $20 up to $80 for the new DG128 version. It's also hard to purchase as a loose chip.

Microcontrollers can be very frustrating. It's a small real time system. The programs you write often rely on external events that may not work as expected. You often use interrupt driven routines that are notoriosly difficult to troubleshoot. The real nice development tools cost thousands of dollars - not in my budget. You therefore have to rely on shareware or low cost programs that don't alwys do what you expect. You work hard to get a stable development platform. Motorola has not helped out the development community the way Microchip has for the PIC uC's. It will put your patience to the test.

I'll describe the development system I've been using.

With the 68HC11 I use PC Bug for loading and debugging. I originally used the Buffalo monitor but found the PC Bug method to be less confusing and more versatile. I use PFE, the Programmers File Editor, for developing SBasic or assembly programs, or ICC-11 if developing C Programs. I use HC-Load only for changing the Config register settings. I used THR 68HC11 Simulator for testing assembly language code. This worked fine, except that there are many different variants of assembler dialects around. I use Hyper Terminal or PC Bug in "Term" mode to connect to the micro.

I purchased Kevin Ross' BDM-12 for my 68HC12 work. This works very well in single chip mode, not so well in expanded mode. In single chip mode I use DB12 to load and debug. This is a very good development platform - programs load quickly and every time. I typically keep a Hyper Terminal window open connected to the SCI port and run DB12 to the BDM module of another com port.

I have a wide variety of project related software that I have used. I purchased Imagecraft ICC-12 vs. 6 for 68HC12 programming and use thier demo version for the 68HC11. This required learning C which I had avoided for a long time. C is the ideal microcontroller language however. It incorporates both high level concepts with low level operators. I used SBasic for the first couple years. It really works very well and I would recommend it for beginners. I have done some assembler programming, enough that it doesn't scare me if I know I need to go there.

Most of my hardware has come from Technological Arts in Toronto. They have the best selection and prices in the 68HCxx area for my money and their technical support is also very good. The first few 68HC11 boards I used were from Zorin. These were good board, but I think Tech Arts has betters designs now for these as well.

My last purchase was an extended memory board for my 68HC912B32 board. It provides 64 K of wide mode fast SRAM. This was a struggle however. I was working on implementing uC-OSII, the real time kernel, which requires at least 8K RAM, and therefore extended memory. My development platorm was flakely however. DB12 worked sporadically - some nights well, sometimes not at all. I was able to get most of my robot program ported over to the RTOS when it stopped working all together. I finally determined the board was fried. Tech Arts did have an update for the board that I didn't see until too late. Others on the Tech Arts support newsgroup also seem to be having problems with BDM modules and extended memory. So I haven't figured out where to go next with this one.

In the process of working through this problem I discovered NoIce for the 68HC12 which looks promising - didn't solve my problem though.

I was very impressed with the RTOS, however. I very much understand it now as a way of reducing complexity and extending the capabilities of the micro.

One good thing about these MicroControllers is that their pretty tough. The only thing that seems to hurt them is 12 volts. I burnt up a 68HC11 and burned out several pins on my 68HC12 with 12 volts. Other that that, I've had few problems. And I'm a real klutz around electronic devices.