Getting started with the Atmel AVR 8

Posted by Matthew Fri, 14 Apr 2006 20:58:00 GMT

There are two major microcontrollers in the hobby domain, the popular PIC and Atmel’s AVR line. PICs are tried and true in both commercial and hobby implementations, but the Atmel AVR offers affordable programming solutions, a free development environment, a free assembler and a stable gcc toolkit that work across the entire AVR line.

Various AVR microcontrollers

Affordable Programmers

The AVR is well known for how simple it is to program. To start, you only need a few resistors and a parallel port. This will burn your code onto the microchip, but if you plan on pursuing larger projects you will need a more complex programmer with ISP support. This will enable the extra features and debugging support.

  1. The ultra low-cost AVR programmer uses an LPT port and a few resistors, but requires special software.
  2. A simple serial programmer for Linux uses several resistors and two LEDs. Programming is done with uisp.
  3. More complex schematics for ISP programmers that can be programmed via AVR Studio or AVR-Dude.
  4. A usb programmer that supports ISP.

A simple serial programmer

A free development environment

AVR Studio is available directly from Atmel at no cost. It has an integrated simulator and programming software. However, there is only an assembler available. You will have to purchase more software for high level languages.

The gcc-toolkit

If you want to use C/C++, then the gcc-toolkit is available for the AVR, free. WinAVR comes loaded with a gcc, binutils, the avrdude programmer, simulavr, and more. On Linux, you will need to download the packages for your specific distribution or compile your own cross-compiler.

A great community

AVR Freaks is a site dedicated to the AVR line of microcontrollers. There is a large archive of tutorials and a very helpful forum.

The NanoBot

Posted by Matthew Fri, 17 Feb 2006 03:55:00 GMT

While reading lugnet recently, I stumbled upon an extremely interesting little robot. It’s creator says it best:

While waiting for the NXT system to come out, I decided to try my luck at making tiny robots… Often, when working, I would drop a SMT and have to take a magnifying glass to find it as it would get lost in the bits of filings, etc that were around the work area…

Believe it or not, this little guy is a sumo robot. When he senses he’s found, he runs full speed for the edge of the rink!

The Nanobot with a LEGO

Updating an LCD from an AVR controller

Posted by Matthew Fri, 03 Feb 2006 04:09:00 GMT

The good people over at E-DSP have churned out a comprehensive tutorial on how to use an lcd with your electronic devices. The Amtel AVR is their microcontroller of choice because of its cheap programmer. From pinouts to microcontroller code, they make it look easy. In a way it is.

AVR Microcontroller controlling an LCD

16 Channel serial servo controller

Posted by Matthew Sat, 07 Jan 2006 15:23:00 GMT

Ever wonder exactly how to use a servo motor? How about 16 of them from a single serial connection?

Make Magazine’s Blog dug up an interesting way to accomplish this. To update servo positions, a host sends a serial signal to an Amtel microcontroller. The Amtel remembers the positions and generates 16 different control signals. (One signal for each servo). The data is sent as follows:

  • Byte1 = Sync (255)
  • Byte2 = Servo# (0-15)
  • Byte3 = Position (0-254)

The host is either the serial port of a computer or a single pin of a master microcontroller. Therefore, a PC program similar to his own can be used to find the exact servo positions necessary for the application before the code is embedded on a microcontroller in the robot.

Schematics and code are included. Other than that you are on your own.