This user guide describes how to get started with the Atmel® ATmega328P
Xplained Mini board.
The ATmega328P Xplained Mini evalutation kit is a hardware platform to
evaluate the Atmel ATmega328P microcontroller. The evaluation kit comes
with a fully integrated debugger that provides seamless integration with Atmel
Studio 6.2 (and later version). The kit provides access to the features of the
ATmega328P enabling easy integration of the device in a custom design.
3. Document Revision History ................................................... 15
ATmega328P Xplained Mini User Guide [USER GUIDE]
42287A-MCU-05/2014
2
1.Getting Started
1.1Features
The ATmega328P Xplained Mini evaluation board provides a development platform for the Atmel ATmega328P.
1.2Design Documentation and Related Links
The most relevant documents and software for the evaluation board is available here:
http://www.atmel.com/tools/XplainedMini.aspx
1.3Board Assembly
The Xplained Mini board is very flexible and can be used in a number of ways. E.g. as your own prototype for
SW development and HW verification.
1.3.1In Customer Development Assembly
The ATmega328P Xplained Mini board can be wired into the customer prototype assembly by using the onboard connector grid, where the target signals are available.
1.3.2Connecting an Arduino Shield
By assembling receptacles in the marked positions (J200, J201, J202, and J203) Arduino® shields can be
mounted.
1.3.3Standalone Node
The ATmega328P Xplained Mini board can be used as a standalone node - use the 4xAAA or 2xAAA battery
pack available in Atmel store to provide power.
1.4Connecting the Kit
How to connect the evaluation board.
1.4.1Connect the Kit to Atmel Studio
How to connect the ATmega328P Xplained Mini board to Atmel Studio.
1. Download and install Atmel Studio1 version 6.2 or later.
2. Launch Atmel Studio.
3. Connect the board to the USB port and it will be visible in Atmel Studio.
1.4.2Connect the Target UART to the mEBDG COM Port
All Xplained Mini boards have an embedded debugger (mEBDG) with a number of features, among them a
CDC/COM port which enables the user to connect the ATmega328P UART to the PC.
1. Connect the mEDBG USB to the PC.
2. Use the Device Manager to find the COM port number.
3. Default COM port settings are 9600baud N81. The COM port settings can be changed using the Device
Manager.
1
http://www.atmel.com/tools/atmelstudio.aspx
ATmega328P Xplained Mini User Guide [USER GUIDE]
42287A-MCU-05/2014
3
1.5Programming and Debugging
How to program and debug the Xplained Mini board.
1.5.1Programming the Target Using mEDBG
Using the Embedded Debugger on the Xplained Mini board to program the ATmega328 via the SPI bus.
1. Connect the mEDBG USB to the PC.
2. Go to Atmel Studio: click Tools, select Device Programming, and select the connected mEDBG as Tool
with Device = ATmega328P and Interface = ISP, click Apply. Note that if ISP programming fails it could
be because debugWIRE is enabled. See debugging chapter on how to disable debugWIRE mode:
“Debugging the Target Using mEDBG” on page 4.
3. Select "Memories" and locate the source hex or elf file and click Program.
4. If the source contains fuse settings go to "Production file" and upload the elf file and program the fuses.
5. To set fuses manually click Fuses and select the setting.
Recommended fuse setting:
BOOTSZ = 1024W_1C00,
BOOTRST = [ ],
RSTDISBL = [ ],
DWEN = [ ],
SPIEN = [X],
WDTON = [ ],
EESAVE = [ ],
BODLEVEL = DISABLE,
CKDIV8 = [ ],
CKOUT = [ ],
SUT_CKSEL = EXTCLK_6CK_14CK_65MS
Important
If any other cpu clk than the external clk supplied by the mEDBG is used the debugWIRE is
not guaranteed to work.
The mEDBG will prevent writing certain fuse combinations in order to protect your kit.
1.5.2Debugging the Target Using mEDBG
Using the Embedded Debugger on the Xplained Mini board to debug the ATmega328P via debugWIRE.
1. Start Atmel Studio.
2. Connect the mEDBG USB to the PC.
3. Open your project.
4. In the Project menu select the project properties page, select the Tools tab and select mEDBG as
debugger and debugWIRE as interface.
5. In the Debug menu click 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, debugging can start.
8. When exiting debug mode select "Disable debugWIRE and Close" in the Debug menu, this will disable the
DWEN fuse.
ATmega328P Xplained Mini User Guide [USER GUIDE]
42287A-MCU-05/2014
4
Important
If any other cpu clk than the external clk supplied by the mEDBG is used the debugWIRE is not
guaranteed to work.
1.5.3Programming the Target Using an External Programmer
How to program the target ATmega328P using the AVR® JTAGICE mkII, JTAGICE3, or other Atmel
Programmers.
1. Connect the External Programmer to the PC.
2. Connect the External Programme to the evaluation board ISP connector (J204) (Need the 6-pin 100mil
adapter connected to the JTAGICE).
3. Go to Atmel Studio: Tools/Device Programming, and select the External Programmer connected as Tool,
Select Device = ATmega328P, Interface = ISP and click Apply.
4. Select "Memories" and locate the source hex or elf file and click Program.
5. If the source contains fuse settings go to "Production file" and upload the elf file and program the fuses.
Recommended fuse setting:
BOOTSZ = 1024W_1C00,
BOOTRST = [ ],
RSTDISBL = [ ],
DWEN = [ ],
SPIEN = [X],
WDTON = [ ],
EESAVE = [ ],
BODLEVEL = DISABLE,
CKDIV8 = [ ],
CKOUT = [ ],
SUT_CKSEL = EXTCLK_6CK_14CK_65MS
1.5.4Programming the ATmega32U4 Using an External Programmer
How to program the ATmega32U4 using the AVR® JTAGICE mkII, JTAGICE3, or other Atmel Programmers.
To restore the mEDBG FW use the /tools/mEDBG/mEDBG_fw.zip from the Studio installation.
1. Connect the External Programme to the PC.
2. Connect the External Programme to the board connector (J100).
3. Go to Atmel Studio: Tools/Device Programming, and select the External Programmer connected as Tool,
select Device = ATmega32U4, Interface = JTAG and click Apply.
4. Select "Memories" and locate the source hex or elf file and click Program.
5. If the source contain fuse settings go to "Production file" and upload the elf file and program the fuses.
Recommended fuse setting:
BODLEVEL = DISABLE
HWBE = [X]
OCDEN = [ ]
JTAGEN = [X]
SPIEN = [X]
WDTON = [ ]
EESAVE = [X]
BOOTSZ = 2048W_3800
ATmega328P Xplained Mini User Guide [USER GUIDE]
42287A-MCU-05/2014
5
Loading...
+ 11 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.