by Bryan Bergeron, Editor by Bryan Bergeron, Editor
The Microcontroller Debate
If you’re an experienced microcontroller experimenter, you probably have a favorite chip or configuration —
maybe a Microchip PIC, a Parallax BASIC Stamp or
Propeller, or an ATMEL-based Arduino — and good
reasons for your choice. Moreover, if you’ve worked with
a particular microcontroller on several projects, you’ve no
doubt developed a bag of tricks and workarounds that
enable you to do just about anything you want. I’m sure
you can defend your choice based on relative cost,
performance, or ease of use.
8
June 2010
DEVELOPING PERSPECTIVES
language called SPIN. If your goal is to understand
different microcontroller architectures, then the Propeller
chip may be just the thing for you. However, knowledge
of SPIN doesn’t readily translate to other microcontrollers
on the market.
When I started developing semi-autonomous robots, I
was forced to look for something more powerful than the
Stamp, and turned to the ATMEL line of processors. The
cost for this step up in processing power, number of I/O
ports, and other features was considerable. Instead of a
simple USB connection between my PC and the Stamp, I
had to purchase and learn to use a programmer. Then,
there was the C compiler and the compile-run process
instead of the instantaneous, interpreted Basic with the
Stamp.
In retrospect, the progression from Stamp to bare
ATMEL microcontroller was fortunate. It allowed me to
learn to use a variety of sensors and servos in an
interactive environment. In the less forgiving, more time-consuming compiler environment, it would have taken
me much longer to learn to use the hardware. I think the
same analysis holds true for the PIC — which I consider a
top-notch production chip that can go toe-to-toe with the
ATMEL.
I can’t speak from experience on the Arduino as a
first microcontroller. However, it was designed as a
painless introduction to microcontrollers, and it appears
to be successful on that account. I’ve worked with the
programming environment – which, by the way, is
compatible with a Mac – and it’s solid and easy to use.
Moreover, there are dozens of add-on boards or
shields, and multiple form factors to choose from. For
example, I’ve used the Duemilanove — an ATMega328-
based board — and it’s a pleasure to work with. I’m
currently working on the LilyPad: a machine-washable,
sew-on version of the Arduino from SparkFun
( www.sparkfun.com) to try out some body network
ideas.
If you’re deciding between the BASIC Stamp and
Arduino for a beginner’s system, then relax. You can’t go
wrong with either platform. However, if you want to learn
or know how to program in C, then the Arduino is
probably a better choice. On the other hand, if you’re
comfortable with Basic and your focus is to learn about
sensors, actuators, and other peripherals, then the Stamp
may be a more efficient vehicle. I also think the Parallax-backed support forums are second to none — something
to consider when you need help sorting out those
input/output signals. NV