This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Capacitive Touch using MSP430G2452 GPIO

Other Parts Discussed in Thread: MSP430G2452, MSP430G2955

I'm using MSP430G2452 to realize capacitive touch on launchpad. While 2452 has 16 GPIOs, P1.1, P1.2 are used as UART TX and RX. P2.6 and P2.7 are used as XOUT and XIN on launchpad. I am trying to build my own capacitive touch board but requires 13 GPIOs for detection and control. I wonder if P2.6 and P2.7 can be used like P2.0-P2.5, or they are specially reserved for XIN and XOUT and such an reservation is defined in software library.

  • All 16 I/O pins of G2452 can be configured as capacitive touch sensing input -- if they are not used for other purposes. This include P2.7 and P2.6. The Launchpad has provisions to use them as XIN and XOUT, the crystal is included in the kit but not soldered on the board. Thus it is up to you what to do with them.

  • Good day,

    I have done exactly as described here, I make use of 12 touch buttons and I have 27 LED's that are driven in a matrix manner + a RS485 communication interface from the above you can see that all the pins are used including the Xin and Xout pins.

    The controller I'm using is the MSP430G2955. I have now noted that the performance on the Xin pin (for touch purposes) are not good; not good at all, all the other touch buttons work well except for1 button that is on the edge of working (P2.0) for my application and the other 1 is working very poorly (P2.7 Xin pin) these are the only 2 cap touch buttons on port 2 and these are the only 2 buttons giving problems. 

    Have anybody else experience this problem, and is there any reasons why the performance on this port (for cap sense) are not so good? Can this problem be sorted on the port by changing some of the configurations.

    Here is the list of pins I'm using for touch sensing.

    Button 1 - P2.0  - The pin that is on the edge

    Button 2 - P4.1

    Button 3 - P4.2

    Button 4 - P2.6 - The pin that is performing poorly

    Button 5 - P4.0

    Button 6 - P4.7

    Button 7 - P1.2

    Button 8 - P3.6

    Button 9 - P4.6

    Button 10 - P4.4

    Button 11 - P3.7

    Button 12 - P1.3

    From the above info the common denominator is port 2. 

    Feedback will be appreciated.

    Kind regards,

    Jaco van Zyl

  • Did you clear the P2SELx bits for P2.6 and P2.7? IIRC, they are set by default, for XTAL usage.

  • Yes, they are all cleared.

    The pins give cap touch capabilities but nowhere near the sensitivity the other pins give.

    Thanks for the response

  • I can imagine (though it is only a guess) that the XCAP capacitors are still attached to the pins. 24pF are negligible for digital I/O, but are significantly lowering touch sensitivity.

    Try clearing the XCAP pins in the clock system.

  • Did you switch off the LFXT1CLK > BCSCTL3 = LFXT1S_2;

**Attention** This is a public forum