7 Creating a Custom Display Module in MPLAB Harmony

FreeMarker Template Language (FTL) templates and configuration files were developed to automatically generate the custom display configuration for the Raspberry Pi Touch Display 2. The module.py and rpi2.py files are modified to define symbol options and inter-component dependencies (see the screen shot below). This enables easy reconfiguration from the MCC Graphical User Interface (GUI) with no manual editing required, resulting in a display module.

A screenshot of a computer AI-generated content may be incorrect.

The display driver written in disp.c is rewritten in asynchronous and synchronous formats in the FTL files to generate the display driver automatically when configuring the module in the project graph.

To get started, obtain the following repository through the content manager by extracting files from gfx: <your_project_path>\mcc\harmony\content\gfxs. Then, proceed as follows:
  1. Create a new folder inside the display directory for your custom display.
  2. Copy the contents of an existing similar display folder as a base.
  3. Modify the following files as per the custom display specifications to create a custom display module:
    • module.py
    • <your_display_name>.py
    • FTL files used for driver and configuration generation

Ensure that the structure and metadata of the module meet Harmony requirements so that it is correctly recognized and loaded by MCC. MCC will load the following Raspberry Pi Touch Display 2 module under Project Resources:

A white and green rectangular sign with black text AI-generated content may be incorrect.