Microchip logo
  • All
  • Products
  • Documents
  • Applications Notes

2D Touch Surface Library

Our free 2D Touch Surface Library enables you to implement smaller and ultra-low-power capacitive touchpads or touchscreens by using any compatible 8-bit PIC® or AVR® microcontroller (MCU) or 32-bit SAM MCU for your product design. This cost-effective library-based approach simplifies the process of adding smartphone-like surface gestures to a variety of consumer electronics, automotive and industrial applications without the need for investing in an operating system.

The 2D Touch Surface Library is provided through our free code configurators, which generate lean C code that you can export to one of our Integrated Development Environments (IDEs). Their easy-to-use Graphical User Interfaces (GUIs) allow you to define the features you need, select which type of sensing method you would like to use, assign pins to perform the functions and quickly bring your user interface to life.

What Devices Are Supported?



Which Code Configurator Should You Use?


For 32-bit MCUs

MPLAB Harmony v3





How Can Your Design Benefit from the 2D Touch Surface Library?

Replace Mechanical Buttons with Gesture Detection

Update the mechanical buttons in your design with a modern user interface that allows users to conveniently use surface gestures to interact with or control their devices. The 2D Touch Surface Library makes it easy to map a variety of single- and dual-finger gestures to GPIO pins so you can customize your design to your specific requirements. A single-finger swipe can mimic the signal from a button and two-finger zoom can give users easy access to data. You can quickly and economically enhance the user interface for your embedded product without investing in the hardware ecosystem required by a smartphone.

Water-Tolerant 2D Touch

Eliminate the need for users to wipe their fingers dry and clean before using your product’s touchpad or touchscreen. The Core Independent Peripherals (CIPs) that enable capacitive touch in the supported PIC MCUs can drive multiple lines as guards. This is an important feature for enabling water-tolerant 2D touch in your product. Use the mTouch® Capacitive Sensing Library Module within MCC to ensure that your touchpad or touchscreen works even with wet fingers.