Atmel AVR1926: XMEGA-B1 Xplained Getting Started Guide Features • Easy to reprogram with just a USB cable and a preprogrammed boot loader • Easy to debug code with PDI-based debugger/emulator • Can be used with Atmel® AVR® STK®600, Atmel AVR JTAGICE 3, ATMEL AVR JTAGICE mkII, and Atmel AVR ONE! 8-bit Atmel Microcontrollers Application Note 1 Introduction The Atmel AVR XMEGA®-B1 Xplained evaluation kit is a hardware platform for evaluating the Atmel ATxmega128B1 microcontroller.
What is needed to get started? To be able to run the preprogrammed code, you need the Atmel AVR XMEGA-B1 Xplained evaluation kit and a USB cable (Standard-A to Mini-B according to USB.org) to connect the board to a PC. To modify the example code or to write new code and compile it, you need a toolchain for Atmel AVR microcontrollers and an integrated development environment (IDE) to edit and debug code. In Atmel AVR Studio® 5, Atmel provides an IDE and the Atmel AVR GNU Toolchain.
Atmel AVR1926 2.4 Toolchain In order to build an application from the source code, a toolchain is needed, which includes required tools such as an assembler, compiler, and linker. The code for this kit is compatible with the Atmel AVR GNU and IAR AVR toolchains. 2.4.1 AVR Assembler 2 Integrated in Atmel AVR Studio 5 is the Atmel AVR assembler. The assembler works on source files containing instruction mnemonics, labels and directives.
2.5.3 AVR ONE! Atmel AVR ONE! is a high-end debug/programming tool that can be used for programming and debugging of Atmel 8-bit and 32-bit AVR microcontrollers and kits including the Atmel AVR XMEGA-B1 Xplained kit. AVR ONE! (on-chip programming and debugging tool) http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4279 2.6 FLIP Atmel FLIP (FLexible In-system Programmer) is a flexible PC-application which lets the user program and configure Atmel's microcontroller devices in-system.
Atmel AVR1926 3 Board overview Figure 3-1 shows the features available on the board. For more information on the Atmel AVR XMEGA-B1 Xplained hardware, take a look at the Atmel application note AVR1912: XMEGA-B1 Xplained Hardware User’s Guide. Figure 3-1. Overview of the XMEGA-B1 Xplained kit.
4 Connecting the board 4.1 Power Connect a USB cable between the board and a PC or a USB power supply to power it up. That is all that is needed. When power is applied, the Power LED will light up green. WARNING Do not power the board without having the jumper attached next to the USB connector or an ammeter mounted. Otherwise, the device may be damaged by power sourcing through I/O pins. The power measurement header is located next to the USB connector, as shown in Figure 3-1. 4.
Atmel AVR1926 4.3 Connecting AVR JTAGICE mkII The grey connector on the Atmel AVR JTAGICE mkII probe has to be used when connecting to the Atmel AVR XMEGA-B1 Xplained board. See Figure 4-2 for reference on how to make this connection. Figure 4-2. Connecting the AVR JTAGICE mkII to the XMEGA-B1 Xplained board. 4.4 Connecting AVR ONE! Standoff Adaptor nr.3 JTAG/ISP ref. A08-0254. The green standoff adaptor nr.3 (ref.
Figure 4-3. Connecting the Atmel AVR ONE! debugger to the Atmel AVR XMEGA-B1 Xplained board.
Atmel AVR1926 5 Programming the kit Both preprogrammed DFU boot loader and application software are provided in the Atmel AVR XMEGA-B1 Xplained kit. To program your own application, two ways are proposed: 1. Programming via Atmel AVR Studio 5 and Atmel AVR tools. 2. Programming via the DFU boot loader. 5.1 Programming via AVR Studio tools Invoke AVR Studio 5. Select “AVR Programming” in “Tools” menu.
5.2 Programming via the DFU boot loader This method of programming allows the application and the boot loader to coexist. The preprogrammed DFU boot loader is located in the “Boot Loader Flash Section” of the on-chip flash memory; it manages the USB communication protocol and mainly performs read/write operations to the on-chip memories (flash/EEPROM).
Atmel AVR1926 • Open the USB port to connect to the target • Select the hexadecimal file to load NOTE The Atmel AVR XMEGA-B1 Xplained Demonstration hexadecimal file is available in the application note: AVR1619: XMEGA-B1 Xplained Demonstration. • Select the ‘Erase’, ‘Blank Check’, ‘Program’ and ‘Verify’ operation check boxes. Then press the ‘Run’ button. You should get confirmation in the bottom section of the window that the flash was successfully programmed and verified.
• Check that the application works (ex: a welcome message on the LCD) 5.2.3 Restoring the boot loader When the boot loader has been erased, it can be restored with any of the previously mentioned AVR programming tools. The Atmel ATxmega128B1 DFU boot loader hexadecimal file is available in the application note: AVR1916 - AVR ATxmega USB DFU Bootloader. Figure 5-2. ATxmega128B1 fuses configuration. NOTE 12 The boot loader section is protected, and can only be erased with an external programmer.
Atmel AVR1926 Figure 5-3. Atmel ATxmega128B1 boot loader programming. NOTE You should get confirmation in the bottom section of the window that the flash was successfully programmed and verified.
6 Example applications Several examples are available in ASF included in the Atmel AVR Studio 5: http://www.atmel.com/microsite/avr_studio_5/default.asp?category_id=163&family_id =607. Each example has full source code with documentation to get started quickly. The examples can be compiled by using either GCC (included in AVR Studio 5) or IAR compilers. 6.
Atmel AVR1926 7 References Atmel AVR Xplained http://www.atmel.com/products/AVR/xplain.asp?category_id=163&family_id=607 Atmel AVR Studio 5 http://www.atmel.com/microsite/avr_studio_5/default.asp?category_id=163&family_id =607 7.1 IAR Compiler This is a commercial C/C++ compiler available for Atmel AVR 8-bit MCUs. A 30-day evaluation version as well as a 4k (code size limited) kick-start version is available from the IAR website: IAR Embedded Workbench for Atmel AVR http://www.iar.com/website1/1.0.1.
EVALUATION BOARD/KIT IMPORTANT NOTICE This evaluation board/kit is intended for use for FURTHER ENGINEERING, DEVELOPMENT, DEMONSTRATION, OR EVALUATION PURPOSES ONLY. It is not a finished product, and may not (yet) comply with some or any technical or legal requirements that are applicable to finished products, including, without limitation, directives regarding electromagnetic compatibility, recycling (WEEE), FCC, CE, or UL (except as may be otherwise noted on the board/kit).
Atmel AVR1926 8 Table of contents Features ............................................................................................... 1 1 Introduction ...................................................................................... 1 2 What is needed to get started?....................................................... 2 2.1 Documentation for XMEGA-B1 Xplained ............................................................ 2 2.2 Atmel AVR Software Framework..........................................
Atmel Corporation 2325 Orchard Parkway San Jose, CA 95131 USA Tel: (+1)(408) 441-0311 Fax: (+1)(408) 487-2600 www.atmel.com Atmel Asia Limited Unit 01-5 & 16, 19F BEA Tower, Milennium City 5 418 Kwun Tong Road Kwun Tong, Kowloon HONG KONG Tel: (+852) 2245-6100 Fax: (+852) 2722-1369 Atmel Munich GmbH Business Campus Parkring 4 D-85748 Garching b. Munich GERMANY Tel: (+49) 89-31970-0 Fax: (+49) 89-3194621 Atmel Japan 9F, Tonetsu Shinkawa Bldg.