Microchip Technology ATmega328PB Xplained Mini User Manual

ATmega328PB Xplained Mini
ATmega328PB Xplained Mini

Preface

This user guide describes how to get started with the ATmega328PB Xplained Mini evaluation kit. The evaluation kit is a hardware platform to evaluate the ATmega328PB microcontroller. The on-board mini embedded debugger provides seamless integration with Atmel Studio. The kit provides access to the features of the ATmega328PB enabling easy integration of the device in a custom design.
© 2017 Microchip Technology Inc.
DS50002660A-page 1
ATmega328PB Xplained Mini

Table of Contents

Preface............................................................................................................................ 1
1. Introduction................................................................................................................4
1.1. Features....................................................................................................................................... 4
1.2. Board Overview............................................................................................................................4
2. Getting Started.......................................................................................................... 6
2.1. Xplained Mini Quick Start............................................................................................................. 6
2.2. Design Documentation and Related Links................................................................................... 6
2.3. Programming and Debugging...................................................................................................... 6
2.3.1. Programming the Target Using mEDBG........................................................................6
2.3.2. Debugging the Target Using mEDBG............................................................................8
2.3.3. Programming the Target Using an External Programmer..............................................9
2.3.4. Programming the ATmega32U4 Using an External Programmer..................................9
2.3.5. Programming the ATmega32U4 Using a Bootloader...................................................10
3. Xplained Mini........................................................................................................... 11
3.1. Mini Embedded Debugger..........................................................................................................11
3.1.1. Xplained Mini Clock Output..........................................................................................11
3.2. mEDBG Configuration................................................................................................................12
3.2.1. mEDBG Low Power Modes.........................................................................................12
3.2.2. mEDBG Fuse Filter......................................................................................................12
3.2.3. mEDBG Command Line Interface............................................................................... 13
3.2.4. Super User Fantastic Feature Enable Register........................................................... 14
3.3. mEDBG Firmware Upgrade and Manual Bootloader Entry........................................................14
4. Hardware User Guide..............................................................................................16
4.1. Power Sources...........................................................................................................................17
4.2. Board Assembly......................................................................................................................... 18
4.2.1. Connecting an Arduino Shield..................................................................................... 18
4.3. Target Headers and Connectors................................................................................................ 18
4.3.1. Target Digital I/O..........................................................................................................18
4.3.2. Board Power Header................................................................................................... 19
4.3.3. Target Analog I/O.........................................................................................................20
4.3.4. Target Programming.................................................................................................... 20
4.3.5. Target Additional I/O.................................................................................................... 20
4.4. Target Peripherals...................................................................................................................... 21
4.4.1. Push Button................................................................................................................. 21
4.4.2. User LED..................................................................................................................... 21
4.4.3. QTouch Buttons........................................................................................................... 22
4.5. mEDBG...................................................................................................................................... 22
4.5.1. mEDBG COM Port Connection................................................................................... 22
4.5.2. mEDBG JTAG Interface...............................................................................................23
4.6. Extension Header Area.............................................................................................................. 23
4.7. Factory Programmed..................................................................................................................24
© 2017 Microchip Technology Inc.
DS50002660A-page 2
ATmega328PB Xplained Mini
5. Hardware Revision History and Known Issues........................................................25
5.1. Identifying Product ID and Revision........................................................................................... 25
5.2. Revision 4...................................................................................................................................25
5.3. Revision 3...................................................................................................................................25
5.3.1. Engineering Samples...................................................................................................27
5.3.2. Touch Slider.................................................................................................................27
6. Document Revision History..................................................................................... 29
The Microchip Web Site................................................................................................ 30
Customer Change Notification Service..........................................................................30
Customer Support......................................................................................................... 30
Microchip Devices Code Protection Feature................................................................. 30
Legal Notice...................................................................................................................31
Trademarks................................................................................................................... 31
Quality Management System Certified by DNV.............................................................32
Worldwide Sales and Service........................................................................................33
© 2017 Microchip Technology Inc.
DS50002660A-page 3

1. Introduction

1.1 Features

The ATmega328PB Xplained Mini evaluation kit provides a development platform for the ATmega328PB.
Key Features
On-board debugger with full source-level debugging support in Atmel Studio
Auto-ID for board identification in Atmel Studio
Access to all signals on the target MCU
One green mEDBG status LED
One yellow user LED
One mechanical user push button
Two QTouch® buttons
Virtual COM port (CDC)
External target CLK 16 MHz at 5V, 8 MHz at 3.3V
USB powered
3.3V regulator
Arduino shield compatible footprints
Target SPI bus header footprint
Xplained Pro extension headers can easily be strapped in
ATmega328PB Xplained Mini

1.2 Board Overview

A brief overview of the default kit configuration, headers, and connectors.
© 2017 Microchip Technology Inc.
DS50002660A-page 4
Digital I/O Low (J201)
Digital I/O High (J200)
Power (J202)
Analog I/O (J203)
PC4
PC5
mega328PB
Power
Ground
Target I/O
Shared I/Os
QTouch Buttons
PC3
PC2
PC1
PC0
VIN
GND
5V
GND
3V3
RESET
VCC
NC
PD0
PD1
PD2
PD3
PD4
PD5
GND
PD6
PD7
PB0
PB1
PB2
PB3
PB4
PB5
AREF
PC4
PC5
LED / ISP (J204)
CDC TX
CDC RX
External
Clock
SPI
(J204)
CDC UART
(J104)
mEDBG
(ATmega32U4)
Power source
(J300)
Micro USB
Connector
Target power
(J301)
Status
LED
PB5PB7
User
LED
User
button
ISP (J204)
ISP (J204)
ANALOG (J203)
ANALOG (J203)
DIGITAL J200
DIGITAL J200
ATmega328PB Xplained Mini
Figure 1-1. ATmega328PB Xplained Mini Headers and Connectors
Table 1-1. Default Configurations
Function Default configuration Other settings
Kit power source (J300) 5.0V USB powered External input VIN
(1)
Target power (J301) 5.0V USB powered 3.3V from on-board regulator
Internal oscillator
(3)
ATmega328PB clock 16 MHz mEDBG clock
Info: 
Changing the default settings require modification of the kit using a soldering iron.
1. Details on how to change the power settings are described in Power Sources.
2. Details on the mEDBG clock are described in Xplained Mini Clock Output.
3. Debugging through debugWIRE may be disabled if the internal oscillator is used.
(2)
(1)
© 2017 Microchip Technology Inc.
DS50002660A-page 5

2. Getting Started

2.1 Xplained Mini Quick Start

Steps to start exploring the Xplained Mini platform:
1. Download Atmel Studio.
2. Launch Atmel Studio.
3. Connect a USB cable (Standard-A to Micro-B or Micro-AB) between the PC and the USB port on the kit.
ATmega328PB Xplained Mini
When the Xplained Mini kit is connected to your computer for the first time, the operating system will perform a driver software installation. The driver file supports both 32- and 64-bit versions of Microsoft Windows® XP, Windows Vista®, Windows 7, Windows 8, and Windows 10. The drivers for the kit are included with the Atmel Studio.
Once the Xplained Mini board is powered the green status LED will blink and Atmel Studio will autodetect which Xplained Mini board is connected. Atmel Studio will present relevant information like data sheets and kit documentation. The ATmega328PB device is programmed and debugged by the on-board Mini Embedded Debugger and therefore no external programmer or debugger tool is required.

2.2 Design Documentation and Related Links

The most relevant documents and software for the evaluation kit are available here:
ATmega328PB Xplained Mini website - Kit information, latest user guide, and design documentation.
ATmega328PB Xplained Mini on Microchip Direct - Buy this kit on microchipDIRECT.
Atmel Studio - Free IDE for the development of C/C++ and assembler code for microcontrollers.
Xplained products - Xplained evaluation kits are a series of easy-to-use evaluation kits for Microchip microcontrollers and other Microchip products.
Xplained Nano - used for low pin-count devices and provides a minimalistic solution with
access to all I/O pins of the target microcontroller.
Xplained Mini - used for medium pin-count devices and adds Arduino Uno compatible header
footprint and a prototyping area.
Xplained Pro - used for medium to high pin-count devices that features advanced debugging
and standardized extensions for peripheral functions.
®
Note:  All the above kits have on-board programmers/debuggers, which creates a set of low-cost boards for evaluation and demonstration of features and capabilities of different Microchip products.
Atmel Spaces - Open Source projects for Xplained Mini.
QTouch® tools - A collection of tools to design capacitive touch applications.
http://start.atmel.com/ - Atmel START is an online tool that helps the user to select and configure software components and tailor your embedded application in a usable and optimized manner.

2.3 Programming and Debugging

2.3.1 Programming the Target Using mEDBG

Using the Embedded Debugger on the ATmega328PB Xplained Mini board to program the ATmega328PB.
© 2017 Microchip Technology Inc.
DS50002660A-page 6
ATmega328PB Xplained Mini
1. Connect the Xplained Mini USB to the PC.
2. Go to Atmel Studio: Click the Tools tab, select Device Programming, and select the connected mEDBG as Tool with Device as ATmega328PB and Interface to ISP, click Apply.
3. Select "Memories", locate the source .hex or .elf file, and click Program.
4. NOTE: If a previous debug session was not closed by selecting "Disable debugWIRE and Close" in the Debug menu, the DWEN fuse will be enabled and the target will still be in debug mode, i.e. it will not be possible to program the target using the ISP interface.
5. If the source file contains fuse settings, select "Production file" and upload the .elf file to program the fuses.
6. Select "Fuses" to program the fuses manually. Set the fuse(s) and click "Program". Recommended fuse settings:
© 2017 Microchip Technology Inc.
DS50002660A-page 7

2.3.2 Debugging the Target Using mEDBG

Using the Embedded Debugger on the ATmega328PB Xplained Mini board to debug the ATmega328PB via debugWIRE.
ATmega328PB Xplained Mini
1. Start Atmel Studio.
2. Connect the Xplained Mini USB to the PC.
3. Open your project.
4. Click the "Project" tab and select the project "properties", click the "Tools" tab, and select mEDBG as debugger and debugWIRE as interface.
5. Click the "Debug" tab and select "Start Debugging and Break".
6. Atmel Studio will display an error message if the DWEN fuse in the ATmega328PB is not enabled, click YES to make Studio set the fuse using the ISP interface.
7. A debug session is started with a break in main, the debugging can start.
8. To exit debug mode, select "Disable debugWIRE and Close" in the Debug tab. This will disable the DWEN fuse.
© 2017 Microchip Technology Inc.
DS50002660A-page 8
ATmega328PB Xplained Mini
Info: 
If debug mode is not exited by selecting "Disable debugWIRE and Close" in the Debug menu, the DWEN fuse will be enabled and the target will still be in debug mode, i.e. it will not be possible to program the target using ISP.
If any other CPU CLK than the external CLK supplied by the mEDBG is used, the debugWIRE is not guaranteed to work.
Applying a signal to J202/RESET (the RESET_SENSE signal) while debugging may result in unexpected behavior. This signal is NOT available during a debugging session because the RESET line is actively used by the debugWIRE interface.

2.3.3 Programming the Target Using an External Programmer

How to program the target ATmega328PB using the AVR® JTAGICE mkII, JTAGICE3, Atmel-ICE, or other programmers.
1. Connect the External Programmer USB to the PC.
2. Connect the External Programmer to the ATmega328PB Xplained Mini board ISP connector.
3. Go to Atmel Studio: Click the Tools tab, select Device Programming, and select the External Programmer connected as Tool with Device as ATmega328PB and Interface to ISP, click Apply.
4. Select "Memories", locate the source .hex or .elf file, and click Program.

2.3.4 Programming the ATmega32U4 Using an External Programmer

How to program the ATmega32U4 using the AVR JTAGICE mkII, JTAGICE3, Atmel-ICE, or other programmers.
1. Connect the External Programmer USB to the PC.
2. Connect the External Programmer to the ATmega328PB Xplained Mini board JTAG connector.
3. Go to Atmel Studio: Click the Tools tab, select Device Programming, and select the connected mEDBG as Tool with Device as ATmega32U4 and Interface to JTAG, click Apply.
4. Select "Memories", locate the source .hex or .elf file, and click Program.
5. Select "Fuses" to program the fuses manually. Set the fuse(s) and click "Program". Recommended fuse settings:
© 2017 Microchip Technology Inc.
DS50002660A-page 9
ATmega328PB Xplained Mini
Warning:  Changing the firmware in the ATmega32U4 will remove the programming and
debugging capabilities of the mEDBG. If the EEPROM is altered the mEDBG may not be recognized by Atmel Studio anymore.

2.3.5 Programming the ATmega32U4 Using a Bootloader

This section describes how to use the bootloader to program the ATmega32U4.
1. Launch Atmel Studio.
2. Short strap J102.
3. Open the programming dialog, select the bootloader in the tool menu.
4. Connect the ATmega328PB Xplained Mini board USB connector to the PC.
5. Select Device = ATmega32U4 (Device - Select).
6. Select USB communication (Ctrl+U).
7. Select the memory area to program (use the toggle memory button).
8. Select Load Hex file (Ctrl+L).
9. Select Programming Options.
10. Click "Run", observe the status in the status field.
Warning:  Changing the firmware in the ATmega32U4 will remove the programming and debugging capabilities of the mEDBG. If the EEPROM is altered the mEDBG may not be recognized by Atmel Studio anymore.
© 2017 Microchip Technology Inc.
DS50002660A-page 10
Loading...
+ 23 hidden pages