Quick Start Guides - automaate/GFX_sandbox GitHub Wiki
Quick Start Guides
This topic provides brief user material to enable users to get started quickly on a variety of topics.
Creating New Graphics Applications
Covers the basic steps to create a graphics-enabled application from scratch, starting with a blank MPLAB project and finishing with a graphics application equivalent to aria_quickstart.
Description
This tutorial provides information on how to create a new touch input-enabled graphics project using the MPLAB Harmony Graphics Composer (MHGC). The following hardware setups are supported:
- SAM E70 Xplained Ultra board (DM320113) with High-Performance 4.3" WQVGA Display Module with maXTouch (AC320005-4) Display (Plus ICD4 In-Circuit Debugger (dv164045), ICD4/PICKit Adapter Board (ac102015))
Getting Started Before beginning this tutorial, ensure that the MPLAB X IDE is installed and necessary language tools as described in Getting Started With MPLAB Harmony. In addition, ensure that the MPLAB Harmony framework is installed on a local hard drive and that the correct version of MHC plug-in is installed within the MPLAB X IDE. Follow the tutorial found in MPLAB Harmony Core Library Help > Creating Your First Project to first learn about the basics of software development using MPLAB Harmony. Successfully completing the tutorial can serve as a confirmation of the software setup.
Configuring the Hardware SAM E70 Xplained Ultra board with 4.3” WQVGA Display There are two programming options. The primary option is the Micro B Embedded Debugger (EDBG) port. Power to the board can also be supplied via this connection. The secondary option is via the ICD4 debugger with the ICD4/PICKit 4 Target Adapter Board (Power has to be provided from power supply in this alternative setup). The image below shows both the EDBG and the ICD4 connection options:
Insert image here QSG 60
Configuring the 4.3” WQVGA Display requires disconnecting the ribbon cable that connects the display to the interposer board.
Insert image here QSG 60 WQVGA
First, release the ribbon cable from the interposer board. Next, release the black clamp on the E70’s J2 connector and turn the display over. Finally, insert the ribbon cable into J2 and close the clamp.
Insert image here QSG 60 connecting ribbon
The board and display are powered by a Micro B – USB A cable from PC to the “Debug USB” port on the E70 board. The ICD4 Debugger and ICD4/PICKit4 Adapter Board are connected as shown above. Tutorial Steps
- Launch the MPLAB X IDE. From the File pull-down menu, select New Project. (This will bring up the New Project dialog window.)
Insert image here QSG 60 new project
- On the New Project dialog window, be sure the project type is 32-bit MPLAB Harmony Project, then hit the Next > button.
Insert image here QSG 60 choose project
- In the New Project dialog window, fill in or select the information needed as follows: • Harmony Path - be sure it is pointing to the MPLAB Harmony framework installation. • Project Name - Type in MyProject or some other name. • For the SAM E70 Xplained Ultra board, select the ATSAME70Q21B as the target device. The New Project dialog should show the following:
Insert image here QSG 60 new project and loc
Select Finish when done. 4. In the MPLAB Harmony Launcher dialog window select the Launch Path that corresponds to the Harmony installation to be used. In the example below, both MPLAB X IDE’s default configuration and the project’s path point to the same MPLAB Harmony installation:
Insert image here QSG 60 harmony launcher
The select the Launch button. When the “Configuration Database Setup” dialog window appears, just select Launch:
Insert image here QSG 60 config
MHC’s component graph should show:
Insert image here QSG 60 project graph
- In the MHC’s Available Components panel drag and drop the SAM E70 Xplained Ultra BSP onto the project’s Component Graph
Insert image here QSG 60 BSP
- Next drag the Aria Graphics w/ PDA TM4301B Display graphics template onto the project graph:
Insert image here QSG 60 choose graphic template
Then answer Yes to all the dialogs that follow. The Project Graph should show:
Insert image here QSG 60 initial project graph
After rearranging the components:
Insert image here QSG 60 final project graph
- Launch the Graphics Composer from the MHC Tools Menu:
Insert image here QSG 60 launch mhgc
Next, the MHGC’s Welcome Dialog should appear. Click the first icon to create a new graphics design.
Insert image here QSG 60 mhgc welcome dialog
If the Welcome Dialog does not appear, it is because it had been disabled previously. In the MPLAB Harmony Graphics Composer (MHGC) screen use the left-most icon to create a new graphics design.
Insert image here QSG 60 create new design
NOTE: The Welcome Dialog can be re-enabled by using MHGC’s File > Settings > General menu:
Insert image here QSG 60 reenable welcome dialog
- In the New Project Wizard, for the Color Mode step, select RGB_565 and hit NEXT.
- For the Memory Size step, accept the default Flash Memory Size and hit NEXT.
- For the Project Type step, chose the second option to create a new project using a basic template:
Insert image here QSG 60 new project wizard type
The MHGC window should now show:
Insert image here QSG 60 screen design
- Launch the Pin Configuration tool and verify that the display is correctly setup:
Insert image here QSG 60 launch pin design tool
Insert image here QSG 60 launch pin diagram
- Generate the application’s code for the first time. Select the Generate Code button of MHC’s window:
Insert image here QSG 60 generate code
- On the New Project dialog window, be sure the project type is 32-bit MPLAB Harmony Project, then hit the Next > button.