Our resident expert on all things
robotic is merely an email away.
Tap into the sum of allhumanknowledge and get your questions answered here!
From software algorithms to material selection, Mr. Roboto strives to meet you
where you are — and what more would you expect from a complex service droid?
Last month, I covered how to install avr-gcc, Eclipse,
and supporting code for playing with the Atmel ATMEGA
AVR microcontrollers. I got through the full development
environment up to writing our first program and compiling
it. This month, I’m going to cover configuring avrdude to
program an ATMEGA328, how to set avrdude up in Eclipse
as a tool you can use with the press of an IDE button, and
how to find where Ubuntu put your USB/serial converter so
that you can tell avrdude about it.
Using Linux to develop on the Atmel AVR
microcontroller – continued.
When last we met, we’d just written and compiled a
“Hello World” embedded program that blinks an LED. I
hope everyone got this to compile because this month
we’re going to program an ATMEGA328 to blink that LED.
Let’s get started.
Install AVR programming hardware, and
finding the dev file.
The dev file you ask? Yup. Linux creates a hook to
system drivers that talk to custom and common hardware in
a directory called /dev. I’m NOT going to go into detail
about how Linux finds and creates these files or how
you can customize them – that is full-court tech geek
voodoo and I’m not going there. You don’t need it;
you just have to know that /dev is where you need to
look. I’m a Mac user so I’ve got a bunch of stuff lying
around for use on a Mac which hasn’t seen a serial
port in over a decade. These days, most laptops and
even a few desktop systems no longer have serial
ports. However, everything has a USB port and
probably the most common USB device to plug in
there (other than a hard drive) is a USB/serial
converter dongle to run all those serial devices we still
have. I own a Keyspan USA-19HS converter that I use
for lots of things and since it has one of the standard
USB/serial converter chips at its core, it works fine on a
Linux system as well. The reason that I’m using a USB/serial
converter is to employ my good ol’ Atmel AVR ISP
programmer. This is a serial port based device that gets its
power from the target board that it is programming.
Figure 1. Where is my dongle?
SERVO 05.2010 13