–
In the example code demonstrated Button connected to pin PC6 is configured as input with
Pull-up enabled. Pin PC7 is connected to LED0 and configured as output.
–
Here the LED0 is controlled based on the Button status
–
As long the button is not pressed, the LED0 will not glow and on pressing the button the LED0
will glow
7.
To debug the project, go to
Project > Properties > Tool > Selected Debugger/Programmer
and
select the
Tool
as
EDBG
and
Interface
as
JTAG
.
Figure 2-5. Tool and Interface Settings
8.
To program and execute the application there are two options:
–
Start a debug session on the board, where the user will be able to program and debug
–
Program the generated .hex file into the controller and execute the application
Choose one of these options in Atmel Studio as shown in the following screen capture.
Figure 2-6. Start without Debugging
Figure 2-7. Start Debugging and Break
Atmel AT06621: Getting Started with Atmel ATmega324PB [APPLICATION NOTE]
Atmel-42626A-Getting-Started-with-Atmel-ATmega324PB_AT06621_Application Note-03/2016
12