DPRG List  

DPRG: 68hc11 as a premium choice ?

Subject: DPRG: 68hc11 as a premium choice ?
From: Kevin Ross kevinro at nwlink.com
Date: Thu Jul 24 00:53:01 CDT 1997

- ----------
> From: droid at bellatlantic.net
> To: dprglist at dprg.org
> Subject: DPRG: 68hc11 as a premium choice ?
> Date: Wednesday, July 23, 1997 8:47 PM
> I was wondering, why is 68hc11 so popular in the robotics(particulary in 
> the "personal" robots, made by hobbyst.) I mean...that processor has Von 
> Neuman architecture if I'm correct. That means that no multitasking is 
> "easy" or if possible at all. ...Can anyone answr me that question. ?

Hmmm... You are correct about the Von Neuman architecture on the 68HC11,
but incorrect about the multi-tasking abilities. Actually, most computers
use the Von Neumann architecture, including the Pentium, the 68000 series,
the VAX, and a host of (actually, most!) others. This is actually
independent of the ability to multi-task. The defining feature of the Von
Neumann architecture is that data and program share the same address space.
The 8051 architecture is really a Von Neumann architecture, even though it
has a seperate code/data space capability. The reason it is still Von
Neumann is that the code and data share the same bus. The PIC, in contrast,
is a Harvard machine, and the code and data are on different busses, and
there is no way to mix and match. The Harvard camp has an easier time
pipelining instructions, but really sucks at doing other things like having
data in the code section, or doing constant string and table manipulation

Multi-tasking can be supported just fine on the 68HC11. There are some
chips that don't support it well, and ironically enough, the PIC chip,
which is one of the most popular of the Harvard architecture
microcontrollers, doesn't support multi-tasking very well at all.

In general, to support multi-tasking well you need to have enough memory to
store the program state for each task, some method of interrupting the
program flow such as a timer interrupt, and the ability to store/restore
the state of a running task. Most commonly, machines with a data stack that
also shares the return address stack do this best. The PIC chip, which
doesn't have a stack, is a real pain. 

The 8051 is also an extremely poor choice for multi-tasking. The stack
pointer on the 8051 machines is limited to 8 bits, which means it MUST be
in the first page of memory. This is really a shame because a multi-tasking
kernel is forced to copy lots and lots of memory around during context
switches, which makes it very slow. Most reasonable MCU's have a 16-bit SP,
which allows you to point the stack somewhere else in RAM. This makes
context switches very easy to do because your interrupt routine just points
at the saved state of another task and does an RETurn from Interrupt. (I
realize most of this group is 8051 based. I hate to keep bringing up how
inadequate the 8051 architecture is, but I would really like to encourage
everyone to take a good hard objective look at other chips. There really is
a reason that most of the robotics world likes the 68HC11.)

The big reasons for the popularity of the 68HC11 is the single chip
operation, a reasonable instruction set, low cost, very low power
consumption, good free tools, great support from Motorola, and all the
bells and whistles you need to build a great robot. The big winners are the
timer section, the A/D capabilities, and the built in serial port hardware.
You also do NOT need an EPROM programmer or any other special hardware to
program the chip. Its bootstrap mode allows you to program it via a serial
cable. Hence, it is inexpensive, capable, and easy to program. 

Intel and friends don't do near as well in the hobby level support
category. Intel has always been especially weak in this area. Philips and a
few others have done a better job, but they just aren't as nice as the
Motorola AMCU division! 

The gripe that some had against the 68HC11 for a while was availability.
This is really old news. The 68HC811E2 (which has 2k of EEPROM and 512
bytes of RAM onboard) was on allocation for a while in 1994-1995 (they
couldn't produce enough to meet demand). However, they are much easier to
get these days. I have been selling them for $18.00



More information about the DPRG mailing list