background image

AMERICAS

ASIA/PACIFIC

ASIA/PACIFIC

EUROPE

Corporate Office

2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 480-792-7200
Fax: 480-792-7277
Technical Support:
http://www.microchip.com/
support
Web Address:
www.microchip.com

Atlanta

Duluth, GA
Tel: 678-957-9614
Fax: 678-957-1455

Austin, TX

Tel: 512-257-3370

Boston

Westborough, MA
Tel: 774-760-0087
Fax: 774-760-0088

Chicago

Itasca, IL
Tel: 630-285-0071
Fax: 630-285-0075

Dallas

Addison, TX
Tel: 972-818-7423
Fax: 972-818-2924

Detroit

Novi, MI
Tel: 248-848-4000

Houston, TX

Tel: 281-894-5983

Indianapolis

Noblesville, IN
Tel: 317-773-8323
Fax: 317-773-5453
Tel: 317-536-2380

Los Angeles

Mission Viejo, CA
Tel: 949-462-9523
Fax: 949-462-9608
Tel: 951-273-7800

Raleigh, NC

Tel: 919-844-7510

New York, NY

Tel: 631-435-6000

San Jose, CA

Tel: 408-735-9110
Tel: 408-436-4270

Canada - Toronto

Tel: 905-695-1980
Fax: 905-695-2078

Australia - Sydney

Tel: 61-2-9868-6733

China - Beijing

Tel: 86-10-8569-7000

China - Chengdu

Tel: 86-28-8665-5511

China - Chongqing

Tel: 86-23-8980-9588

China - Dongguan

Tel: 86-769-8702-9880

China - Guangzhou

Tel: 86-20-8755-8029

China - Hangzhou

Tel: 86-571-8792-8115

China - Hong Kong SAR

Tel: 852-2943-5100

China - Nanjing

Tel: 86-25-8473-2460

China - Qingdao

Tel: 86-532-8502-7355

China - Shanghai

Tel: 86-21-3326-8000

China - Shenyang

Tel: 86-24-2334-2829

China - Shenzhen

Tel: 86-755-8864-2200

China - Suzhou

Tel: 86-186-6233-1526

China - Wuhan

Tel: 86-27-5980-5300

China - Xian

Tel: 86-29-8833-7252

China - 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

Japan - Tokyo

Tel: 81-3-6880- 3770

Korea - Daegu

Tel: 82-53-744-4301

Korea - Seoul

Tel: 82-2-554-7200

Malaysia - Kuala Lumpur

Tel: 60-3-7651-7906

Malaysia - Penang

Tel: 60-4-227-8870

Philippines - Manila

Tel: 63-2-634-9065

Singapore

Tel: 65-6334-8870

Taiwan - Hsin Chu

Tel: 886-3-577-8366

Taiwan - Kaohsiung

Tel: 886-7-213-7830

Taiwan - Taipei

Tel: 886-2-2508-8600

Thailand - Bangkok

Tel: 66-2-694-1351

Vietnam - Ho Chi Minh

Tel: 84-28-5448-2100

Austria - Wels

Tel: 43-7242-2244-39
Fax: 43-7242-2244-393

Denmark - Copenhagen

Tel: 45-4450-2828
Fax: 45-4485-2829

Finland - Espoo

Tel: 358-9-4520-820

France - Paris

Tel: 33-1-69-53-63-20
Fax: 33-1-69-30-90-79

Germany - Garching

Tel: 49-8931-9700

Germany - Haan

Tel: 49-2129-3766400

Germany - Heilbronn

Tel: 49-7131-67-3636

Germany - Karlsruhe

Tel: 49-721-625370

Germany - Munich

Tel: 49-89-627-144-0
Fax: 49-89-627-144-44

Germany - Rosenheim

Tel: 49-8031-354-560

Israel - Ra’anana

Tel: 972-9-744-7705

Italy - Milan

Tel: 39-0331-742611
Fax: 39-0331-466781

Italy - Padova

Tel: 39-049-7625286

Netherlands - Drunen

Tel: 31-416-690399
Fax: 31-416-690340

Norway - Trondheim

Tel: 47-7289-7561

Poland - Warsaw

Tel: 48-22-3325737

Romania - Bucharest

Tel: 40-21-407-87-50

Spain - Madrid

Tel: 34-91-708-08-90
Fax: 34-91-708-08-91

Sweden - Gothenberg

Tel: 46-31-704-60-40

Sweden - Stockholm

Tel: 46-8-5090-4654

UK - Wokingham

Tel: 44-118-921-5800
Fax: 44-118-921-5820

Worldwide Sales and Service

©

 2018 Microchip Technology Inc.

 Application Note

DS00002653A-page 26

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: