Back to Table of Contents

[18] What is the XXX Microcontroller?

Which microcontroller should I use and what are the differences between them? What about motor controllers and motor drivers?

There are a wide variety of microcontrollers that can be used in robotics projects. Some of the most popular are 6811's (Miniboard and many single board computers), 80186, and PIC's. This topic engenders hot debates of the merit of one chip over the other. Therefore, the best way for you to decide is to understand your problem requirements and see which devices fit your needs. At that point, you can look at issues of support platforms, cross-compilers, cost etc to make the best decision.

Related newsgroups include:

A FAQ devoted to Microcontrollers can be found at the following: The maintainer is Russ Hersch,

In this FAQ, just brief overviews and pointers are provided for these families of microcontrollers and related devices.

[18.1] Motorola 68XX
[18.2] Motorola 683xx
[18.3] Intel 80C186
[18.4] Intel 8051
[18.5] Intel 8096
[18.6] Microchip PIC16/17
[18.7] Parallax BASIC Stamp
[18.8] National Semiconductor LM628/629
[18.9] Hewlett-Packard HCTL 1000, 2000
[18.101] Motor Drivers

Basically there are three kinds of "boards" out there that are of interest to design engineers and the definitions are necessarily broad:
  1. The evaluation board. This is a board designed by the manufacturer of a part to demonstrate its features. Using such a board a DE can decide whether the part will meet their needs for the design they are creating. Generally somewhat expensive (because they are produced in relatively small numbers) except when the part is being 'pushed' by the manufacturer and there is some sort of promotional deal going on. Often the evaluation board will have some sort of breadboard area on the board for custom circuitry.
  2. The Single Board Computer or SBC. These are generally produced by a third party using some manufacturers chip. The are generally pretty flexible but may not 'expose' all features. SBCs come in all sizes and price ranges, some are availabe in kit form. Many have development tools available for them.
  3. The Embedded processor. These are generally boards dedicated to some particular function (like driving a stepper motor, running a modem etc) and are usually available pretty cheaply on the surplus market. Unlike SBCs there are rarely any design tools available to use with them but they can be quite inexpensive.

[18.1] Motorola 68XX

A 68HC11 is an 8-bit data, 16-bit address microcontroller from Motorola, with an instruction set similar to the older 68xx (6801, 6805, 6809) parts. It has several on-chip resources including digital I/O, timers, PWM, A/D RAM, various types of ROM, and synchronous and asynchronous communications channels (RS-232 and SPI). It can easily be integrated into single-chip applications. Less than 20ma current draw. Good freeware assembly-language tools are available, as well as several good commercial C compilers. It is widely used because it is very inexpensive and the availability of developments tools makes it very attractive.

Moto nows offers an evaluation kit that includes DOS and Mac compatible software, low-power design tutorial and extensive technical literature. M68EBLPIIKIT has batteries included and has 68HC11E9 microcontroller, LCD display, Moto LCD driver, RS232 line driver/receiver chips, wire-wrap area for custom work, simple development platform and development code. Includes assembler, several examples, and extra crystals. $199.11 through 4/22/94.

For a lot more detail see the 68HC11 FAQ at: The FAQ is also regularly posted to several newsgroups.

To subscribe to a listserv mailing list for 68HC11's send the following message to

subscribe mc68hc11

There is also a FAQ on news:comp.sys.m68k. This FAQ covers the Motorola M680x0 and the MC68300 series of microprocessors. There are sections on the VME bus and PowerPC parts. Sources for software for all Motorola products including the HC11 series is included. This list also points to resources provided by Motorola to its customers. Much of this FAQ is applicable to parts other than the M68K.

The 68k FAQ is available on the World Wide Web at

Although there are reports of shortages of the 68HC11, presumably because of large customers, here is one vendor who is reported to have significant stock:

Contact Beall and Glenn at 800-874-4797.
MC68HC11A1 - $2.50 each.
MC68HC11E1 - $3.00 each.
MC68HC11E1 - $3.00 each. ( This is a 12Mhz version.)
If you order over $20 the shipping is free. They also take VISA.

[18.2] Motorola 683xx

The 683xx family from Moto are highly integrated CPU's. Several have onboard RAM (eg, up to 2K), none have on-board ROM, but they do have timers, software programmable chip selects, etc, making it possible to build very small but complete systems.
68302: Designed for communications, especially ISDN. On-board nice serial controller. 68000 CPU, some memory.
68330: Has CPU32, which is in between a 68000 and a 68020. Not much else.
68331: Add standard async serial controller.
68332: Add separate Time Processing Unit and some RAM. The TPU can do things like off-line PWM processing. Nice general package.
68340: Delete TPU, add DMA controller.

[18.3] Intel 80C186

An 80C186 is a evolution from the 8086. It is an embedded processor sold by Intel, and has the same instruction set as the 8086, with the additional "real-mode" instructions of the 286. It has the same 16-bit data and 20-bit address bus structure of the 8086. The 80C188 is an 8-bit data bus version, just like the 8088 (of PC and PC/XT fame). For embedded systems, it is much easier to use than the 8086.

It has an on-chip timer system, interrupt controller, DMA controller, and clock generator. For DRAM operation, it also has an integrated DRAM refresh generator. However, it has no on-chip I/O, nor does it have any memory on-chip. There is, however, extra circuitry for selecting external memory with a minimum of extra logic. Can be programmed using most DOS compilers and assemblers, but requires a linker that knows about locating code in absolute memory.

The '186 is not as accessible; it is harder to set up, the tools cost more, and robotics and control resources have to be added externally. The timers can be configured for PWM or pulse timing, It does, however, run at higher speeds, have more accessible memory, and can be hooked up to a floating-point co-processor (C187). It looks a lot like a DOS machine. This may be important when software is run on multiple platforms and also helps with the learning curve.

[18.4] Intel 8051

A typical 8051 contains:
CPU with boolean processor
5 or 6 interrupts: 2 external, 2 priority levels
2 or 3 16-bit timer/counters
programmable full-duplex serial port (baud rate provided by one of the timers)
32 I/O lines (four 8-bit ports)
RAM and ROM/EPROM in some models
The 8051 and varients are now sourced by more than a half-dozen companies including Intel, AMD, Dallas, Signetics, Siemans and others. The 8051 FAQ can be found at:

It includes 8051 ftp sites, public domain langauges, commercially available software and publications for the 8051.

[18.5] Intel 8096

It is 16 bit, many registers, internal RAM, the usual compliment of on-board peripherals (serial, A/D, pwm, timer/counters, etc)

[18.6] Microchip PIC16/17

Microchip Technology
Corporate Office
2355 West Chandler Blvd
Chandler, AZ 85224-6199
tel: 602.786.7200
fax: 602.899.9210


Arizona Microchip Technology
tel: 44 062-885-1077
fax: 44 062-885-0178
Microchip Technology
tel: 81 45/471-6166
fax: 81 45/471-6122

CMOS field-programmable microcontrollers - PIC16/17. high performance low cost and small package size. Large numbers are used in consumer electronics and automotive applications, computer peripherals, security and telecommunication applications.

A FAQ on the PIC exists and is posted regularly to the following newsgroups: comp.realtime, comp.robotics, sci.electronics Maintainer: Tom Kellett A PIC list address is: Administrative matters go to: Internet PIC sites are at:
PIC16CXX and PIC17Cxx are 8-bit microcontrollers that use a high-speed RISC architecture.The PIC17CXX is probably the faster 8-bit controller. 16-bit instruction word and vectored interrupt capabilities.You can add external program memory, up to 64K words. The PIC17C42 has a number of counter/timer resources and I/O handling capabilities.

Features include: timers, embedded A/D, extended instruction/data memory, inter-processor communication and ROM, EPROM and EEPROM memories. assemblers, linkers, loaders, libraries and source-level debuggers are available. Digi-Key carries PIC's (See Parts Suppliers)

A simulator is available from Compuserve from the MicroChip BBS. The simulator is and the assembler is You do not have to be a member of CompuServe to get to the MicroChip BBS.

  1. Set modem to 8N1
  2. Dial your local Compuserve phone number.
  3. Type and a garbage string will appear because compuserve is expecting a 7E1 setting.
  4. Type + and Host Name: will appear.
  5. Type MCHIPBBS and you wil be connected to the Microchip BBS.
Vendors of PIC boards:
These are from reviews by Chuck McManis :

Micro Engineering Labs
P.O. Box 7532,
Colorado Springs, CO 80933
tel: 719.520.5323
contact: Jeff Schmoyer
MEL has designed a couple of PC boards for prototyping PIC systems PICProto 18 - $9.95 US including shipping in the US. This board is 1.5" by 3", double sided, solder masked, and has plated through holes. the top 7/8" x 1.5" of the board (oriented with the narrow side "up") consists of an 18 pin socket print, holes to conviently mount either a crystal or RC oscillator and a set of holes to mount a 5v regulator, either the TO-220 type or the low power TO-92 type as used on the Miniboard. All of the PIC I/O pins, RB0 - 7, RA0 - 3, RTC, Vdd and Gnd are brought out to a dual row of pads. they are followed by 15 rows of pads, with the outer pad on one side being the Vdd bus and the outer pad on the other side being the Vcc bus. After this there are two rows of pads, offset, that can accomodate a DB9, DB15, or DB25 connector. This board will accept either the 16C5x series (in the 18 pin package) or a 16C71 PIC.

The PICProto Dual - $14.95 US

Is similar except it has pads for 1 18 pin PIC and 1 24 pin (or another 18 pin) PIC. It is 3" x 3" and shares all of the same properties of the PICproto 18 with respect to setting up crystal or RC timing for the PICs. It has pads for 1 DB connector that is 25 pins or less. It adds about 50% more prototyping pads so you can put two or three more chips on it. The nice thing about this one is that one PIC can do asynchronous things like be a serial interface while the other provides I/O pins and monitoring functions.

PIC Prototype-1 - $195.00 from Digikey

This gizmo is made by Depew Engineering ( and is sold by Digikey and Parallax and possibly others. It is a breadboarding system for testing out PIC designs. If you have a Digikey catalog you can look at the picture there, but it is basically a circuit board with a 28/18pin ZIF socket in the upper left corner, a 9 pin DB-9 connector that is attached to a MAX232 chip to provide RS-232 levels and a 25 pin DB-25 connector at the top center which is wired as a "parallel" port like you might find on a PC. Continuing across the top, now in the right hand corner there is a coaxial power plug and switch. Along the right side are five 7 segment displays that are permanently wired to display the value of PORTA, PORTB, and PORTC (when available) in hex notation, along the lower right are a set of dip switches for setting the clock rate (500Khz - 32 Mhz in 32Khz increments). Along the bottom edge are green LEDs showing the state of all the PORT pins (in binary :-)) and taking up roughly 45% of the circuit board is a solderless breadboard section. The solderless breadboard has two primary sections, an upper bus section containing connectors attached to all of the PIC pins and some useful pins on the board (like inputs to the MAX chip and outputs from it), and a lower section which is a standard breadboard with two rows of 5 pin connectors spaced .3" apart.

Additionally, the circuit has support for Parallax's PBASIC interpreter PICs and a serial EEPROM for storing your BASIC program. (Sort of a giant BASIC STAMP). Note you have to buy a PBASIC PIC ($18 from digikey or Parallax) separately. Overall my impression is of a product, that does a lot of neat stuff but fails to be the killer product it could have been. Consequently I'll first discuss the weaknesses of the board before going on to the stronger aspects.

The board claims to be a 16c5x prototyper, but the manual suggests it supports 16C71, and 16C84 parts as well. What it didn't do was add the parts to make it an optional 16C84 programmer. Given how easy this is I'm guessing that they just didn't think of it or had the design "done" before they had access to 16C84 parts.

The next weakness is that while they have the EEPROM socket for BASIC users, they don't bring the pins out the protoboard so it is not possible to take advantage of the EEPROM in your prototype designs.

On the prototype board, +5/Gnd are available in the bus section on two connectors but there aren't two strip connectors that you find on all other breadboards for carrying Vcc and ground. This means that you end up either daisy chaining your power and ground connections, or dedicating some of the connectors on the main bread board for Vcc and gnd.

Another area that could, in my opinion, be improved is the availability of non-dedicated I/O devices, at the least it would be nice to have a 4 position dip switch and 4 available LEDs that could be used in the circuit as needed. A neat feature that would be by no means required would be using two color LEDs to display the state of the output as true (green), false (red), or floating (yellow).

Finally there is the issue of cost, at $195.00 this is a fairly pricey system for what it does. Now I realize that similar systems for other microcontrollers are similarly priced although the nearest direct equivalent would be the Heathkit ET trainer series that were much more oriented to learning about microcontrollers. IF I could program and emulate PICs with it (like the Parallax tools do) in addition to using it as a breadboard that would be wayyy cool, but I don't know how much that would effect the price. I'd probably pay another $50 for that improvement.

Ok, so all that grousing aside what did I like about it? I liked the fact that I can now prototype PIC designs (hardware wise) in minutes as opposed to hours. Prior to this device I would get a MicroEngineering Labs PicProto board, wire up the PIC section, wirewrap my I/O hardware or a connector that connected to my hardware, and then start programming. If I had to redo the hardware that would be fairly long delay. With this thing I can put the hardware on the prototype strip or, using the 26 pin IDC connector, connect it over to my "big" breadboard. I don't have to worry whether or not the PIC is working and I can do a 10mhz design on a breadboard.

In terms of value for the money my guess is that I'll need to do at least four and possibly six different designs on it before I've made back my investment.

If it were part of a PIC seminar, it would be a wonderful teaching tool.
-Chuck McManis

[18.7] Parallax BASIC Stamp

The Stamp is a 1x2" (2.5x5cm) computer that runs BASIC programs written on a PC. 8 I/O lines which can be used for serial communications, potentiometer inputs, pulse measurement, switches, speaker drivers etc. Usually you'll have to add no more than a resistor or capacitor at most. A BASIC editor on the PC converts instructions into token that are downloaded to the Stamp via a 3-conductor cable and stored in EEPROM. Whenever the Stamp is powered up, the on-board interpreter runs the program. Battery clips are built in for a 9V battery (Stamp has 5V supply built in.) and the Stamp has a small prototyping area as well. From Digikey the Development Kit (including a Stamp) is $139, and a Stamp is $39.

There is a BASIC STAMP Mailing List (NOT a newsgroup) Subscribe to it by sending mail to with a line of text saying
subscribe stamp-list There is also an FTP site at "" that has a STAMP directory structure. It contains (so far) all the stuff from the Parallax BBS, plus a few other goodies.

[18.8] National Semiconductor LM628/629

Small motor control chip. Does PWM for motion control at a very low cost. A couple of H-bridges on the outputs. Good reference for using the 628/9 for motion control is in: Closing the Loop on DC Motor Control by Tom Dahlin and Don Krantz The Computer Applications Journal, Issue #28 Aug/Sept, 1992

[18.9] Hewlett-Packard HCTL 1000, 2000

HP's motor and encoder interface chips. Widely used and widely available.

[18.10] Motor Drivers

This section primarily addresses chip-level devices for controlling motors. See
[10.2.5] Controllers for more complete motion controller products.


115 Northeast Cutoff, Box 15036
Worcester, MA 01615
tel: 508.853.5000 Formerly Sprague, Allegro makes a full line of motor drivers for steppers, DC motor drivers, brushless DC motors, voice-coil actuators (used in disk drives) etc.

ILC Data Device Corporation (DDC)

105 Wilbur Place
Bohemia, NY 11716-2482
tel: 516.567.5600
fax: 516.567.7358 DDC makes a number of motor drivers (mil-spec) including the PWR-82333 drives for 28 and 270V brushed and brushless motors. Output currents from 5A to 50A. -55C to 125C operating temperatures. Works in trapezoidal or sinusoidal power systems.


The L293D, motor driver on a chip, is an SGS-Thomson part and is second sourced by Unitrode. In spite of its utility it is not readily available in small quantities. This part is a dual full H-bridge that can drive motors up to 0.6A.

The significance of the 'D' in L293D is that it is diode protected. There is a reverse biased diode that shunts the reverse EMF from a motor to the V+ supply. The L293B doesn't have this diode so it must be provided externally.

National Semiconductor

National has an LM18293 which they say is a cross for an L293B. The price should $4.00 or less and they need the external diodes. A replacement for the D part is the Texas Instruments 754410 which actually has a bit better current capacity (1A vs .6A) this latter part is available from Arrow electronics in the US.


An alternative part is the UDN2998. This is a 3A bridge in an inline package, it is limited to motor supplies greater than 10V. You can also build your own H-bridge out of either bipolar chips or MOSFETs.
Last-Modified: Sun Aug 11 08:53:25 1996
Kevin Dowling <>