Getting Started Training Module Using MPLAB® Code Configurator (MCC): Step 1
Create a New 32-bit MCC Harmony Project
Select File > New Project from the main IDE menu.
In the Categories pane of the New Project dialog, select Microchip Embedded. In the Projects pane, select 32-bit MCC Harmony Project, then click Next.
Find the folder where you saved the framework in the Framework Path box, and then click Next to proceed.
- The path to your MPLAB® Harmony 3 installation folder should already be populated. If not, create a folder somewhere on your computer, like C:\harmony3, and point the project to that framework path.
- The MPLAB Harmony 3 necessary files will be downloaded to that path later during these steps.
In the Project Settings window, apply the following settings:
- Location: Indicates the path to the root folder of the new project. All project files will be placed inside this folder. The project location can be any valid path, for example, C:\Users\xxxx\HarmonyProjects\same51n_getting_started.
- Folder: Indicates the name of the MPLABX .X folder. Enter "sam_e51_cnano" to create a sam_e51_cnano.X folder.
- Name: Enter the project’s logical name as "getting_started_sam_e51_cnano". This is the name that will be shown from within MPLAB X IDE.
Click Next to proceed to Configuration Settings.
Follow the steps below to set the project’s Configuration Settings.
- Name: Enter the configuration name as “sam_e51_cnano”.
- Target Device: Select ATSAME51J20A as the target device.
- After selecting the target device, click Finish to launch the MCC.
The MCC content manager window is displayed. In this, click Select MPLAB Harmony (by default this option is selected).
Click Finish to start downloading the Required Content packages. The MCC opens the project graph once after downloading the required components.
Back to top
The MCC plugin’s main window for the project will be displayed as shown in the accompanying image.
- Resource Management has two sections. One is Project Resources and the other one is Device Resources.
- Project Resources The project resources area shows all the peripherals that are already configured for the project. For example (CMSIS and Device Family Packs (DFP)). Select the peripheral here, and the peripheral is ready to be configured in the Composer area. In the Project Resource area, the System module is always present. The System module simplifies the setting of configuration bits and configures the system clock.
- Device Resources The Device resources area displays available peripherals for the device. Click on the peripheral you want to add to your project. The peripheral moves to the MCC Project Resources area and is ready to be configured to your project's requirements. For example, MPLAB Harmony Peripheral Libraries (PLIBs) for your device.
- Project Graph: shows the instantiated components. You can instantiate available components by double-clicking on the component in the Device Resources panel. After successful component instantiation, you can see the instantiated components under the Project Resources panel.
- Configuration Options: Displays the tree view of the selected component under the Project Graph area. You can configure the selected optional component in this section.
Back to top
Before proceeding, set up the compiler toolchain.
Click the Projects tab on the top left pane. Right-click on the project name sam_e51_cnano.
Go to Set Configuration and click on Customize...
Make sure that XC32 (v4.30) is selected as the Compiler Toolchain for XC32 and select the Simulator.
Click on Apply and then click on OK.
Back to top
Verify Clock Settings
Launch Clock Easy View by going to the Project Graph tab in the MPLAB X IDE and then selecting Plugins > Clock Configuration.
A new window, Clock Easy View, is opened in the project’s main window.
Click on the Clock Easy View tab, scroll to the right, and verify that the Main Clock is set to 120 MHz.