Learn Programming of AVR Microcontroller

So far we have seen, what microcontroller means? And what they are capable of? But now question is how you do get microcontroller to do something and answer is by programming. So let’s learn programming of AVR Microcontroller and understand nuts and bolts of the process. There are couples of things user need to do for getting microcontroller programmed,

  • Set up your computer for programming either on Windows or Linux (Install necessary compiler and flash tool)
  • Write program that tells chip what to do?
  • Compile program into machine code
  • Program the chip using programmer hardware, which transfers machine code into microcontroller
  • Test and Debug

AVR microcontroller has large number of fan followers due to free and inexpensive development tools available including reasonably priced development board and free development tools. In next part we will learn about software’s (Compiler) and Hardware (Programmer) and how one can make use of them to develop microcontroller based application. I recommend you please stick to article and follow in sequence to get better understanding about process.

Programming of AVR Microcontroller
Programming of AVR Microcontroller

Free Course Signup

Programming Tools

AVR microcontrollers are powerful enough to support high level programming language such as C efficiently. To write program in C for AVR or any other microcontroller we need a C compiler for that particular MCU. There are several c compiler which support AVR MCUs and in fact most of them are free for students and beginners. Those are listed below,

  • Atmel Studio 6
  • Eclipse
  • AVR-GCC  (GNU) Linux
  • WinAVR
  • AVRDude

You could choose any IDE from list to write your programs. Here in our tutorial we will be looking at Atmel Studio 6. Please follow video which will demonstrate you how to install and set up environment to start writing your first program.

AVR USB Programmer
AVR USB Programmer

A piece of hardware connected to the computer that programs AVR microcontroller is called AVR Programmer. Once you have done with writing & compiling your software application in AVR C. You need to load this output file which is hex file into microcontroller and that’s the role of programmer. There are several types of programmer available in market for example: AVR USB Programmer (USBasp), AVR Pocket Programmer (USB Tiny ISP), AVR ISP mkII, AVR ISP mkIII…..etc etc and so on…

If you are one like me then you might be interested In USBasp firmware based AVR USB Programmer which is open source and even you could make your own if you want.

Please follow the video provided down below which will walk you through all details about procedure to make things work.

I hope you will find this post educational and entertaining. In next tutorials, we will look at ready to go example with respect to each peripheral of ATmega32A Microcontroller.

Get Free Courses & Webinars
You'll receive only high quality learning material, tips & tricks
I agree to have my personal information transfered to MailChimp ( more information )
We respect your privacy

About Umesh Lokhande


Register | Lost your password?