Skip to content

Touch Driver Support

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

Microchip Technology Touch Driver Support

MPLAB® Harmony Graphics Suite contains the following touch screen driver support:

  • Micrchip maXTouch® touch screen controllers
  • Generic touch screen controllers
  • Peripheral touch controller
  • Resistive touch

Microchip maXTouch controller driver

The Suite contains integrated support for Microchip’s maXTouch® Touchscreen Controllers.

Touch-enabled graphics on maXTouch® powered Touch Display Modules maXTouch Curiosity Pro include:

The driver is pre-coded and can be configured for various display sizes. No coding is required.

  • Asynchronous or Synchronous operation
  • Polling or interrupt event notification
  • Set extent of display
  • i2C interface for command communication

Microchip Technology

Generic touch screen controllers

The Suite also contains support for specific classes of third-party external touch controllers. The code for these controllers are generated from configuration input through MHC's Generic Touch Driver component. for certain third-party touch controllers:

  • Uses I2C interface for setup and reading touch data
  • Uses [Command] + [Data] writes for initial setup
  • Sends an interrupt signal for valid touch
  • Touch Event and Position data can be obtained in a single atomic I2C read transaction

Using the Generic Touch Controller Driver Generator

  1. Add the driver component to the project like a regular Touch Controller driver Input > Generic Touch Controller

Microchip Technology

  1. Add and connect the I2C Driver and the appropriate Peripheral Library for I2C Add Input System Service Component

Microchip Technology

Configuring the Generic Touch Controller Driver Generator

Microchip Technology

Microchip Technology

Generated Generic Touch Controller Driver

Microchip Technology

Generating a Stub Touch Controller Driver

If the target touch controller has an unsupported touch data format, set Generate Touch Data Function to ‘Stub’

Microchip Technology

This will generate an empty drv_touch_process_data() definition that must be completed manually.

Microchip Technology

The function must extract the touch event and position from the touch data and call the appropriate SYS_INP_Inject* function.

NOTE: Resistive Touch is supported in Harmony 2 is currently under development for Harmony 3. Peripheral touch is also under development in Harmony 3.


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


Is this page helpful? Send feedback.

Clone this wiki locally