www.ti.com
LaunchPad Capacitive Touch BoosterPack User Experience Firmware
4
LaunchPad Capacitive Touch BoosterPack User Experience Firmware
This section describes the firmware application that is provided with the project. Detailed information on
the project construction, use of the Capacitive Touch Sense Library, and how to set up and import the
projects is included. Source code for the MSP430G2452 firmware application is installed to the
[INSTALL_PATH]\Source\ folder as described in
Section 2.2
.
The User Experience application operates on the LaunchPad platform using the MSP430G2452 device
and the Capacitive Touch BoosterPack plugin board. The capacitive touch and proximity sensing are
enabled by the pin oscillator feature, which is new to the MSP430G2xx2 family devices. The User
Experience application also uses the Capacitive Touch Sense Library [7] to realize and measure the
capacitive touch and proximity sensors. The Capacitive Touch Sense Library provides layers of
abstraction to generate higher logical outputs such as logical touches and their position (in this hardware,
a four-button wheel).
The User Experience application starts in sleep mode, sampling the proximity sensor approximately every
8.3 ms (VLO / 100 = 12 kHz / 100 = 120 Hz). Upon registering a valid proximity event (for example, a
hand, finger, or object hovering approximately 3 to 5 cm from the BoosterPack), the application enters the
active mode. During the wake-up period, the LEDs surrounding the wheel light in a wake-up sequence,
starting with a slow clockwise sequence and ending with a fast counter-clockwise sequence. As this
sequence ends, the device enters active mode.
In active mode, the application samples and registers individual finger touches on the 16-position wheel or
the center button. It also recognizes simple gestures (clockwise and counter-clockwise) when the finger
moves along and remains on the wheel. Upon wheel position detection, the corresponding LEDs
surrounding the wheel light up accordingly. Each individual tap on the center capacitive touch button
toggles the center LED.
After a short time without any touch activity (on the wheel or on the center button), the application returns
to sleep mode, enabling only the proximity sensor periodically.
A 9600-baud UART link is also implemented using software Timer_A to provide application and capacitive
sensing data to the PC via the UART-USB back channel. The application sends UART data on events
such as wake up, sleep, touch, or gesture.
For more detailed information on the firmware project, see the source code and the associated
ReadMe.txt.
4.1
Import Project in CCS
To import the project into CCS:
1. Open CCS.
2. Select a new project workspace outside of the project folder
(1)
.
3. Select Project--
>
Import Existing Project.
4. Browse to the [PROJECT_ROOT]\CCS folder.
5. Make sure that "Copy projects into workspace" is not checked.
6. Click Finish
NOTE:
For CCS, while project root is in the outer directory, the CCS project files are located inside
CCS. To enable the portability of the project, the file macros.ini is created to define the root.
Additionally, all project code files (.c, .h) are added as linked resources with their relative
path to the project root.
4.2
Open Project and Workspace in IAR Embedded Workbench
To open the project in IAR Embedded Workbench:
1. Browse to the [PROJECT_ROOT]\IAR folder.
2. Open the Sense_BoosterPack_UserExperience.eww workspace.
(1)
The workspace should be in an independent folder, not containing or contained by the project/package folder.
17
SLAU337A
–
April 2011
–
Revised September 2011
430BOOST-SENSE1 - Capacitive Touch BoosterPack for the LaunchPad
Submit Documentation Feedback
Copyright
©
2011, Texas Instruments Incorporated