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