Unlike microprocessors that require external chips for memory and I/O-port control, microcontrollers come with everything on one chip. But engineers who haven't had an opportunity to use these versatile devices may wonder how best to learn about them. Fortunately, you can educate yourself by using one of the many development boards or kits sold by microcontroller vendors or third parties. To find out how helpful they are, we looked at five kits—ranging from simple to complex.
BASIC Stamp Starter Kit with Board of Education
(27203), $159 Parallax, Rocklin, CA. www.parallax.com
An easy-to-use kit with complete and helpful documentation. Lots of support from user community and third parties. Ideal for getting started and quickly solving real problems.
Analysis: When I asked Parallax to suggest a kit for people just getting involved with microcontrollers, they recommended the BASIC Stamp Starter Kit with Board of Education. This kit comes with a BASIC Stamp module and something most development systems lack—a breadboard area. This area gives users a place to wire-up experiments and connect external devices to the computer module. The breadboard eliminates the need for dedicated switches, LEDs, and other devices. The kit comes with components such as LEDs, pushbuttons, resistors, and so on, that drop into connector pins on the breadboard. When you finish an experiment, just pull the components out of the breadboard.
Setting up the kit involves connecting it to a host PC with a serial cable and loading software from an accompanying CD-ROM. A 9-V battery provides power, although the board can connect to a wall-mounted power cube. I loaded the Windows-based editor and typed in a simple "Hello World!" program that ran without any problem. As its name implies, users program the BASIC Stamp using BASIC, a widespread language that some users may find less cryptic than C, another popular language for microcontrollers.
If you're not yet a BASIC-language programmer, the 350-page manual will give you plenty of code samples as well as reference information about every BASIC command. In many cases, the manual provides a hardware circuit you can wire in the breadboard and a BASIC program that works with the hardware. The preloaded files on the host PC include 35 sample programs that complement the manual's information.
Unlike other microcontrollers I investigated, the BASIC Stamp furnishes only a small memory space—16 words (32 bytes)—in which you can save data. The BASIC software takes six of those bytes for I/O operations. Still, in many applications, 26 bytes provides enough memory to save variables and other temporary data. The chip provides plenty of program memory to store instructions.
The BASIC Stamp module has only 16 I/O lines, but for many experiments and real applications that number proves sufficient. Why? The BASIC dialect used with Parallax products includes commands such as SERIN, SEROUT, SHIFTOUT, SHIFTIN, and DTMFOUT that turn complex I/O processes into simple software operations. And because you can control individual lines, you can divide the 16 I/O pins into any combination of inputs and outputs you need.
Parallax also sells an Industrial Control kit (28156; $59) that people can use with the kit I reviewed. This add-on package includes a multitude of electronic components and a 264-page workbook that covers seven detailed experiments, sample code, and tutorial information. If users exhaust that information, they can buy a Stamp Works kit (27297; $349) that provides an entire BASIC Stamp lab, including breadboard, servo motor, LCD, and DMM in a handy carrying case.
Interest in the BASIC Stamp modules has spawned a discussion group on Yahoo as well as many books that address the needs of experimenters as well as engineers. And because the BASIC Stamp modules use PIC processors from Microchip, serious users who wish to can move on to more powerful devices.
Rabbit 2000 Basic Development Kit
(101-0359), $139 Rabbit Semiconductor, Davis, CA. www.rabbitsemiconductor.com
The Rabbit kit is easy to set up and use. Even if you're just learning C, you can quickly modify and try sample programs. On the downside though, the I/O ports can be difficult to set up if you haven't had experience using control bits to set I/O functions.
Analysis: Rabbit has taken the venerable Z80 microprocessor architecture and updated it in a new processor that provides plenty of I/O functions. The company sells several starter kits that cater to different types of users, so I suggest people new to microcontrollers start with the Rabbit 2000 Basic Development Kit. The kit includes a computer board (Jackrabbit) and a demonstration board that supplies eight LEDs, four pushbuttons, and a beeper. In addition, the Jackrabbit board includes serial ports, an ADC, and a DAC. The kit comes with a wall-mounted power cube and a serial cable.
The kit includes a "Getting Started" manual that guides users through a simple setup process that extracts software and documents from a CD-ROM. After connecting the serial cable and power supply, I had a standard LED-flash program running in a few minutes. If your kit comes with only four LEDs on the demo board, solder in the remaining four, provided loose in an accessories bag.
Nine demo programs—all written in C—let users exercise various I/O ports and these short programs provide "skeletons" you can modify to try different operations. The I/O ports on the Rabbit chip provide many capabilities, but at a cost. Using the ports requires careful understanding of their operation. In some cases, ports share functions. The C I/O port, for example, serves as an 8-bit I/O port or as four serial ports. The company includes in the kit a handy fold-out chart that diagrams all the ports and internal functions, but you may have difficulty understanding how a "slave port control register" works, or why you might use it. To help, print the contents of the SYSIO.LIB file, which lists abbreviations such as GCSR, which stands for global control/status register.
The Rabbit 2000 Microprocessor User's Manual (you'll have to print this from the CD-ROM) includes some information about the I/O ports, but it lacks C-language examples. If you want to use the I/O ports, it's up to you to try them as best you can. Use ports A and B to start because they're fairly easy to set up.
In addition to the User's Manual, print a copy of the Dynamic C software manual, too. You'll need it as a reference if you decide to get further involved with C programming.
The demo board has only a few I/O devices to play with, so if you wish, you can disconnect the Rabbit 2000 module and use it in another system. Two 40-pin headers, with labels, make available all the I/O port and control signals. And if you need capabilities beyond those in the Dynamic C SE softwares, buy Dynamic C Premier ($395), which includes a real-time operating system kernel and communication libraries. You don't need that edition to effectively use the Rabbit processor, though.
If you like the Rabbit approach, you can buy Rabbit 2000 CPU chips ($12.75) or small modules ($69) that include memory, serial ports, and other functions. The modules also come with a programming connection, so you can quickly download programs.
MPLab ICD 2 Evaluation Kit
(DV164006), $209 Microchip, Chandler, AZ. www.microchip.com
The PIC demo board has a lot to offer, but newcomers may not put up with assembly-language programming. Switch to a C compiler to make life easier. PIC processors have lots of altruistic support, including code, from users, which can make getting started fairly easy.
Analysis: The Microchip development kit comes in two parts: a PICDEM 2 PLUS demonstration board and a MPLAB ICD 2 module. The demo board includes a programmed PIC microcontroller, so it runs right out of the box. The PIC's demo software demonstrates the operation of on-board devices: an LCD, a buzzer, three pushbuttons, and four LEDs. The demonstration requires only power from a wall-mounted power source (provided), or a 9-V battery, but no connection to a PC. Printed instructions told me to change one jumper setting to run the demonstration program, which worked just fine. The board operates with 18-, 28-, and 40-pin PIC processors.
If you want to write code, you'll need the MP LAB ICD 2 module (ICD stands for in-circuit debugger), which programs code in a target device such as the PIC18F452 chip on the demo board. The ICD module, which looks like a hockey puck, connects to a PC through either a USB port or a serial port. I started by using the serial-port connection. The installation software comes on a separate CD-ROM and it sets up needed files without difficulty. At the end of the installation, the software opened many Notepad and browser windows, all with additional instructions. Only one Notepad window (7 printed pages) applied to the ICD 2 module, but it took me a few minutes to realize this. One browser window contained information about using the ICD module with a USB port, something I didn't plan to do.
The Quick Start Guide contains information about how to set up and use the Integrated Development (IDE), the application that lets you write and compile code. The manual provides instructions on using a test program, but I had to resort to Windows' file-find routine to track it down. Once set up in its own test director, I had no trouble establishing a new project—the term for a new software program—and compiling the sample code.
Unfortunately, at this point my development hit a brick wall. After talking with my contact at Microchip, I downloaded a later version of the software, loaded it, and switched to a USB connection. That solved the problem and I quickly downloaded my test program, written in assembly language, to the demo board. But the program didn't work. That's because it included an intentional bug. Later instructions explained how to find the bug and fix it. But that's a poor way to introduce people to a chip—make their first effort at writing a program fail. The first few programs should work flawlessly. Hitting a bug right away will discourage neophytes.
Although assembly language programming gives users complete control over every aspect of a microcontroller's operations, it can seem daunting for a new user who has little or no programming experience. Assembly language also requires a good understanding of a microcontroller's architecture. If you want to pursue a PIC microcontroller for an application, investigate C compilers from Microchip and several third parties, as well as a PICBasic from Micro Engineering Labs (www.melabs.com). Microchip lists many third-party suppliers on its website.
At press time, Microchip introduced an even more basic development kit, the PIVkit 1 ($39), but I did not obtain a kit in time to evaluate it for this article.
AVR Starter Kit
(STK500), $79 Atmel, San Jose, CA. www.atmel.com
An easy-to-use development kit if you can start with assembly language. Third-party C and BASIC compilers available. Connectors provide ready access to I/O pins. Don't count on the User Guide for assistance; instead go to
for "Introduction to the STK500." Add a C compiler and get started for under $300.
Analysis: There's a lot to like about the STK500 development board. It includes eight programming sockets for the chips in Atmel's line of 8-bit processors, so you can choose a processor you like and try it. (I used the supplied AT90S8515 chip for testing.) The board also includes eight LEDs and eight pushbuttons. But the ports from the microcontroller don't directly connect to these I/O devices. Two 10-conductor jumper cables (supplied) make short work of the connections. The capability to disconnect the I/O devices means a user can quickly connect the I/O ports to external devices—a plus in my opinion.
The kit does not include a wall-mounted power cube, but on-board circuits let the board operate with a variety of power sources. A 12-V lab supply did the trick and the STK500 immediately ran a preprogrammed LED-flash program.
Now it was time to write some programs. Two versions of the company's AVR Studio tools come on a CD-ROM. I installed the latest version (4), which quickly recognized the STK500 board connected through a serial cable. Unfortunately, the User Guide for the STK500 is awful. It describes hardware at length, but covers software in only 10 pages. This section covers settings and options, but not how to use the AVR Studio tools. The bare program example simply duplicates the assembly-language demo program already in the microcontroller. You'd never know whether you actually loaded your program or if the old program continued to run.
I pressed on, but ran into a menu the manual didn't describe. A call to my contact at Atmel brought an explanation and a suggestion. First, if you use the STK500 and get asked by the AVR Studio software to specify a debug platform, choose "AVR Simulator." That's not explained in the instructions. Second, users can find a wealth of information, including a helpful paper, "Introduction to the STK500," on the AVR Freaks website (www.avrfreaks.net). By following the paper's step-by-step instructions, I loaded the older version (3.56) of the AVR Studio from the CD-ROM, used it to compile a simple test program, and loaded the code into the microcontroller. It ran.
Unfortunately, the AVR Studio doesn't include a C compiler, so I was stuck programming in assembly language. The data sheet for the AT90S8515 chip includes assembly-language codes (also called op codes), but do print the complete manual for any chip you choose to work with. The CD-ROM also includes a 150-page detailed description of all the AVR chip op codes.
You can learn to program using assembly language. (See www.avr-asm-tutorial.net for a good tutorial.) But if you plan to use an AVR microcontroller, you'll find more flexibility comes from using C. Several vendors offer compatible C and even BASIC compilers, and the Atmel and AVR Freaks websites provide vendor-contact information. The latter website lists a free gnu C compiler (gcc), but after reading the 20-page installation instructions, I decided against trying to install it.
Atmel also supplies two add-ons for the STK500; a 64-pin programmer adapter (STK501; $79) and a 64-pin programming adapter with an LCD (STK502; $99).
Z8 Encore! Development Kit
(Z8ENCORE000ZCO), $50 Zilog, San Jose, CA. www.zilog.com
Lots of I/O devices make this a tantalizing kit, but the lack of documentation for the I/O ports may stymie all but the most dedicated engineers. Easy to use development tools.
Analysis: When I saw an advertisement for the Zilog kit, the list of I/O devices alone was enough to convince me to buy it. Those devices include four 5x7 ED-matrix displays, pushbuttons, several serial I/O ports, and an infrared communication port of the sort used by portable devices such as Palm Pilots. The board includes space for an add-in modem module, too. (Modem modules cost from $40 to $55.)
The kit comes with a User Manual that explains the initial setup of the IDE software and connections for power and to a host PC. Communication with a PC uses a serial port and a serial cable (supplied). A small Target Interface board links the serial cable to the development board, but this connection doesn't "consume" one of the available serial ports on the board.
After installing the development tools and getting the board connected, I followed the instructions and ran a canned flashing-LED test program that turned on and off a 5x7 LED module. The C program I compiled and loaded to the development board looked fairly simple, so I decided to modify it to display a different pattern on the LEDs. The User Manual supplies limited information about how to control individual LEDs and modules, so after about 40 minutes of fooling around, I could control the display. But if you want to control more than the LEDs, you'll need more information than the manual provides. Unfortunately, the documentation doesn't tell you where to find all this data.
You can find some of it in the DriverDemo routine that lets you exercise the various I/O ports from a PC. Althought you can look at the C source code for the device driver test program, it doesn't provide details needed to control I/O ports. You'll have to poke around various directories and look at header files—those with a .h extension—to find out more about port-control commands.
The various I/O devices would make this a fun board with which to learn more about microcontrollers, but without solid documentation about I/O-port control and without documented code to serve as examples, neophytes may find their education quickly comes to a halt. Zilog publishes application notes on its website, and these can often supply "starter" code for specific needs.
On the plus side, though, the manual for the Z8 microprocessor chips describes the I/O ports on the chip in detail, although you'll have to relate port operations to specific code in header files. If that sounds beyond your level of interest, you might check out a different starter kit.
Also, the User Manual provides information about the readily accessible I/O pins—all of which the board labels—that give a user access to almost all of the CPU's I/O and control signals. The manual also provides complete schematic diagrams of the development board. So you can slog through I/O port control, if you feel determined.
|Comparison of Microcontroller Development Kits
Ease of Use
|BASIC Stamp Starter Kit
||Documentation, BASIC, bread-board, support.
||Easy, no problems encountered during setup.
||The most useful kit reviewed for learning about microcontrollers. Documentation, real code examples, and tutorial materials made this my top choice.
||Only 16 I/O pins, limited serial I/O, but expandable off chip.
||BASIC Stamp modules can handle small real-world problems.
||Chart of I/O ports, C language, accessible I/O pins
||Easy to set up and run a few supplied programs.
||Good software learning tool. Wide range of hardware modules that include memory, I/O, and Ethernet.
||No breadboard area, lacks tutorial, not much 3rd-party support.
||A breadboard area on this kit would turn it into a top-notch learning tool.
|MPLab ICD 2
||On-board programmer for other devices, lots of support and books for PIC chips.
||Encountered problems, using the serial port, but a switch to USB connection worked well.
||OK as a learning tool if you can put up with assembly language. End result is programmed chips you must design into a circuit.
||Assembly-language programming, sketchy printed documentation.
||Would have liked to use the LCD, but never found documentation.
|AVR Starter Kit
||Ease of access to I/O ports, programs many AVR chips, user support.
||Difficult to set up without detailed instructions and explanations of how to start a project.
||OK as a learning tool if you can put up with assembly language. End result is programmed chips you must design into a circuit.
||Poor manual. Had to go to independent website for advice on setting up system.
||People say AVR's chips work well with C, so why don't users get a C compiler with the kit?
||Lots of memory and I/O devices,C language.
||Easy set up and operation.
||Not the place for neophytes to get a start with microcontrollers. EEs with C experience should make out OK.
||All those neat I/O devices and little documentation. No tutorial.
||Customer support took 25 days to answer a question about obtaining manuals.
Contributing Writer Jon Titus can be reached email@example.com.