Design Center GUI¶
Introduction¶
Fig. 85 CapTIvate Design Center
The CapTIvate™ Design Center is a rapid development tool that accelerates capacitive touch designs for CapTIvate™ Technology enabled MSP430 devices. By helping guide the product developer through the capacitive touch development process, the CapTIvate™ Design Center can simplify and accelerate any touch design through the use of innovative user graphical interfaces, wizards and controls.
Key features¶
- Intuitive GUI tools for creating, configuring and defining the MSP430 connections for sensors
- Support for slider, wheel, button group, and proximity sensors
- Support mutual and self capacitive sensor types in the same design
- Automated generation of complete source code projects for CCS and IAR IDE’s
- Real time target communication via a HID communication bridge. Enabling target communication allows users to:
- View detailed sensor data
- Configure and tune sensor performance
- Perform SNR measurements
Hardware and software requirements¶
A PC with the following requirements is required to execute the CapTIvate™ Design Center: - Windows 7 operating system with Java version 1.6+ - Apple OS X 10.10.1+ with Java version 1.7+ - Linux OS with Java version 1.6+
The source code projects generated by the tool support the following IDEs:
- Texas Instruments Code Composer Studio (CCS) version 6.1 or later
- IAR Systems Embedded Workbench for MSP430 version 6.30 or later
Additional Linux requirements¶
If you are not running the application using a root account, you may not have permissions to the HID device mounted by the MSP microcontroller.
To enable access perform the one-time setup step:
- Create the file /etc/udev/rules.d/ti_hid.rules.
- Add the lines below to the file and save the file.
## Allow open access to any usb device with the default Texas Instruments MSP
## Vendor Id of 0x2047
ATTRS{idVendor}=="2047", MODE="0666"
Licensing¶
The CapTIvate™ Design Center is released under the BSD 3-clause license. See the license manifest in the installation directory for details.
CapTIvate™ Design Center Quick start¶
This section is intended to provide a very basic and quick overview of how to use the CapTIvate™ Design Center to define a typical capacitive touch design, generate source code, and communicate with the target. For additional detailed information about the features of the CapTIvate™ Design Center, refer to the CapTIvate™ Design Center user’s guide.
When ready to start your own design, check out the workshop guide section, Creating a new sensor design project.
Start the Design Center¶
Double click on the desktop “CapTIvateDesignCenter” short cut to start the tool.
Fig. 86 CapTIvate™ Design Center Shortcut
Create a new project¶
Use the File->Project New menu to create a new project
Fig. 87 New Project Name
Place the sensors¶
Place a slider sensor in the design area¶
Select the slider by clicking on the sensor icon. Place the new object by clicking on the design canvas.
Fig. 88 Placing a Slider Sensor
Display the sensor properties to configure it to be a self capacitance slider with 4 elements.
- Double-click on the slider object in the design area to display its properties.
- Configure the sensor to have 4 elements and close the properties dialog.
Fig. 89 Modify Sensor Properties
Place a wheel sensor in the design area¶
Select the wheel by clicking on the sensor icon. Place the new object by clicking on the design canvas.
Fig. 90 Placing a Wheel Sensor
Display the sensor properties to configure it to be a self capacitance wheel with 3 elements.
- Double-click on the wheel object in the design area to display its properties.
- Configure the sensor to have 3 elements and close the properties dialog.
Fig. 91 Modify Sensor Properties
Place a button group (keypad) sensor in the design area¶
Select the button group by clicking on the sensor icon. Place the new object by clicking on the design canvas.
Fig. 92 Placing Button Group Sensor
Display the sensor properties to configure it to be a self capacitance button group with 8 elements.
- Double-click on the button group object in the design area to display its properties.
- Configure the sensor to have 8 elements and close the properties dialog.
Fig. 93 Modify Sensor Properties
Place a proximity sensor in the design area¶
Select the proximity sensor by clicking on the sensor icon. Place the new object by clicking on the design canvas.
Fig. 94 Place Proximity Sensor
Display the sensor properties to configure it to be a self capacitance proximity with 1 element.
- Double-click on the proximity object in the design area to display its properties.
- Configure the sensor to have 1 element and close the properties dialog.
Fig. 95 Modify Sensor Properties
Place the MSP430 controller¶
Select the MSP430 by clicking on the MCU icon. Place the new object by clicking on the design canvas.
Fig. 96 Place MCU
Connect sensors to MSP430 capacitive touch I/O ports¶
Double-click on the MSP430 controller object in the design area to display its properties.
- Configure the MSP430 controller as MSP430FR2633IRHB (32-pin QFN package)
- Note that the “Errors” LED is red, indicating that there are still unconnected sensor ports.
Fig. 97 Display MCU Properties
Select the “Auto-Assign” button to automatically assign all the sensor ports to appropriate ports on the MSP430. Note that the “Errors” LED turns green and “OK”, indicating that all sensor ports have been assigned to controller ports.
Fig. 98 CapTIvate™ Auto-Assignment Feature
Generate source code¶
Select the “Generate Code” button on the MSP430 Controller properties dialog.
Fig. 99 Generate Source Code Button
Select “Create new project” then “OK” in the dialog indicating that you want to create a new full project.
Fig. 100 Select New Project
Select “OK” to keep the default location for the generated code.
Fig. 101 Use Default Location
Load and run the MSP430FR26xx/25xx generated firmware project using CCS or IAR¶
For information regarding importing/opening project in CCS or IAR and running the generated projects please refer to Loading and Running Generated Projects
Communicating with the target¶
This section shows some examples of how the data read from the target over HID is displayed.
Note that you will not see any valid sensor data unless your target board is connected to a sensor board that matches the configuration created in the Design Center GUI.
Start HID communication with the target¶
Enable the HID communication by selecting the menu “Communications->Connect.” Verify the HID device is connected by viewing the message in the main window lower left corner.
Fig. 102 HID Connection Status
Display sensor data¶
Double click on the slider object to display the properties dialog. The tabs are used to display graphs of the real-time sensor data, and also to enable reading and modifying the sensor’s configuration and tuning parameters. The sensor “position” is also reflected in the display.
Fig. 103 Channel Bar Chart
Fig. 104 Oscilloscope Chart
Fig. 105 Channel Table
Tune sensor performance¶
Sensors can be configured in real-time using the Tuning panel. Modify the desired parameter then click “Apply”. All parameters are described directly in the panel for ease of use. Sensor parameters can only be modified when the target is connected.
Fig. 106 Sensor Tuning Parameters
It is possible to “un-dock” any of the tuning views to allow easier viewing of one or more views at one time. Click and drag the handle on the left of the view to position as needed. Closing an un-docked window returns it to the tab pane.
Fig. 107 Un-docking views
For additional detailed information about the features of the CapTIvate™ Design Center, refer to the CapTIvate™ Design Center user’s guide.
When ready to start your own design, check out the workshop guide section, Creating a new sensor design project.
CapTIvate™ Design Center Users guide¶
Design Center GUI panels¶
The Design Center GUI consists of three main panels; Menu bar, Object selection tab and Design canvas.
Fig. 108 CapTIvate™ Design Center GUI
Object Selection Tab¶
The object selection tab displays objects can be selected for placement in the design canvas. Object types include:
- Sensors
- MSP430 controller
- Miscellaneous objects such as comments
Fig. 110 Object Selection Bar
Miscellaneous Selection Tab¶
The Miscellaneous selection tab displays a comment object and user data logging object.
Fig. 111 Object Selection Bar
Comment Object¶
The comment object is used to create user comments that can be added to the design project.
Fig. 112 Adding a comment
User Data Logging Object¶
The user data logging object provides a means to log user user defined data. For more information about how to use this feature with firmware running on the target MCU, refer to the Software Library Chapter. User data is collected and stored in a userDataLog.csv file. Refer to Communications Section for details on the data enable/disable collection process.
Fig. 113 Adding a comment
Design Canvas¶
To place an object in the design canvas:
- Select an object from the object tab with the left mouse button
- Position the cursor in the design area and place the object by clicking the left mouse button
Objects may be selected and moved anywhere on the canvas. Additional object operations can be displayed by right-clicking the mouse button on the object. To display the properties and configure the object, double-click using the left mouse button. To access the on-line help for an object type, select it and press the F1 key.
Fig. 114 Design Canvas
Controller Properties¶
Double clicking on the controller object will display the properties dialog.
Fig. 124 Controller
The properties dialog for a controller object allows the user to:
- configure the device
- map controller pins to sensor elements
- enable target communications and view sensor data
Fig. 125 Controller Properties
Device configuration¶
Select the desired MSP430 device with CapTIvate™ Technology from the pull-down list. When using the CapTIvate™ EVM, choose the MSP430FR2633IRHB.
Fig. 126 Selecting Device
Enable target communications and target MCU communications interface¶
Enable/disable target communications using this button. This is equivalent to the Communications->Connect/Disconnect menu items. The Communication Interface provides UART and I2C selections for the HID Bridge MCU to target MCU communications interface. To change the current interface, select a new one and click the “Connected” button. The HID Bridge MCU on the CAPTIVATE-PGMR PCB will immediately start using the new interface. When generating source code, the generated project files will be updated to provide support for the new interface.
Fig. 127 Selecting Communications
Select Compile Time options¶
Compile options can be selected to enable additional features provided in software. These features, when selected, are added to the code project generated by the CapTIvate™ Design Center.
- Enable Noise Immunity for improving noise immunity when operating in noisy environments.
- Wake on Proximity enables ultra-low power proximity detection using the hardware state machine (no CPU) and the selected sensor. The sensor list varies with the types and numbers of sensors in the project. Additional parameters, such as low power scan rate, inactivity timeout and others can be specified in the Controller Conversion Control.
Fig. 128 Compile Time Options
Note that for most use-cases, these two compile-time options (noise immunity and wake-on-proximity) are not intended to be used simultaneously in the same design. Battery powered designs benefit the most from wake-on-proximity mode, and line powered designs benefit the most from noise immunity mode.
Configure Low Power Mode¶
The Low Power Mode Options configure the low power mode to reduce system power consumption based on the application requirements.
- The Low Power Mode option determines the power mode of the MCU in between CapTIvate conversions. Valid options are LPM0 (high power standby with SMCLK and ACLK enabled), and LPM3 (low power standby with SMCLK disabled and ACLK enabled).
- The Force LPM4 in Wake-on-Prox Mode option enable the very low power oscillator (VLO) as the conversion timer in wake-on-proximity mode in LPM4. This option may be used to reduce the average current in wake-on-proximity mode for designs that do not have a crystal oscillator.
Fig. 129 Low Power Mode Options
Mapping sensor ports to controller pins¶
There are three ways to map the sensor ports to controller pins:
- Allow the Design Center to automatically map all the connections using the “Auto-Assign” function on the controller “Configure Connections” tab
- Manually map the connections using the connection table in the controller “Configure Connections” tab
- Graphically connect the sensor and controller pins on the objects in the design canvas
Auto-assign¶
Fig. 130 Auto-Assignment Button
If the “Auto-Assign” button is selected, the Design Center will attempt to optimally connect all of the unconnected the sensor ports to the controller. Note that any connections that already exist will not be changed. In this manner, it is possible to make some connections manually, and then auto-assign the rest.
This is a good option if there are no pre-existing restrictions on the mapping. For example, if the mapping is constrained due to board layout considerations, users should choose one of the other options.
If the assignment completes successfully, the “Errors” indicator will turn green. If the indicator is “red”, errors still exist. Clicking on the indicator will display a dialog with a listing of the remaining errors.
Manual mapping using the Configure Connections table¶
Fig. 131 Manual Mapping using Table
The Configure Connection table enables detailed control for mapping the sensor ports to the controller ports. The table is split into 3 main parts:
- The “Unconnected” column lists all the sensor ports that are not assigned to a controller pin. The data in this column is read-only.
- The “Controller” columns display information on the CapTIvate™ Technology enabled ports on the MSP430, any usage mode restrictions, and which of the ports belong to the same parallel sense block.
For information on how to best assign pins manually, see the pin assignment section of the Design Guide chapter.
Port column edits¶
Fig. 132 Editing Port Column
Selecting a cell in the port column will bring up a pull-down menu that allows the user to control the usage mode of the port. The “Use Mode” column will be updated to display any restrictions made a controller pin.
- Available: Any sensor port may be assigned
- Reserved: No sensor port may be assigned to this pin
- RX only: Only sensor RX ports may be assigned to this pin
- TX only: Only sensor TX ports may be assigned to this pin
- SELF only: Only self capacitance sensor ports may be assigned to this pin
- MUTUAL only: Only mutual capacitance sensor ports may be assigned to this pin
Parallel Group column edits¶
Fig. 133 Editing Parallel Groups
Selecting a cell in the port column will bring up a pull-down menu that allows This column allows the user to modify which pins are assigned to each parallel sense group.
- The “Sensors” section contains a column for each sensor in the design and is used to enable users to individually map each sensor port to the desired controller pin.
Sensor column edits¶
Fig. 134 Editing Sensor Columns
Selecting a cell in a sensor column will display the list of unconnected ports for that sensor which are legally allowed to be assigned to that controller pin. As sensor ports are assigned, the Unconnected and Time Cycle tables are dynamically updated.
- The Time Cycles section displays which sensor ports will be scanned in parallel by the target. This data is read-only and is updated whenever changes to the sensor connections or configuration are detected.
Making manual connections graphically¶
Connections between the controller and sensors can be made by clicking the port on the sensor and dragging the connection to the desired port on the controller.
Note: Be sure to display the connections first using the Options->Display menu item.
Fig. 135 Graphical Connections
Source Code Generation¶
Source code for the design can be generated once all the sensor ports have been connected to the controller.
Fig. 136 Generate Source Code Button
Create new project¶
This option will create a complete project with the design specific definitions, support code, and CSS/IAR project files.
Update existing project¶
This option will only update the design specific definition files. Use this option to update a project that has already been imported into an IDE.
Fig. 137 Select Output
Controller target data displays¶
Controller Channel Bar Chart¶
Controller Channel Table¶
See Channel Table
Controller Conversion Control parameters¶
There are two groups of parameters that are controlled in this tab; one for data control, the other for wake on proximity. Clicking on any parameter will display a description for it in the “Description” viewing pane to the right of the parameter.
Element and Sensor data enables¶
These controls provide a method to minimize the amount of data sent from the target MCU to the CapTIvate™ Design Center during real-time tuning. By default, these both should be “checked.” For designs with large number of sensors or elements, the data transmission can be very large and potentially slow down the report rate during sensor tuning. Deselecting one or the other will help improve the throughput.
Wake on proximity parameters¶
When using wake on proximity for ultra-low power proximity detection, it is possible to select:
- Ultra-low power Wake on proximity scan rate is the rate at which the hardware state machine (no CPU) scans the selected proximity sensor/electrode. Note: up to 4 electrodes can be scanned in parallel.
- Active Mode scan rate is the rate at which the CPU scans all the sensors connected to the target MCU.
- Wake up interval sets a failsafe timeout used by the hardware state machine to force the CPU to wake up and run any background tasks periodically. The wakeup period is based on the “Wake on proximity scan rate” time the “N samples selected in drop down” value. This parameter is optional and can be disabled)
- Inactivity timeout is the time the CPU continues to scan all the sensors after there is no proximity detection. At the end of the timeout, the MCU re-enters the ultra-low power wake on proximity mode. The timeout period is based on the “Active scan rate” times the “Inactivity Timeout” value.
Fig. 138 Wake On Proximity Parameters
Controller Scan Time Estimator¶
The scan time estimator displays the nominal amount of time it will take to measure each sensor, drawn with respect to the overall scan period. The overall scan period is controlled by the System Report Rate parameter.
Fig. 139 Scan Time Estimator View
Sensor Properties¶
Double clicking on a sensor object will display the properties dialog. The properties dialog for a sensor object allows the user to:
- configure the sensor
- tune the sensor
- enable target communications and view sensor data
Fig. 140 Sensor Properties View
Position Display¶
Each properties dialog will display the “position” of the sensor. The rendering of this information is specific to the sensor type. The display is active whenever the Design Center target communications are active.
Each button in the group is displayed in a grid indexed by the sensor’s TX/RX ports.
- White indicates the button is not being touched
- Yellow indicates that the proximity threshold has been reached
- Green indicates that the touch threshold has been reached and that a touch has been detected
Fig. 141 Button Group Sensor
- Red indicates the slider is not being touched
- Green indicates that the touch threshold has been reached and that a touch has been detected
- The slider position is rendered on the display and the numeric value is also displayed below the GUI.
Fig. 142 Slider Sensor
Fig. 143 Proximity Sensor
- White indicates the button is not being touched
- Yellow indicates that the proximity threshold has been reached
- Green indicates that the touch threshold has been reached and that a touch has been detected
- Red indicates the wheel is not being touched
- Green indicates that the touch threshold has been reached and that a touch has been detected
- The wheel position is rendered on the display and the numeric value is also displayed below the GUI.
Fig. 144 Wheel Sensor
Sensor Configuration¶
The sensor configuration is specified through the properties dialog.
Fig. 145 Sensor Configuration
Electrode Configuration¶
Based on the specified number of elements, the Design Center will calculate the possible TX/RX port configurations along with the number of time cycles that are required for each of the configurations. The Design Center will default to a configuration that takes the minimum number of time cycles.
Fig. 146 Electrode Configuration
Configure TX/RX grouping¶
In some cases, it may be desired to change how the default assignment of the sensor elements to the TX/RX ports. Selecting the “Configure TX/RX Groups” will display a dialog where these mappings can be changed.
Fig. 147 TX/RX Grouping
The example below shows a typical 4-element self capacitive slider with default TX/RX group assignment. Note how the Design Center assigns RX0..RX3 to one pin from each CapTIvate™ block and to the sensor electrodes E00..E03. When designing the PCB it is important to follow these assignments generated by the Design Center. In the case of a slider or wheel, it is very important that RX0->E00, RX1->E01, RX2->E02, etc., else the algorithm will not work correctly.
Fig. 148 Typical TX/RX Sensor Group Assigment
There may be instances where a previous PCB design doesn’t match the current Design Center configuration or the PCB routing was done incorrectly. Below is an example showing a 4-element slider with RX1 and RX2 swapped (RX1 assigned to slider element E02 and RX2 assigned to slider element E01).
Fig. 149 Incorrect TX/RX Sensor Group Assignment
The Design Center sensor TX/RX group assignments can be overridden to provide electrode assignments that match the PCB design. Below is an example showing how sensor electrode E02 is assigned to RX02 and E01 is assigned to RX01 using the Sensor TX/RX grouping tool. After the re-assignment the Controller properties view shows the new proper sensor electrode assignments and the software can now processes the slider in the correct order.
Fig. 150 Corrected TX/RX Sensor Group Assignment
Note, this method provides a convenient way to reverse the behavior of either a slider or wheel if desired.
Enable Target Communications from Sensor Properties¶
Enable/disable target communications. This button is equivalent to the Communications->Connect/Disconnect menu items.
Fig. 151 Communications Enable
Sensor target data displays¶
Sensor Channel Bar Chart¶
Sensor Oscilloscope Plot¶
Sensor Channel Table¶
See Channel Table
Sensor Error Status Flags¶
This section shows the sensor error status flags for Negative Touch Detect flag and Max Count Error flag.
- Negative Touch Detect Flag: The Negative Touch flag is set when negative touch is detected.
- Max Count Error Flag: The Max Count Error flag is set when conversion count cross the error threshold.
For more information on these two flags, you can click the quick link on the flag indicators. After the flag indicators light up, user needs to manually clear them before it can be set again.
Fig. 152 Communications Enable
Tuning Sensor performance¶
The sensor parameters are specified through the Tuning and Conversion Control tabs. Real-time reading and writing values to the target requires that target communications are enabled.
Parameter values are written to the appropriate structures whenever the source code is generated for the design. The values will take affect after the new source code is compiled and loaded to the target.
It is also possible to read and write values directly to the target in real-time when the target communications are enabled in the Design Center. This enables real-time tuning of sensor performance and can greatly reduce the time necessary to achieve the desired system behavior.
Note: that any values loaded in real time will revert to the original values when the target is reset unless new source code is generated, compiled and loaded to the target.
Tuning Parameters¶
Fig. 153 Tuning View
Conversion Control Parameters¶
Fig. 154 Conversion Control View
Displaying Target Data¶
The Design Center provides a rich set of tools to view the sensor data from the target.
- Channel Bar Chart provides a easy way to visualize the interaction between the values related to measurement counts and touch/proximity thresholds
- Oscilloscope Plot provides a way to look at historical traces of the sensor data measurements
- Channel Table provides a tabular rendering of the data present in the Channel Bar chart along with the sensor to controller mapping for each sensor element
- Zoom in/out/full zoom
- To zoom in, click and drag down and to the right to define the zoom area
- To zoom out, click and drag up and to the left to define the amount to zoom out
- Click the right mouse button to do a full zoom out
- Plot Display options will display a dialog with several options for changing the plot display.
Fig. 155 Polt Options
Oscilloscope Plot¶
Data displayed for each channel:
- Count
- Delta
- Proximity status - value of 100 indicates that the Proximity Threshold has been reached
- Touch status - value of 100 indicates that the Touch Threshold has been reached
Fig. 157 Oscilloscope View
Channel Table¶
- Data displayed for each channel:
- Connection data
- Channel
- Sensor name
- Element
- TX
- RX
- Time Cycle
- Controller Port
- Parallel Sense Group
- Measurement data
- Count
- Delta
- Proximity Threshold
- Touch Threshold
- Proximity status - yellow indicates that the Proximity Threshold has been reached
- Touch status - green indicates that the Touch Threshold has been reached
Fig. 158 Channel View
SNR Measurements¶
The CapTIvate™ Design Center provides a built-in SNR measurement capability that makes it very easy to perform SNR data collection and calculations in real-time. The SNR measurement view is available on every sensor.
Fig. 159 SNR View
SNR Options¶
The SNR options provide flexibility for the data collection and measurement process.
- Filtering Enabled
- Selecting this option applies the Count Filter settings found in the Tuning Tab. This filter can impact the SNR results. Please refer to the Filter Count Beta and Enable options found in the Tuning Tab. TI recommends enabling the count filter.
- Sample Size
- The sample size is the number of samples taken during the touch portion of the test and the release portion of the test. TI recommends capturing 1000 samples.
- Measurement Selection
- Select “Touch” to measure the touch detection SNR and margins. Select “Prox” to measure the proximity detection SNR and margins.
- Element
- Select the desired sensing element in the current sensor to measure.
- Export CSV
- Export the entire sample set for the next measurement to the SNR CSV file in the project folder.
- Overwrite CSV
- If Export to CSV and Overwrite CSV are selected, then the SNR CSV file in the project directory will be cleared before the SNR measurement is performed and only the new results will be kept in the SNR CSV file. If this option is not selected, then each measurement is appended to the existing CSV file.
Fig. 160 SNR Options
SNR Prompts¶
The SNR measurement process is automated, but does require interaction (touch) with the sensors. Only one electrode can be measured at a time. In the table under the SNR options, click to select the electrode to be measured, then click the “Measure SNR” button. The first prompt will appear. Touch and hold the target electrode and click the “OK” button. After the number of samples have been acquired, the second prompt will appear. Remove your finger from the electrode and click the “OK” button.
Fig. 161 SNR Measurement Prompts
When the measurement sequence is complete, the SNR calculations are displayed in the selected electrode row.
Fig. 162 SNR Measurements
Loading and running generated projects¶
Importing/opening projects¶
Code Composer Studio¶
To import a CCS project generated by the Design Center, follow the instructions below.
- Launch CCS
- Select “Project->Import CCS Projects”
- Provide the location of the generated project source and select the project
- Click “Finish”
- Compile and load the code onto the target MSP430
- Click the “debug” button
- Click the “run” button
- Click the “stop” button
Click the “stop” button to stop the debugger.
IAR Embedded Workbench¶
To open an IAR project generated by the Design Center, follow the instructions below.
- Launch IAR Embedded Workbench
- Go to “File->Open Workspace” and navigate to the generated source directory
- Select the workspace file found under “IAR/.eww”
- Compile and load the code onto the target MSP430
- Start debugging (Project->Download and Debug)
- Start execution (Debug->Go)
- Stop execution (Debug->Stop Debugging)
Click the “Stop Debugging” menu item to stop the debugger.
Enable target communications in the Design Center¶
Once the code has been loaded onto the target, select the “Communications->Connect” menu in the Design Center to enable the HID communications.