Programming using AVR Studio
AVR studio is an Integrated Development Environment (IDE) developed by ATMEL for developing different embedded applications based on 8-bit AVR microcontroller. Before the installation of AVR Studio you have to install the compiler WinAVR. By installing WinAVR allow AVR Studio to detect the compiler.
Click on new project.
- First click on AVR GCC
- Configure the project name
- Select the project location
- Click on Next
- Click on AVR Simulator in left side of block and then select your microcontroller (For e.g. - ATmega16).
- Then click on finish button
- Write the code in main body area mention in above snapshot.
- Then save the project file.
- Go to project option as shown in above snapshot.
- Then click on configuration option.
- If you are using external crystal then write the crystal frequency in highlighted box present in above snapshot.
- Then check the checkbox corresponding for creating Hex file and then click on OK.
- Now save the project again.
- Go to build option -> Then Compile
- This will compile the code and generate the error if any.
For the first time compilation it will generate two errors, ignore them.
- Again go to build option and click on build.
- This operation will generate the hex file of a code
- Use this hex file for burning into your microcontroller using programmer.