Skip to content

Setting Orientation GLCD Display Driver

Bill Li edited this page Sep 6, 2024 · 3 revisions

Microchip Technology Setting Orientation for GLCD Display Driver

Set orientation for an GLCD Display Driver based UI design. The guide steps through the changing of a 0 degree orientation reference demo to a 90 degree orientation. You’ll start by launching MPLABX IDE, launch a quickstart Harmony v3 project, launch MHC, launch composer, configure orientation properties, generate, and build and program.

Launch MPLABX IDE

Launch MPLABX on your development PC.

Microchip Technology

Load Quickstart into IDE

Load the quickstart project. You have the option of loading any MPLABX project. In this example we will load legato_qs_mzda_cu_tm4301b.X.

Under File menu, select Open Project.

In the file dialog, select project .X file. In our example, we will use: legato_qs_mzda_cu_tm4301b.X.

Microchip Technology

Launch MHC

Launch MHC from MPLABX. This is an GLCD based design. No configuration is needed in the project graph. MHC is launched to enable the launching of MGS Harmony Composer.

Microchip Technology

MHC can also be launched in stand-alone mode. Go to MHC folder directory (/<Harmonypath>/mhc/) and double click the runmhc.bat file.

Microchip Technology

Launch Composer

Launch Composer from MPLABX. MHC is launched to enable the opening of Composer. All composer settings are independent of a display driver.

Microchip Technology

Open Project Settings

Open Project Settings Panel. Select Project, click on Project Settings.

Microchip Technology

Select Display Settings tab. Set width to 272 and height to 480. See illustration:

Microchip Technology

Select Library Settings tab. Input Orientation to 90 and **Software Rendering Orientation to 90. See illustration:

Microchip Technology

Rearrange pre-configured graphics UI design

Reposition the existing landscape UI widgets to align to the new portrait orientation.

Microchip Technology

Note: The backgroundPanel widget size should be modified as illustrated:

Microchip Technology

Generate Harmony v3 code and project files

Microchip Technology

Save configuration and generaton project. MHC will generate all required projects files including a skeleton application code. These files are located in the project.

Build Quickstart

Build the quickstart workspace.

Under Project menu, select Rebuild All.

Microchip Technology

Program Quickstart

Select Run Main Project. This button will build, program, and run the application.

Microchip Technology

Summary

In this guide, you learned to set a 90 degree orientaion for a GLCD based design. You started with a 0 degree orientation project, configured it for 90 degree orientation and repositioned the widgets. The steps were to launch MPLABX IDE, launch an existing quickstart GLCD Harmony v3 project, launch MHC, open Composer and set 90 degree orientation, modify UI design, generate, build and program your project.


If you are new to MPLAB® Harmony, you should probably start with these tutorials:


Clone this wiki locally