Jun 14

Capacitive Touch Sensing on the MSP430

One of the projects I’m working on involves using capacitive touch sensing (CTS) on the TI MSP430.  TI has been pushing their touch sensing capabilities recently and has even released a library that helps in implementing touch sensing on the MSP430.  I decided to give it a try.  The short story is that there is a lot on TI’s site and it is easy to get confused as to what you need.  See below for some of my journey getting it going.

There are many places to go on TI’s site for CTS on the MSP430.  We’re going to start with the library and expand from there.

Let’s start with the library.  It’s not all there. There was one critical piece of information missing that took me two days to find.  When using the library and example structure.c/.h files, one must have GCC extensions enabled in CCS.  If you go to SLAA491 it will tell you where to do that.  It took someone mentioning that doc on e2e.ti.com for me to know it was even there (the name was just close enough that I thought I had already downloaded it.  Second, you must start with an example structure.h file.  There are #defines in there that are required for the library to properly configure itself.  If someone on the TI team that wrote the CTS library is reading this, I’d really appreciate it if as much user required code was taken out of structure.h so that I don’t keep flipping the revision on the library files in my own program.  Something along the lines of creating another .h file that is pulled in at the beginning of structure.h so that I can just look at the revision number in svn and know that code I shouldn’t be touching has not been touched.

Next are the additional documents that are good to have.  There is SLAA491, Getting Started With Capacitive Touch Software Library and SLAA490, Capacitive Touch Sense Library Programmer’s Guide.  Along with these are also the user’s guide from the CTS booster pack for the launchpad and several application notes.  The app notes could use some freshening, especially the PCB design guide.  I ended up using another company’s CTS PCB design guide to help with my button design.  We’ll see how that works soon, as the board is being shipped as I write.

So far, my biggest issue with digging into the CTS library is getting through how I expected it to be setup, vs. how it is (and that whole GCC extensions thing).  I’ll post more as I get some hardware setup and tested in the next month.

Permanent link to this article: http://blog.curioussystem.com/2011/06/capacitive-touch-sensing-on-the-msp430/


  1. Eduardo Aguilera

    Hi my friend are you still working with capacitive touch. I would like to keep in touch with you about that because I´m doing a project about that.

  2. Chad Kidder

    Yes, I still do some capacitive touch work.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>