To o l St i c k - C a p To u c h S e n s e D C
8
Rev. 0.3
7. ToolStick CapTouchSense Daughter Card Example Code
The ToolStick kit includes two code examples. One of them is titled
CapTouchSenseDC_SwitchSensitivity
. This
example can be used by a new user to learn the features and capabilities of the IDE and the microcontroller’s on-
chip debug capabilities. A ToolStick Base Adapter is required to be able to download code to the daughter card and
perform debugging.
7.1. Hardware Setup
Connect the ToolStick hardware to the PC using the steps below while taking note of the recommendations in
Section 1:
1. Connect the ToolStick Base Adapter to the ToolStick CapTouchSense Daughter Card.
2. If available, connect the USB extension cable to the ToolStick Base Adapter.
3. Set the Power Select Switch (S1) to select ToolStick Power (TS PWR).
4. Connect the ToolStick to a USB port on a PC.
See Figure 5 for an example hardware setup using the C8051F330 ToolStick Daughter Card.
7.2. Connecting to the Device and Downloading Firmware
This section describes how to open the IDE, open and build a project, connect to a device and download the
firmware.
1. Open the Silicon Laboratories IDE 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
CapTouchSenseDC_SwitchSensitivity.wsp
and click OK.
5. In the IDE, select
Project
Rebuild Project
.
6. Go to
Options
Connection Options
.
7. Select “
USB Debug Adapter
” for the Serial Adapter and “
C2
” for the Debug Interface, and then click “OK”. If
you have other Silicon Labs debug adapters connected to the PC, ensure that the correct ToolStick is selected
in the drop-down box.
8. Go to
Debug
Connect
.
9. Erase code space using the
Tools
Erase Code Space
command to remove configuration constants stored
by the memory game in non-volatile Flash. It is not required when re-downloading the same software project.
10.Download the code using the
download button
on the menu bar or use alt-D.
Once these steps are completed, the firmware is built into an object file (step 5) and downloaded to the device
(step 9). The device is now ready to begin executing code. If all of these steps were followed successfully, the “Go”
option is enabled in the Debug menu. A green circle icon in the IDE toolbar also indicates that the device is ready
to run. If one of the steps leads to an error, make sure that the ToolStick is properly inserted in a USB port and start
again with step 6.