All of the biggest technological inventions created by man - the airplane, the automobile, and the computer - says little about his intelligence, but speaks volumes about his laziness. ~Mark
How to Start Working with an AVR MicrocontrollerDeborshi Saha (3rd Yr, ECE)
What are AVR microcontrollers?
AVR microcontrollers are one of the many series launched by ATMEL Corporation. AVR microcontrollers are RISC based. i.e. Reduced Instruction Set Computer. For the starters they are the best available in the market and it solves many purposes as far as students and hobbyists are concerned.
It’s really easy to use and its applications will intrigue you even more. And keep browsing for more and more application/projects of AVR Atmega microcontrollers. I have worked with AVR Atmega8, AVR Atmega16, AVR Atmega32, and AVR Atmega8535.
Since all have the same RISC structure so variants of AVR microcontrollers won’t worry you much. Just learn to work with any one microcontroller.
How to start working with AVR microcontrollers?
REMEMBER: Datasheet of any microcontroller is your best guide
(Datasheet of Atmega 8535). If you don’t know how to use any feature of microcontroller just look into the datasheet and you can write your own code to use that feature.
An AVR microcontroller has a Flash memory and EEPROM .We will burn the program in the flash memory.
When a microcontroller is powered the program counter starts at 0000 address of flash memory. The program that will be written in the flash memory would be a hex file (generated by software itself corresponding to the code you write). To write a program in flash memory you would need a ‘programmer circuit ’.A programmer circuit interfaces AVR microcontroller with the PC .It can be through parallel port , serial port .
A programmer circuit utilizes MOSI , MISO(Master in Slave Out) , RESET, SCK and programs the microcontroller through MOSI (Master out Slave in )and MISO pins. The pin connections of these microcontroller pins with port pins are different for every programmer.
Do in depth study to know more about MISO MOSI pins. For the time being keep it in mind that while programming, microcontrollers are slave to the PC and will work on the clock generated by the PC. To learn more about programming microcontrollers look into DATASHEET of the microcontroller.
I have worked with BASCOM and AVR Studio.
Bascom and AVR Studio has its own programmer circuit which will make it easy for you to write code, compile, run, simulate and burn code in the microcontroller in the same window.
The PC parallel port programmer that you can use is Sp12 (if you are not using any of BASCOM or AVR studio programmers).
If you want to program the microcontroller using C language then:
Download WINAVR (pronounced ‘whenever’) and AVR Studio 4.13. First install WINAVR and THEN AVR studio.
If you want to program the microcontroller using Basic language then:
Download BASCOM – AVR from mcselec.com
While programming the microcontroller using C, the code is compiled by AVR-GCC (which is automatically installed while installing WINAVR).
HAPPY MICROCONTROLLING!!