Readme file for Texas Instruments CapSense Visualizer version 1.1

                            1. Introduction

The purpose of this software is to assist in the development of CapSense on 
the RemoTI STB front panel reference design. The software plots the raw 
data and statistics received from the target board in real time. This 
allows for quick troubleshooting and easy adjustment of thresholds and 
other parameters. 

The target sends three types of data over the UART connection: Raw data,
mean and variance. Raw data and mean value are plotted without modification.

The variance is multiplied with a configurable number and plotted as an
offset to the mean value. This makes it possible to visualize the way the 
variance is treated in the CapSense algorithm.

The two different thresholds are plotted as an offset to the mean value.

For more information about the different thresholds, see the "RemoTI 
Capacitive Touch Sensing" Application note (SWRA362), availible at:

http://www.ti.com/lit/swra362





                             2. User guide

    2.1 Startup

Start the software by running the file "CapSense.m" from the MATLAB command
prompt.


    2.2 Configure COM port and baud rate

Com port:  Enter the name of the COM port to which the STB Front panel is 
           connected. The default value is COM1.
Baud rate: Enter the desired baud rate. The default is 115200.


    2.3 Select thresholds and variance multiplier

Enter values for statistics threshold, touch threshold and 
variance multiplier matching those used when compiling the source code for
the target. For more info about these settings see application note SWRA362. 

Note that these settings are not sent to the target and does not affect the 
operation of the STB front panel in any way, they only change the way data 
is displayed in the plots. To change the settings in use on the target you 
have to change the appropriate compile flags in the source code for the 
target board.

    2.4 Press Start

When the start button is pressed the serial port is opened and the software
will start to receive and plot data. The number of old samples displayed 
can be changed by changing the "History length" setting and pressing enter.

    2.5 Save data to workspace.

The collected data for all buttons can be saved to the MATLAB base 
workspace by selecting the "Save data to workspace" option in the "Data" 
menu or pressing Ctrl+S.

The output variable consists of a cell array where the data for button 
(n-1) is stored at index n. For example the data for button 0 is stored at
index 1, button 1 at index 2 and so on.

     data{n} = [ raw data    ;...
                 baseline    ;...
                 stat_thres  ;... 
                 touch_thres ;...
                 variance    ;...]

To clear the recieved data buffer, select "Clear history" from the same 
menu or press Ctrl+D.



                    3. Further documentation and support

This readme file, combined with inline comments in the MatLab source files, is to be considered as the extent of the support for this tool.

The software was developed and tested on the following platform:

Operating system:   Windows XP 32bit
MATLAB version:     7.11.0 (r2010b)

