programmable, and development
software can be had for FREE (really
free, not crippled or limited in any
way). I’ve paid thousands of dollars for
development boards, programming
devices, and C compilers for the
other micros, but never again — I like
free. The hardware used in these
workshops — the Atmel AVR Butterfly
— can be modified with a few
components to turn it into a decent
learning system and the needed
components can be had for less than
$40. You can’t get a better learning
system for 10 times this price and
you can pay 100 times this and not
get as good.
You will often stumble across
arguments on the Internet as to
which microcontroller or
programming language is the ‘best.’
People take sides and soon a
religious war breaks out. I don’t want
to enter that fray, so I’ll just say that
the AVR is the best microcontroller
and C is the best programming
language and if you don’t believe
me, you are bound for perdition —
hallelujah and amen. (Agreed! -Ed.)
kind of a jet plane ride over the
territory.
Workshop Goals
What I hope to accomplish with
this series is to help you learn SOME
C programming on A SPECIFIC
microcontroller and provide you
with enough foundation knowledge
that you can go off on your own
somewhat prepared to tackle the
many kinds of microcontrollers and
C programming systems that infest
the planet.
Both C programming and
microcontrollers are best learned
while doing projects. I’ve tried to
provide projects that enhance the
learning process, but I’ve got to
admit that some of the projects are
pretty lame and are put in mainly
to help you learn C syntax and
methods.
I know how easy it is to get
bogged down in all the detail and
lose momentum on this journey, so
we’ll begin with a quick start guide
and learn just enough to get our
learning platform tools working —
Quick Start Guide for
the AVR Learning
Platform
■ FIGURE 2. Developer Terminal.
Software
AVR Studio — FREE and darn well
worth it.
AVR Studio is provided free by
the good folks at Atmel Corporation,
who seem to understand that the
more helpful free stuff they give
developers, the more they will sell
their microcontrollers. Actually, this
software could cost hundreds and
still be darn well worth it, but unless
you just really like Norway, don’t
send them any money; they’ll get
theirs on the backend when you start
buying thousands of AVRs for your
next great invention. The workshop
is based on version 4. 14 and if you
use a newer version you may find
differences in it and our discussions.
You can find AVRStudio at
www.atmel.com under the AVR
Tools & Software section: http://
atmel.com/dyn/products/tools_card.
asp?tool_id=2725).
WinAVR — Oh, Whenever ...
WinAVR is a GCC compiler
toolset for Windows that we will use
in AVR Studio. We will use this
package under the AVR Studio IDE
that has a GCC plug-in that finds the
WinAVR installation and adapts it to
the IDE. You can find WinAVR at:
http://sourceforge.net/projects/
winavr/.
Developer Terminal
Figure 2 shows the PC terminal
we will use to communicate with
the AVR in our workshop. You can
get the terminal installer and related
documents from www.smiley
micros.com. The source code in
C# and Visual Basic .NET for this
terminal is discussed in detail in the
book Virtual Serial Port Cookbook
(by me) and is available from
www.smileymicros.com and
Nuts & Volts ( www.nutsvolts.com).
62
August 2008