Step 2: Add Graphics and Touchscreen Components in MPLAB® Harmony Configurator (MHC)

Last modified by Microchip on 2024/02/06 09:25

Select the Project Graph tab in MPLAB® Harmony Configurator (MHC). Remember, if you ever lose the MHC tool, go to Tools > Embedded > MPLAB Harmony 3 Configurator.

Add the Aria Graphics w/PDA TM4301B Display template into your project from the Available Components window.

Expand the tree Graphics > Templates and select Aria Graphics w/PDA TM4301B Display.

Select template

At this point, you will be asked to auto-activate some components required by the system. Select Yes for all.

Confirm auto-activation

Confirm auto-activation

Confirm auto-activationConfirm auto-activationConfirm auto-activation

Your Project Graph should have added multiple components. Arrange the boxes to resemble the following Project Graph:

Starting project graph

Back to Top

Set the Display Interface to LCC.

Select the Aria Graphics w/PDA TM4301B Display component. This will display the current settings in the Configuration Options window. Set the Display Interface to LCC.

Configuration Options window LCC

Back to Top

Revise the interface of the Inter-Integrated Circuit (I2C) Bit Bang component for the touchscreen interface.

Right-click on the yellow diamond in the I2C_BB component and select I2C (drv_i2c) from the list of consumers.

I2C bit bang

This will create a new instance for the I2C diver interface. See the simplified component diagram:

I2C driver Instance

Disconnect the current I2C driver interface from the maXTouch® Controller by right-clicking on the DRV_I2C diamond and selecting Disconnect.

I2C Disconnect

Reconnect the I2C diver interface by right-clicking on the DRV_I2C diamond in Instance 1 interface. Then select maXTouch Controller (gfx_maxtouch_controller) from the list of Consumers.


Your Project Graph should now resemble the following screen:

Project graph after

Back to Top

The graphic libraries require additional heap space. Click on the System component and expand the Configuration Options tree to display the Heap Size entry field. Set this to at least 32,768.

Configuration Options window Heap size

Back to Top

Click on Instance 1 of the I2C driver. In the Configuration Options, set Transfer Queue Size to 9.

Configuration Options window Queue size

Back to Top

Click the Save button to save the MHC configuration.

Back to Top