mTouch CVD Evaluation Kit Quick Start Guide

Note:
This guide assumes you are using the mTouch Evaluation kit as your hardware. For details on where to begin when implementing the mTouch framework on a custom hardware design, use this guide.

Congratulations for the purchase of your new mTouch CVD Evaluation Kit.

Although the kit will run right out of the box, this document will walk you through the setup process to quickly configure the kit. Should you need any custom configuration, this will get you up and running.

The kit comes pre-programmed and set to operate in the configuration listed below. If you need to alter any of the parameters, then a new hex file will need to be generated and the main board will need to be reprogrammed with the new firmware. MPLAB IDE will then be required as well as a C compiler.

Default Software Configuration:

Changing the Number of Sensors:

If you need the stack to manage more or less than the default number, all you need to do is update the constant CVD_NUMBER_SENSORS to any other value from 1 to 15. This constant can be found in the mTouchCVD_Config.h file.

Assigning Sensor Indexes to the Correct A/D Channels

Depending on how the daughter board is connected to the main board, the sensors may be connected to different A/D inputs on the PIC microcontroller. In the mTouch framework, sensors can be mapped to a specific index in the application. Go to mTouchCVD_Config.h and look for the section with the definitions shown below, and map the sensor indexes on the left side to the correct A/D channels for your setup.

   #define CVD_SENSOR0             AN0  
   #define CVD_SENSOR1             AN1    
   #define CVD_SENSOR2             AN2     
   #define CVD_SENSOR3             AN3     
   #define CVD_SENSOR4             AN4     
   #define CVD_SENSOR5             AN5     
   #define CVD_SENSOR6             AN6     
   #define CVD_SENSOR7             AN7     
   #define CVD_SENSOR8             AN8     
   #define CVD_SENSOR9             AN9     
   #define CVD_SENSOR10            AN10    
   #define CVD_SENSOR11            AN11    
   #define CVD_SENSOR12            AN12    
   #define CVD_SENSOR13            AN13

Changing the Number of Samples per Scan

The number of samples taken in an application will be based on a trade-off between sensitivity and response time. The more samples taken, the better the signal-to-noise ratio of the system, but the slower its response to a finger. Typical response times are less than 100ms to eliminate delay that is visible to the human eye. If a specific response time is required, example equations are provided in the configuration file to show how to calculate the rate that will be chosen based on this value.

Adjusting the Sensor Threshold Values

Your mTouch evaluation kit comes already preconfigured with the sensor threshold values for the 8-button daughter board. If different sensitivities are needed, go to the mTouchCVD_Config.h file, locate the section with the definitions shown below, and set the new values. A general rule of thumb to finding and setting correct values is to determine the range of shift for the sensor (min and max shift) and set the threshold to about 75% of the range. The following formula can be used:

\[ Threshold_{Press} = min + 0.75 (max - min) \]

   #define THRESHOLD_PRESS_SENSOR0         65         
   #define THRESHOLD_PRESS_SENSOR1         65
   #define THRESHOLD_PRESS_SENSOR2         65
   #define THRESHOLD_PRESS_SENSOR3         65
   #define THRESHOLD_PRESS_SENSOR4         65
   #define THRESHOLD_PRESS_SENSOR5         65
   #define THRESHOLD_PRESS_SENSOR6         65