Menu:

AVR Microcontroller tutorial

This is a tutorial for AVR microcontrollers using the Arduino Duemilanove board with the AtMega328 controller (see image). Instead of using the usual Arduino IDE, this tutorial focuses on 'real' C, so you need WinAVR for compiling and AVRStudio as an editor. Ofcourse, it is also possible to do the assignments without the board, but programming and interfacing the microcontroller is a tad more work. I recommend just buying the Arduino board if you want to experiment with Atmel microcontrollers. For the pinout on the Arduino board, see this reference sheet.

The command for programming an Arduino Duemilanove is:

avrdude -patmega328p -c arduino -P\\.\%AVR_COMPORT% -b57600 -D -Uflash:w:./default/app.hex

Where %AVR_COMPORT% is your Arduino COM-port number (ie. COM2).

Click on a chapter to start reading or click on the image for more information about the Arduino development board.

Note: the Arduino Atmel is preconfigured with a bootloader to enable USB programming. Therefore, normal Atmel Atmega 328 microcontrollers will not work and nor should you erase this bootloader.