Introduction
The Capacitive mTouchTM Software Library provides the API's to develop capacitive touch applications using the Charge Time Measurement Unit (CTMU) and Capacitive Voltage Divider (CVD) technique on PIC18F, PIC24F, PIC24H and dsPIC33 Microcontrollers (MCUs).
The software stack is developed using ‘C’ language and can be compiled by Microchip's C18 , XC8, PICC18, XC16 and C30 compilers for PIC18, PIC24F, PIC24H and dsPIC33 Microcontrollers.
Users of the mTouchTM Software Library can select the PIC microcontroller used for the application and configure the CTMU or CVD Demos as required for the application. The API's helps the user to integrate the mTouch Capacitive Library with the end application. This library is also designed to operate with other libraries developed by Microchip.
The CTMU has a constant current source that can be used for relative capacitance measurement, absolute capacitance measurement and accurate time measurement. This library will use the relative capacitance measurement for capacitive touch sensing application. Refer to the CTMU Family Reference Manual (DS39724) for more details of CTMU.
The CVD technique resides in successive charging and discharging cycles of ADC sample and holds capacitor and the external capacity of the sensor, while measuring the voltage left on the sample and hold capacitor after each cycle. This library contains the implementation of the CVD technique. Refer to the Capacitive Touch Using Only ADC (CVD) – AN1298 for more details.
The Capacitive mTouchTM Software library is also implemented for PIC16F and PIC18F CVD Framework.
The Help file for PIC16F and PIC18F CVD Framework is available in the following location:
....\Microchip\Help\mTouch CVD Framework Documentation.
Hardware Setup :
The PIC18F, PIC24F and PIC24H Enhanced Capacitive Touch Evaluation kit (DM183026-2) is used for demonstrating the Capacitive mTouchTM Software Library functionality.