background image

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

Summary of Contents for ATmega324PB

Page 1: ...microcontroller Features Getting started with the ATmega324PB microcontroller and tools Getting started with Atmel ATmega324PB Xplained Pro Kit and Atmel Studio 7 This application note contains a list...

Page 2: ...io Microsite 7 1 5 Connecting the ATmega324PB Xplained Pro kit 7 1 5 1 Auto Board Identification of Xplained Pro Kit 8 1 5 2 Connect the ATmega324PB Xplained Pro UART to the EDBG COM Port 9 2 Creating...

Page 3: ...er Short interrupt latency four clock cycles Factory calibrated internal RC oscillator Security with fuses and lock bits Atmel QTouch Library support Compatibility between devices portability Peripher...

Page 4: ...the device such as Key Parameters Datasheet link to buy the device etc http www atmel com devices ATMEGA324PB aspx tab overview The Parameters tab provides the details of various configuration paramet...

Page 5: ...ts associated firmware if available The Applications tab provides the recommended application areas not limited to for this device http www atmel com devices ATMEGA324PB aspx tab applications The Tool...

Page 6: ...t related documents such as schematics and user guides http www atmel com tools ATMEGA324PB XPRO aspx tab documents Atmel AT06621 Getting Started with Atmel ATmega324PB APPLICATION NOTE Atmel 42626A G...

Page 7: ...getting started videos such as creating a new C GCC project debugging AVR applications debugging ARM applications etc are available http www atmel com Microsite atmel studio videos aspx 1 5 Connectin...

Page 8: ...ce Manager as displayed in the following screenshot Figure 1 5 Successful EDBG Driver Installation Open Atmel Studio Go to View Available Atmel Tools The EDBG should be listed in the tools as EDBG and...

Page 9: ...Device Manager to find the COM port number 3 Default COM port settings are 9600 baud N 8 1 The COM port settings can be changed by using the Device Manager Atmel AT06621 Getting Started with Atmel ATm...

Page 10: ...roject and click OK to get the Device Selection wizard Figure 2 2 New Project Wizard 3 The Device Selection wizard appears as shown in the following image Select the ATmega324PB device from megaAVR de...

Page 11: ...T has three registers DDRx PORTx and PINx The DDRx register is used to configure the port pin direction 1 Output 0 Input ATmega324PB Xplained Pro kit does not have pull ups connected and hence interna...

Page 12: ...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...

Page 13: ...tion for various products http www atmel com webdoc Atmel Gallery https gallery atmel com Production Selection Guide Atmel MCU Selector on http www atmel com Ordering Samples and Buying evaluation boa...

Page 14: ...Doc Rev Date Comments 42626A 03 2016 Initial document release Atmel AT06621 Getting Started with Atmel ATmega324PB APPLICATION NOTE Atmel 42626A Getting Started with Atmel ATmega324PB_AT06621_Applicat...

Page 15: ...ROFITS BUSINESS INTERRUPTION OR LOSS OF INFORMATION ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES Atmel makes no representa...

Reviews: