How to use the Pro Mini XL or Atmega 1284p with the Arduino IDE

by | Aug 5, 2020 | 0 comments

Adding a New Board Library

Following the steps below will enable the Arduino IDE to compile and upload code to an Atmega 1284p chip or Pro Mini XL board.

Step 1:  Launch the Arduino IDE.

I’m using version 1.8.12 in the screenshots that follow.

Arduino IDE: When you first launch the application.

Step 2:  Navigate to FilePreferences

Tip:  Or just press Ctrl+Comma.

The following window should appear…

Arduino IDE: The Preferences Window

Step 3:  Open the Additional Boards Manager URLs window.

Arduino IDE: The Preferences Window - Additional Boards Manager URLs

The following new window should appear…

Arduino IDE: The Additional Boards Manager URLs Window - Blank

Note:  The textbox in your window may already contain URLs to additional board packages – one on each line.

Step 4:  Add the following URL on a new line in the above text box:

https://mcudude.github.io/MightyCore/package_MCUdude_MightyCore_index.json
Arduino IDE: The Additional Boards Manager URLs Window - MightyCore URL

Step 5:  Close and relaunch the Arduino IDE.

NoteAny change to the Additional Boards Manager URLs requires a relaunch for those changes to take effect.

Step 6:  Navigate to Tools ⇨ Board: ⇨ Board Manager…

The following window should appear…

Arduino IDE: The Boards Manager Window

Step 7:  Search for and install the following Board Support Package

MightyCore

I’m using version 2.0.5 in the screenshot below.

Arduino IDE: The Boards Manager Window - Installing MightyCore

Step 8:  After the Board Support Package has finished installing, close the Board Manager window.

Arduino IDE: The Boards Manager Window - MightyCore Installed

You should now be able to configure your new board.

Configuring Your New Board

Step 1:  Navigate to ToolsBoard:MightyCore (Section) and select the following:

Atmega1284
Arduino IDE: The Board Selection Menu - Selecting the Atmega1284

Note:  This will update the board configuration options to those for the selected board.

Step 2:  Navigate to the Tools menu and select the following options for the Pro Mini XL:

Note:  If you are using a different Atmega1284-based board, select the options that best match your board.

Clock: "External 20 MHz"
BOD: "BOD 4.3V"
Compiler LTO: "LTO Disabled"
Variant: "1284P"
Pinout: "Standard"
Bootloader: "Yes (UART0)"
Port: "[Your COM Port Here!]
Arduino IDE: The Board Configuration Menu - Pro Mini XL Settings

Note:  For more information about the available options, please visit the Github repository for MightyCore.

You should now be able to compile and upload code to your board.

Enjoy!

Optional: Creating a Custom Board and Options

Following the steps below will add a new custom board, the Pro Mini XL, and associated options to the Boards menu.

This enables you to:

  • Easily switch between the different versions (v1 and v2) of the Pro Mini XL
  • Burn different bootloaders to clock your XL at different frequencies (8 MHz and 1MHz) to save power

Step 1:  Navigate to FilePreferences

Tip:  Or just press Ctrl+Comma.

The following window should appear…

Arduino IDE: The Preferences Window

Step 2:  Click on the direct link to the Arduino IDE preferences file as shown below:

Arduino IDE: The Preferences Window - Direct Link to Arduino IDE Directory

A new window should open showing the contents of the [Your-User-Area-Here]\Arduino15 directory:

Arduino Directory Displayed After Clicking Preferences Link

Step 3:  Navigate to the following directory:

packages\MightyCore\hardware\avr\2.0.5

Note:  It should look something like this:

MightyCore Packages Directory Listing

Step 4:  Download and extract the ZIP archive from this Github repository into the above directory.

The ZIP archive contains the following files and internal structure:

MightyCore Pro Mini XL Board Files: ZIP Archive Contents
Extracting should overwrite the boards.txt file, adding in Pro Mini XL specific directories and associated files into the variants and bootloaders directories.
MightyCore Packages Directory: Showing Updates

You should now see two new directories in the variants directory:

MightyCore Packages Directory: Updates to Variants Directory

You should also now see more bootloaders available in the bootloader directories.

For example, in:

bootloaders\optiboot_flash\bootloaders\atmega1284p\20000000L

You should see the following two new bootloaders available:

MightyCore Packages Directory: Updates to 20 MHz Bootloaders Directory

Additional bootloaders are added in the following two other directories:

bootloaders\optiboot_flash\bootloaders\atmega1284p\8000000L
bootloaders\optiboot_flash\bootloaders\atmega1284p\1000000L

Step 5: Close and relaunch the Arduino IDE.

Step 6:  Navigate to ToolsBoard:MightyCore (Section) and select the following:

Pro Mini XL
Arduino IDE: Board Selection Menu - Pro Mini XL v2 Selected

Step 7:  Navigate to the Tools menu and select the following options:

Clock: "External 20 MHz"
BOD: "BOD 4.3V"
Compiler LTO: "LTO Disabled"
Variant: "1284P"
Pinout: "v2"  [Or v1, if you have a v1 board.]
Bootloader: "Yes (UART0)"
Port: "[Your COM Port Here!]
Arduino IDE: Board Configuration Menu - Custom Pro Mini XL v2 Settings

You should now be able to compile and upload code to your board.

Enjoy!

Any feedback on the above instructions would be much appreciated!

0 Comments

Submit a Comment

Your email address will not be published.