This user guide describes how to get started with the ATmega328P Xplained Mini evaluation kit. The evaluation kit is
a hardware platform to evaluate the ATmega328P microcontroller. The on-board mini embedded debugger provides
seamless integration with Atmel Studio and MPLAB® X integrated development platform. The kit provides access to
the features of the ATmega328P enabling easy integration of the device in a custom design.
The Microchip Website.................................................................................................................................24
Steps to start exploring the Xplained Mini platform:
1.Download Atmel Studio/MPLAB® X IDE.
2.Launch Atmel Studio/MPLAB® X.
3.Connect a USB cable (Standard-A to Micro-B or Micro-AB) between the PC and the USB port on the kit.
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 Atmel Studio/MPLAB® X.
Once the Xplained Mini board is powered, the green status LED will blink, and Atmel Studio/MPLAB® X will
autodetect which Xplained Mini board is connected. Atmel Studio/MPLAB® X will present relevant information like
data sheets and kit documentation. The ATmega328P device is programmed and debugged by the on-board Mini
Embedded Debugger and, therefore, no external programmer or debugger tool is required.
ATmega328P Xplained Mini
Getting Started
2.2 Design Documentation and Related Links
The most relevant documents and software for the evaluation kit are available here:
ATmega328P Xplained Mini website - Kit information, latest user guide, and design documentation.
ATmega328P 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.
• MPLAB® X IDE - MPLAB® X IDE is a software program that runs on a PC (Windows®, Mac OS®, Linux®) to
develop applications for Microchip microcontrollers and digital signal controllers. It is called an Integrated
Development Environment (IDE) because it provides a single integrated “environment” to develop code for
embedded 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 feature 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 START - 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 ATmega328P Xplained Mini board to program the ATmega328P.
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 ATmega328P 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
Using the Embedded Debugger on the ATmega328P Xplained Mini board to debug the ATmega328P via
debugWIRE.
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 ATmega328P 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, and the debugging can start.
8.To exit debug mode, select “Disable debugWIRE and Close” in the Debug tab. This will disable the DWEN
fuse.
ATmega328P Xplained Mini
Getting Started
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 ATmega328P 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 ATmega328P 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 ATmega328P 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 ATmega328P 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:
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 ATmega328P Xplained Mini board USB connector to the PC.