We have developed a complete guide to learn AVR microcontroller – a tutorial which teaches the architecture,pin diagram,how to program an avr micro controller, how to work with ADC of avr, how to work with SPI of avr,interfacing LCD with avr, the avr gcc library, how to work with external interrupts, how to establish a USART communication etc. We have also developed a simple project to try your hands on – a frequency counter circuit built using Avr Atmega8. The whole series of articles for this tutorial were developed by our young author Rakesh Bute. We owe him a million thanks for the invaluable effort he had put into developing this complete guide to learn Avr microcontrollers.
Chapter 1:- AVR Microcontroller – An Introduction to Atmega32
This chapter gives you an introduction to Avr microcontrollers. Atmega32 is an 8 bit controller in the avr series, manufactured by Atmel corporation. In this chapter, you will learn about pin diagram of atmega32, pin configurations, pin numbers, architecture of atmega32, digital I/O pins, internal ADC of avr, 3 timers of avr. In addition, a link to datasheet of atmega32 for further reference is available.
Chapter 2:- How to work with Avr Studio? Compiler and IDE for Avr series microcontrollers
This chapter gives you introduction to compiler and IDE for Avr series micro controllers. You can learn about Avr Studio 4 and Avr Studio 5. You will also learn about the micro controllers supported by Avr Studio 4 & 5. In addition you can get some information about writing programs in assembly language, in embedded C etc.
Chapter 3:-How to burn your programs to Avr Atmega 32 controller ? Make your own In System Programmer
To make a micro controller work like your wish, you must first write a program for it (that’s why you learned about compilers and IDE in Chapter 2). Then you should load the program to your controller. You can do it using your PC, a burning hardware (called as programmer circuit) and a special software which facilitates communication between your PC and your burning hardware. In this chapter you will learn all about this – how to burn a program to your Avr controller, how to make an ISP (In System Programmer) for your Avr Atmega32, how to use ponyprog software to download programs from your PC to your Avr controller etc.
Chapter 4:- AVR GCC Library Overview
In Chapter 2, you will learn about the compiler for Avr micro controller Avr Studio. In this chapter you will learn about the important header files that you can use in Avr Studio.The compiler Avr Studio is optimized almost to ANSI C standards. This makes programming for Avr quiet easy for any one who is good in C language (Embedded C).
Chapter 5:- An introduction to Atmega8
Atmega8 is another microcontroller from Avr family which is much similar to Atmega32 in features but is cheap in cost. In this chapter, you can learn about the pin diagrams, similar features of Atmega32 and Atmega8, internal architecture,I/O pins, interrupts, timers, communication methods etc.
Chapter 6:- How to handle digital input/output(I/O) in Avr controllers
Digital I/O (input/output) is the most basic thing of any micro controller. In this chapter, you will learn about the use of digital input/output in Avr micro controllers. It is explained with the help of a basic circuit which can glow a couple of LED’s. You will find 4 basic programs written in embedded C that makes use of digital I/O in Avr controllers. So in this chapter you will find program to blink an LED (with a delay), program to light an LED using push button switch, program to generate sequence for driving a stepper motor & program to read a key press (key debouncing).
Chapter 7:- How to interface LCD display to Avr Microcontroller
In this chapter you will learn to interface LCD display with Avr microcontroller. The author has given circuit diagrams to interface LCD to both Atmega8 and Atmega32 controllers. Programs necessary for interfacing LCD with Avr are developed using embedded C. Towards the end of this chapter you will see some real life pictures of “interfacing LCD with Avr”. You can also find a link to an article about LCD Displays. This note on LCD displays will teach you gain a lot of in depth knowledge about character LCD displays.
Chapter 8:- The standard library and String formatting in Avr
This chapter is more like a continuation of chapter 4 (Avr Gcc library overview). In this chapter you will learn about the standard library functions like printf, scanf etc. The same program of LCD interfacing is used here to explain the concepts. So you must follow chapter 7 to get an idea of this chapter.
Chapter 9:- How to work with 32K crystal and Avr microcontroller
In some cases it will be necessary to add an external crystal to the micro controller, especially to make applications that require precision timing. This chapter teaches you to add an external 32K crystal to your Atmega8 controller. You can see a video of the circuit realized in practice.
Chapter 10:- How to work with Serial Peripheral Interface (SPI) in Avr Microcontrollers
This chapter teaches you how to use the SPI (serial peripheral interface) in Avr controllers to facilitate serial communication between devices. In this chapter you can learn about how to setup a transmitting and receiving system and how to effectively setup a communication between the systems. An example is shown with circuit diagram and program, in which a string of characters is send to an LCD for displaying.
Chapter 11:- How to establish a communication between PC and Avr controllers using USART
In this chapter you will learn about establishing a communication between your personal computer and your Avr Atmega8 using USART module. USART is the acronym for Universal Synchronous Asynchronous Transmitter and Receiver and is one of the earlier developed communication protocols.
Chapter 12:- How to work with external interrupts in Avr microcontroller
In this chapter you will learn about “external interrupts” and how to work with them in Avr. You will learn to write ISR (interrupt service routines) for particular type of interrupt events, how to write the program in C language etc.
Chapter 13:- How to work with ADC unit in Avr Microcontrollers
The Avr controllers we used in these tutorials, Atmega8 and Atmega32 comes with a built in ADC. In this chapter you will learn how to work with the internal ADC of Avr controllers.
So here we finish the Avr microcontroller tutorial in 13 chapters. We know, its not a complete tutorial. But we will work to refine all these articles by adding more relevant information and experiments. So please keep referring this tutorial in future. We are adding a simple project using Avr controllers, in which you can apply the knowledge you have acquired from these tutorials.