background image

To o l St i c k - C a p To u c h S e n s e D C

Rev. 0.3

9

7.3.  Running and Stopping Code Execution

Once the IDE is connected to the device and the firmware is loaded, the IDE can start and stop the code execution.
The following steps can be performed using the buttons on the toolbar or using the options in the Debug menu.

1. To start code execution, click the green “

Go

” button on the toolbar or use the 

Debug 

 Go

 menu option. The 

debug commands in the IDE (single-step, multiple-step, set breakpoint, and others) are disabled when the 
device is running. While the firmware is running, pressing any switch on the daughter card will turn on the 
corresponding LED. The less sensitive switches will require a firmer touch to turn on the LED, and the more 
sensitive switches will require only a light touch. The first time the firmware runs, it will enter the configuration 
mode described in Section 7.4.

2. To stop code execution, click the red “

Stop

” button on the toolbar or use the 

Debug 

 Stop

 menu option. The 

device will halt code execution and all of the registers and pins on the device will hold their state.

All debug windows and watch windows are refreshed when the device is stopped. If any of the values in these
windows have changed since the last time the device was halted, the new value is shown in red text instead of
black text.

7.4.  Configuring the Capacitive Touch Sense Switches

The 

CapTouchSenseDC_SwitchSensitivity 

example includes code that allows the configuration of the capacitive

touch sense switches. This code is executed the first time firmware is run or when the code constants are removed
from Flash memory (e.g., using the Erase Code Space command).

1. Start code execution by clicking the green “

Go

” button on the toolbar or using the 

Debug 

 Go

 menu option. 

The blue LED will light up to indicate that no calibration values are present. If the blue LED is not on, press the 
mechanical switch (S2) to start configuration.

2. Put your finger on touch sensitive switch A and press and release the mechanical switch.

3. Repeat Step 2 for the remaining three switches.  The LED will turn on to indicate which switch to put your finger 

on.

4. Touching each switch should now light up the corresponding LED.

7.5.  Restoring the Memory Game Demo

The 

CapTouchSenseDC_Memory_Game 

can be restored in the CapTouchSense daughter card using the 

following steps.

1. Close the current project or open a new instance of the Silicon Laboratories IDE.

2. Connect to the target.

3. Click the 

download button 

on the menu bar or use alt-D.

4. Click 

Erase All Code Space

.  Click OK to erase all code and the configuration values stored in the scratchpad 

memory.

5. Browse for the HEX file named 

CAPTOUCHSENSEDC_MEMORY_GAME.hex

.

6. Click 

Download

.

7. Disconnect from the target to start executing code. The red and yellow will light up to indicate that no calibration 

values are present.

8. Press the S2 switch to begin configuration. Be careful not to touch the capacitive touch sense switches while 

Summary of Contents for ToolStick-CapTouchSenseDC

Page 1: ...commendations when using the ToolStick Never connect or disconnect a daughter card to or from the ToolStick Base Adapter while the Base Adapter is connected to a PC Always connect and disconnect the T...

Page 2: ...Some daughter cards such as the CapTouchSense Daughter Card are used to demonstrate a specific feature or application and some are used as general purpose development platforms for the target microcon...

Page 3: ...package includes example code documentation including user s guides and data sheets and the ToolStick Terminal application The IDE Keil Demonstration Tools Configuration Wizard 2 and the Keil Vision D...

Page 4: ...nd have the programs start at code address 0x0000 5 3 Configuration Wizard 2 The Configuration Wizard 2 is a code generation tool for all of the Silicon Laboratories devices Code is generated through...

Page 5: ...ion please refer to the Vision driver documentation The documentation and software are available from the Downloads webpage www silabs com mcudownloads 5 5 ToolStick Terminal The ToolStick Terminal pr...

Page 6: ...ry into the battery holder BAT1 ensuring that the terminal is on the top side as marked on the battery holder 2 Set the Power Select Switch S1 to select Battery Power BAT PWR The yellow power source i...

Page 7: ...and green LEDs blinking alternately If you press a switch in the wrong sequence an error will be indicated by the red LED blinking four times The game will then restart at the same level and you will...

Page 8: ...DE from the Start Programs Silicon Laboratories menu 2 In the IDE go to Project Open Project 3 Browse to the default installation location C SiLabs MCU ToolStick CapTouchSenseDC Firmware 4 Select CapT...

Page 9: ...hSenseDC_SwitchSensitivity example includes code that allows the configuration of the capacitive touch sense switches This code is executed the first time firmware is run or when the code constants ar...

Page 10: ...ll light up to indicate that the calibration is complete and the game is ready to be played 8 Additional Demo Examples In addition to the CapTouchSenseDC_SwitchSensitivity example firmware the ToolSti...

Page 11: ...connect the LED from the pin P1 1 This pin is connected to the cathode of the green LED on the daughter card The LED or R24 resistor can be removed to disconnect the LED from the pin P1 5 This pin is...

Page 12: ...le switches to be operated using one comparator 11 Information Locations Example source code is installed by default in the C SiLabs MCU ToolStick CapTouchSenseDC Firmware directory during the ToolSti...

Page 13: ...X7R L1 680nH R3 330 D2 1 8V YELLOW R4 1k2 R5 1k2 D3 1 8V YELLOW D4 1 8V RED R6 1K R7 1K S2 R10 1K TP3 TP6 TP7 TP8 TP9 TP10 TP11 TP12 TP13 TP14 TP15 TP16 TP17 TP18 TP19 TP20 TP21 1 GND DC 2 GND 3 VDD D...

Page 14: ...ndescribed features or parameters Silicon Laboratories reserves the right to make changes without further notice Silicon Laboratories makes no warranty rep resentation or guarantee regarding the suita...

Reviews: