xyzio

Getting Started With The Atmel AVR Processor

with one comment

It has been a while since I worked on the Atmel AVR line of microcontrollers.   Things have changed since I last played around with them.  I did some digging to figure out how to start up again so here is a quick guide for those that are looking.

Step 1:

Pick a Atmel AVR MCU that fits your requirements. I’m doing a simple project so I picked the ATtiny26.

Step 2:

Buy, beg, borrow, or steal a AVR ISP a.k.a as the AVR In-System Programmer. There are schematics for home made programmers out there, I’ve had problems with bad solder joints and messed up connections with home made programmers so I avoid them.  Debugging is hard enough, a bad programmer is a problem you really don’t want to debug.

Step 3:

Wire up your AVR processor to the AVR ISP using the documentation provided with the ISP.  It is a matter of wiring up the MISO, MOSI, SCK, Reset, Vcc, and Ground pins and should take only a few minutes on a breadboard.

Step 4:

Now, on to the software.  Download and install WinAVR.  WinAVR  is a set of utilities that includes a port of GCC to the AVR family, AVR-GCC, and several helpful Unix utilities.

Step 5:

The last step is to to  download and install AVR Studio 4.  Get the latest version.  AVR Studio 4 has been updated to integrate with AVR GCC, you type your code in using C.  It generates the makefile needed to compile your code with AVR GCC and, if you are using the AVR ISP, will let you upload your code directly to your microcontroller.

To get started, start up AVR Studio and select ‘New Project.’  Select ‘AVR GCC’ as the project type and click Next.

Then, select your microcontroller and the debug platform.

I haven’t made significant progress on my ATTiny26 code, but if you wish, you can select the ATMega32 microcontroller/AVR Simulator and try out the code from my Binary Clock.

The debugger is pretty cool, besides stepping through the code, you can also view register states and modify variables on the fly.

Enjoy 🙂

Written by M Kapoor

December 24, 2009 at 5:53 am

Posted in microcontrollers

Tagged with ,

One Response

Subscribe to comments with RSS.

  1. I found some interesting resource for AVR at
    this site

    Jitkasem

    January 5, 2010 at 1:52 pm


Leave a reply to Jitkasem Cancel reply