How to start with ATmel AVR Studio 4- step by step

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInPin on PinterestShare on TumblrPrint this page
To getting start with Atmel Studio 4, you have to install AVR Gcc & ATmel AVR Stduio 4… 

  1.  AVR Studio 4:  AVR studio professional is most commonly used software to program the AVR Microcontrollers due to its ease to use. It support Embedded C Language.  
    Coding & debugging in a high level language (like c/ java) is done with assembler. A compiler for high level language helps to reduce production time. To program the microcontroller, the WinAVR is used. 
  2. WinAVR :WinAVr is a suit of executable, open source software development tools for the ATmel AVR series of RISC microcontrollers. It includes the GNU GCC compiler for C & C++. WinAVR includes AVR-Gcc, AVR-GDB (debugger) etc. A .hex is generated for the “C” language program & then this hex file burn to the flash memory of the microcontroller. Our last post “LED Glow using ATmega32 step by step“How to glow led using ATmel ATmega32 is example of this process.

or you can get all software links here… 

After installing the WinAVR & ATmel AVR Studio 4, Open the AVR Studio 4 software in PC/ Laptop &  follow the step by step instruction. 


Step 1- In the menu bar, under the Project menu, select the New Project wizard as shown in given image:-

Step 2- Now in the dialog box, it shows tow options, one fort ATmel AVR Assembler & another AVR GCC. Select AVR GCC to program microcontroller in Embedded C language. 

Step 3- In the space provided for project name, write the name of project name but do not enter space between any words with in name as shown in image given below: 
Step 4- Click on select “create folder” by selecting the button, it create the separate program folder for your new project. 

Step 5- Select the new location to store new program folder & then click on “next” button. 
Step 6- In the dialog box, there is option to select debug platform & device. In the debug option, select “AVR Simulator” & on right of the dialog box, select the the device/ Microcontroller which you want to program link shown in figure atmega32. 
Step 7- Click on “finish” option in dialog box. 
Step 8- The workspace will be opened where program is to be written in “Embedded C” language shown in image. next window is your programming window where you can write the program. 

Step 9- After writing the code, under the build option in the menu bar, select the “build & run” option. 
Step 10- After clicking on “build & run” option, if the program runs without any error, then AVR Studio debug the code & create the .hex file (.hexadecimal) in the same folder which was created in step4. If there is any error in program, correct the error in code & compile again. 
Step 11- In the option “I/O View” on the right side of the screen as shown in given image, the status of each register & Port values can be checked. 
This program has taken from the book “Embedded System based on ATmega Microcontroller” chapter no 7, ATmega interfacing with led.

Feel free to suggest or post your query for any problem. 

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInPin on PinterestShare on TumblrPrint this page