Trabalhando com AVR Studio- (Parte 2/46)

Working with AVR Studio- (Part 2/46)

AVR studio is an integrated development environment (IDE) from ATMEL for developing applications based on an 8-bit AVR microcontroller. Before installing AVR Studio you must install the WinAVR compiler. This will allow AVR Studio to detect the compiler.
Step 1:

Captura de tela do menu Iniciar do Windows navegando para o AVR Studio 4

Fig. 1: Screenshot of Windows Start menu navigating to AVR Studio 4

Step 2

Step 2:

Captura de tela da janela Novo Projeto no AVR Studio 4

Fig. 2: Screenshot of the New Project window in AVR Studio 4

Click on new project

step 3

Step 3:

Captura de tela da criação de um novo projeto no AVR Studio 4

Figure 3: Screenshot of creating a new project in AVR Studio 4

Click on AVR GCC
Write the name of the project
Select your project location.
Click Next >>

Step 4

Step 4:

Captura de tela da seleção da plataforma de depuração e do dispositivo de destino no AVr Studio 4

Fig. 4: Screenshot of debug platform and target device selection in AVr Studio 4

Click on AVR Simulator in the left block and select your controller (for example: ATmega16).
Click on the finish button

Step 5

Step 5:

Captura de tela da janela principal do AVR Studio 4

Figure 5: Screenshot of the main AVR Studio 4 window

Write the code in the main body area.
Save the project file.

Step 6

Step 6:

Captura de tela da janela principal do AVR Studio 4

Fig. 6: Screenshot of the Project menu in AVR Studio 4

Go to PROJECT -> Configuration Options

Step 7

Step 7:

Captura de tela do menu Projeto no AVR Studio 4

Fig. 7: Screenshot of project options in AVR Studio 4

Write the frequency of the crystal if using external crystal.
Select the check box corresponding to Create hex file and click OK.
Save the project again.

Step 8

Step 8:

Captura de tela do menu Build no AVR Studio 4

Fig. 8: Screenshot of the Build menu in AVR Studio 4

Go to BUILD -> Compile.
This will compile your code and throw errors if any.
Captura de tela da construção de um projeto no AVR Studio 4

Fig. 9: Screenshot of building a project in AVR Studio 4

For the first time it will generate two errors, ignore them.

Step 9

Step 9:
Captura de tela do menu Build no AVR Studio 4

Fig. 10: Screenshot of the Build menu in AVR Studio 4

Again go to BUILD and click Build.
This will generate a hex file of the code.
Use this Hex file to write your microcontroller.
Where will you find the Hex file?
Just go to the location you selected at the beginning. Open this folder and you will find one more folder called Default. This is the default location where the hex file is generated.
While working in real time, if you want to change the code, make the changes and build the file again. This will automatically update the previous hex file.

Conteúdo Relacionado

A network of sensors is embedded in every vehicle,...
The motor controller is one of the most important...
ESP32-CAM is a compact camera module that combines the...
A evolução dos padrões USB foi fundamental para moldar...
A SCHURTER anuncia um aprimoramento para sua conhecida série...
A Sealevel Systems anuncia o lançamento da Interface Serial...
A STMicroelectronics introduziu Diodos retificadores Schottky de trincheira de...
Determinar uma localização precisa é necessário em várias indústrias...
O novo VIPerGaN50 da STMicroelectronics simplifica a construção de...
A Samsung Electronics, fornecedora de tecnologia de memória avançada,...
O mercado embarcado tem uma necessidade de soluções de...
You have probably come across the term ' drag...
You probably have a support insulator if you've noticed...
You've probably seen stand an insulator sit on power...
You've probably seen shackle insulators enthroned on electricity poles,...
You have probably experienced situations where controlling a circuit...
Back to blog

Leave a comment

Please note, comments need to be approved before they are published.