background image

PDI Programming of AVR XMEGA

®

 Devices

JTAG Programming of megaAVR, AVR XMEGA, and AVR UC3 Devices

aWire Programming of AVR UC3 Devices

ISP and JTAG Programming of AVR Devices in External Target Systems

Flexible Routing and Socket Card System for Easy Mounting of all Supported Devices

Eight Push Buttons for General Use

Eight LEDs for General Use

All AVR I/O Ports are Easily Accessible through Pin Header Connectors

Expansion Connectors for Plug-In Modules and Prototyping Area

On-Board 4Mb DataFlash for Non-volatile Data

USB mini-AB (On-The-Go) Connector for AVR Devices with USB

PHY and DSUB-9 Connector for RS-232 Interface

PHY and DSUB-9 Connector for CAN Bus

PHY and Header for LIN Bus

Device Board with an ATmega2560 AVR Microcontroller Included

The STK600 User Guide describes how to power the kit, the detailed information on board components,
extension interface, and the hardware guide.

3.3 

Get Source Code from Atmel | START

The example code is available through Atmel | START, which is a web-based tool that enables
configuration of application code through a Graphical User Interface (GUI). The code can be downloaded
for both Atmel Studio 7.0 and IAR Embedded Workbench

®

 via the direct example code-link(s) below or

the 

BROWSE EXAMPLES

 button on the Atmel | START front page.

Atmel | START web page: 

http://microchip.com/start

Example Code

Finding example code for devices in the megaAVR 0-series, can be done by searching for the device
name, e.g. ATmega4809, in the Atmel | START example browser.

Press 

User guide

 in Atmel | START for details and information about example projects. The 

User guide

button can be found in the example browser, and by clicking the project name in the dashboard view
within the Atmel | START project configurator.

Atmel Studio

Download the code as an .atzip file for Atmel Studio from the example browser in Atmel | START, by
clicking 

DOWNLOAD SELECTED EXAMPLE

. To download the file from within Atmel | START, click

EXPORT PROJECT

 followed by 

DOWNLOAD PACK

.

Double-click the downloaded .atzip file and the project will be imported to Atmel Studio 7.0.

IAR Embedded Workbench

For information on how to import the project in IAR Embedded Workbench, open the Atmel | START user
guide, select 

Using Atmel Start Output in External Tools

, and 

IAR Embedded Workbench

. A link to the

Atmel | START user guide can be found by clicking 

About

 from the Atmel | START front page or 

Help And

Support

 within the project configurator, both located in the upper right corner of the page.

 AN2653

Get the Tools

©

 2018 Microchip Technology Inc.

 Application Note

DS00002653A-page 8

Summary of Contents for megaAVR 0 Series

Page 1: ...09 Xplained Pro and Atmel Studio 7 0 Introduction Author Irun Walberg Microchip Technology Inc This application note outlines how to get started with the megaAVR 0 series devices Refer to the data she...

Page 2: ...bench for AVR 9 3 6 Get Device Support 9 4 Atmel Studio Users Getting Started 10 4 1 Atmel Studio with ATmega4809 Xplained Pro 10 4 2 Atmel Studio with STK600 15 5 What s Next 21 6 Revision History 22...

Page 3: ...ion as these devices are fully pin and feature compatible Horizontal migration to the left reduces the pin count and therefore the available features Figure 1 1 megaAVR 0 Series Overview 48KB 32KB 16K...

Page 4: ...9 48 pin Datasheet pdf megaAVR 0 series Errata pdf The documentation for the megaAVR 0 series is split into three document types Manual includes all device independent descriptions of the device Datas...

Page 5: ...ION 3 HEADER ATmega4809 RESET BUTTON CURRENT MEASUREMENT HEADER SW0 USER BUTTON USER LED0 mikroBUS socket AVR DEBUG FOR EXTERNAL DEBUGGER ATECC508A CRYPTO DEVICE 32 768kHz Crystal TARGET VOLTAGE SELEC...

Page 6: ...VR Debug Connector with UPDI Embedded Debugger Auto ID for board identification in Atmel Studio One yellow status LED One green board power LED Symbolic debug of complex data types including scope inf...

Page 7: ...hip com ATSTK600 Get the kit http www microchipdirect com ProductSearch aspx Keywords ATSTK600 Document file STK600 User Guide pdf Key features AVR Studio 4 AVR32 Studio AVR Studio 5 Atmel Studio Comp...

Page 8: ...ia the direct example code link s below or the BROWSE EXAMPLES button on the Atmel START front page Atmel START web page http microchip com start Example Code Finding example code for devices in the m...

Page 9: ...sing the Device Pack Manager which is found under Tools Device Pack Manager For megaAVR 0 series update to the latest version by performing the following steps 1 Click Check for Updates 2 For megaAVR...

Page 10: ...B connector which is connected to the embedded debugger The kit will be powered by the USB and the embedded debugger will enable debugging and programming via the USB Workflow 1 Launch Atmel Studio 7...

Page 11: ...Atmel Studio 3 Start creating a new project by clicking New Project or by using the shortcut Ctrl Shift N as shown in the figure below AN2653 Atmel Studio Users Getting Started 2018 Microchip Technolo...

Page 12: ...ure below type in the name of the solution and project e g GETTING_STARTED and LED_TOGGLE and click OK Figure 4 3 New Project Wizard 5 Select ATmega4809 from the device selection wizard as shown in th...

Page 13: ...Configure SW0 as input PORTB DIRCLR PIN2_bm Configure LED0 pin as output PORTB DIRSET PIN5_bm while 1 Check the status of SW0 0 Pressed if PORTB IN PIN2_bm LED0 on PORTB OUTSET PIN5_bm 1 Released else...

Page 14: ...g Project Properties or by using the shortcut ALT F7 8 In the Tool view see the figure below set Selected debugger programmer to mEDBG and Interface to UPDI AN2653 Atmel Studio Users Getting Started 2...

Page 15: ...he code by clicking Debug Continue or by using the shortcut F5 12 Verify that LED0 is lit when SW0 is pushed on the ATmega4809 Xplained Pro 4 2 Atmel Studio with STK600 Prerequisites Atmel Studio 7 0...

Page 16: ...ure below type in the name of the solution and project e g GETTING_STARTED and LED_TOGGLE and click OK Figure 4 8 New Project Wizard 4 Select ATmega4809 from the device selection wizard as shown in th...

Page 17: ...g cables Configure PB0 as input remember to connect SW0 to PB0 using a cable PORTB DIRCLR PIN0_bm Configure PB1 as output remember to connect LED0 to PB1 using a cable PORTB DIRSET PIN1_bm while 1 Che...

Page 18: ...g Project Properties or by using the shortcut ALT F7 7 In the Tool view see the figure below set Selected debugger programmer to STK600 and Interface to UPDI AN2653 Atmel Studio Users Getting Started...

Page 19: ...onnect the embedded debugger on STK600 to ATmega4809 by connecting a cable between the ISP PDI headers as shown in the figure below Figure 4 12 UPDIConnection on STK600 10 Connect PB2 to SW0 and PB5 t...

Page 20: ...The application is programmed onto the device and the program execution should break in main 12 Run the code by clicking Debug Continue or by using the shortcut F5 13 Verify that LED0 is lit when SW0...

Page 21: ...ocumentation http www microchip com Atmel ICE_Debugger_User_Guide Buy http www microchip com developmenttools productdetails aspx partno atatmel ice Power debugger Documentation http www microchip com...

Page 22: ...6 Revision History Doc Rev Date Comments A 02 2018 Initial document release AN2653 Revision History 2018 Microchip Technology Inc Application Note DS00002653A page 22...

Page 23: ...nd follow the registration instructions Customer Support Users of Microchip products can receive assistance through several channels Distributor or Representative Local Sales Office Field Application...

Page 24: ...CryptoRF dsPIC FlashFlex flexPWR Heldo JukeBlox KeeLoq KeeLoq logo Kleer LANCheck LINK MD maXStylus maXTouch MediaLB megaAVR MOST MOST logo MPLAB OptoLyzer PIC picoPower PICSTART PIC32 logo Prochip De...

Page 25: ...ities in Chandler and Tempe Arizona Gresham Oregon and design centers in California and India The Company s quality system processes and procedures are for its PIC MCUs and dsPIC DSCs KEELOQ code hopp...

Page 26: ...hina Xiamen Tel 86 592 2388138 China Zhuhai Tel 86 756 3210040 India Bangalore Tel 91 80 3090 4444 India New Delhi Tel 91 11 4160 8631 India Pune Tel 91 20 4121 0141 Japan Osaka Tel 81 6 6152 7160 Jap...

Reviews: