To enable development, the ToolStick Base Adapter and daughter cards are distributed without any protective
plastics. To prevent damage to the devices and/or the host PC, please take into consideration the following
recommendations 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 ToolStick Base Adapter from the PC by holding the edges of the boards.
Figure 1. Proper Method of Holding the ToolStick
Avoid directly touching any of the other components.
Figure 2. Improper Method of Holding the ToolStick
Manipulate mechanical devices on the daughter cards, such as potentiometers, with care to prevent the Base
Adapter or daughter card from accidentally dislodging from their sockets.
The ToolStick-CapTouchSenseDC kit contains the following items:
ToolStick CapTouchSense Daughter Card
One A76 battery
A ToolStick daughter card requires a ToolStick Base Adapter to communicate with the PC. ToolStick Base Adapters
can be purchased at www.silabs.com/toolstick. The ToolStick-CapTouchSenseDC is also available as part of a
ToolStick Starter Kit (CapTouchSenseSK) that includes a CapTouchSenseDC, Toolstick Base Adapter, and USB
Extension Cable and may be purchased from the same link.
3. ToolStick Overview
The purpose of the ToolStick is to provide a development and demonstration platform for Silicon Laboratories
microcontrollers and to demonstrate the Silicon Laboratories software tools, including the Integrated Development
Environment (IDE).
The ToolStick development platform consists of two components: the ToolStick Base Adapter and a daughter card.
The ToolStick Base Adapter provides a USB debug interface and data communications path between a Windows
PC and a target microcontroller.
The target microcontroller and application circuitry are located on the daughter card. 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 microcontrollers.
The CapTouchSense Daughter Card includes a C8051F931 MCU, four GPIO controlled LEDs, a switch connected
to a GPIO, four capacitive touch sense switches, and a small prototyping area which provides access to all of the
pins of the device. This prototyping area can be used to connect additional hardware to the microcontroller and use
the daughter card as a development platform. The CapTouchSense Daughter Card also includes an A76 1.5 V
alkaline battery which can be used to power the board when not connected to the Toolstick Base Adapter. The
C8051F931 MCU on this daughter card will continue to operate from the single “button cell” battery until the supply
voltage drops below 0.9 V.
Figure 3 shows the ToolStick CapTouchSense Daughter Card and identifies the various components.
Voltage Regulator
(3.3 V to 1.5V)
ToolStick Power Available
Red LED
Power Source Indicator
Yellow LED
Power Source
Selector
Switch (S1)
1.5V Battery
Holder
C8051F931
MCU
Full Pin Access
P0.2 Push
Button Switch (S2)
Figure 3. ToolStick CapTouchSense Daughter Card
2Rev. 0.2
P1.0
Blue LED
P1.5
Red LED
P1.1
Green LED
P1.6
Yellow LED
Capacitive Touch
Sense Switches
ToolStick-CapTouchSenseDC
4. Getting Started
The necessary software to download, debug and communicate with the target microcontroller must be downloaded
from www.silabs.com/toolstick. The following software is necessary to build a project, download code to, and
communicate with the target microcontroller:
The Keil Demo Tools include a compiler, assembler, and linker. See Section “5.2. Keil Demonstration Toolset” for
more information about the evaluation version limitations. ToolStick Terminal communicates with the target
microcontroller's UART through the ToolStick Base Adapter. It can also read/write the two GPIO pins available on
the ToolStick Base Adapter.
Other useful software that is provided on the Silicon Labs Downloads (www.silabs.com/mcudownloads) website
includes the following:
Configuration Wizard 2
Keil µVision2 and µVision3 Drivers
All of the above software is described in more detail in Section “5. Software Overview”.
The software described above is provided in several download packages. The ToolStick Download 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 Drivers are available
as separate downloads. After downloading and installing these packages, see the following sections for information
regarding the software and running one of the demo applications.
5. Software Overview
5.1. Silicon Laboratories IDE
The Silicon Laboratories IDE integrates a source-code editor, source-level debugger, and an in-system Flash
programmer. See Section “7. ToolStick CapTouchSense Daughter Card Example Code” for information on how to
use the IDE. The Keil Demonstration Toolset includes a compiler, linker, and assembler and easily integrates into
the IDE. The use of third-party compilers and assemblers is also supported.
5.1.1. IDE System Requirements
The Silicon Laboratories IDE requirements:
Pentium-class host PC running Microsoft Windows 2000 or Windows XP.
One available USB port.
64 MB RAM and 40 MB free HD space recommended.
5.1.2. 3rd Party Toolsets
The Silicon Laboratories IDE has native support for many 8051 compilers. The full list of natively supported tools is
as follows:
The demo applications for the CapTouchSense Daughter Card are written for the Keil and SDCC toolsets.
Rev. 0.23
ToolStick-CapTouchSenseDC
5.2. Keil Demonstration Toolset
5.2.1. Keil Assembler and Linker
The Keil demonstration toolset assembler and linker place no restrictions on code size.
5.2.2. Keil Demonstration C51 C Compiler
The evaluation version of the C51 compiler is the same as the full version with the following limitations: (1)
Maximum 4 kB code generation, (2) There is no floating point library included. When initially installed, the C51
compiler is limited to a code size of 2 kB, and programs start at code address 0x0800. Refer to “AN104: Integrating
Keil Tools into the Silicon Labs IDE" for instructions to change the limitation to 4 kB and 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 the use of dialog boxes for each of the device's peripherals.
Figure 4. Configuration Wizard 2 Utility
The Configuration Wizard 2 utility helps accelerate development by automatically generating initialization source
code to configure and enable the on-chip resources needed by most design projects. In just a few steps, the wizard
creates complete startup code for a specific Silicon Laboratories MCU. The program is configurable to provide the
output in C or assembly.
For more information, please refer to the Configuration Wizard 2 documentation. The documentation and software
are available from the Downloads webpage (www.silabs.com/mcudownloads).
4Rev. 0.2
ToolStick-CapTouchSenseDC
5.4. Keil µVision2 and µVision3 Silicon Laboratories Drivers
As an alternative to the Silicon Laboratories IDE, the uVision debug driver allows the Keil µVision2 and µVision3
IDEs to communicate with Silicon Laboratories on-chip debug logic. In-system Flash memory programming
integrated into the driver allows for rapidly updating target code. The µVision2 and µVision3 IDEs can be used to
start and stop program execution, set breakpoints, check variables, inspect and modify memory contents, and
single-step through programs running on the actual target hardware.
For more information, 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 program provides the standard terminal interface to the target microcontroller's UART.
However, instead of requiring the usual RS-232 and COM port connection, ToolStick Terminal uses the USB
interface of the ToolStick Base Adapter to provide the same functionality.
In addition to the standard terminal functions (send file, receive file, change baud rate), two GPIO pins on the target
microcontroller can be controlled using the Terminal for either RTS/CTS handshaking or software-configurable
purposes (see the demo software for an example).
The software is available on the ToolStick webpage (www.silabs.com/toolstick).
Rev. 0.25
ToolStick-CapTouchSenseDC
6. ToolStick CapTouchSense Daughter Card Memory Game Demo
The ToolStick CapTouchSense Daughter Card is pre-loaded with a memory game firmware that can be played
without connecting to the ToolStick Base Adapter. When disconnected from the ToolStick Base Adapter, the
daughter card may be powered from the included A76 alkaline battery. When connected to a ToolStick Base
Adapter, the daughter card can be powered from the USB port.
6.1. Hardware Setup
To use the CapTouchSense Daughter Card in standalone mode (battery powered) perform the following steps:
1. Insert the A76 alkaline “button cell” battery 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 indicator LED
should be OFF.
To use the CapTouchSense Daughter Card with a ToolStick Base Adapter (USB powered) perform the following
steps:
1. Connect the ToolStick Base Adapter to the ToolStick CapTouchSense Daughter Card taking note of the
recommendations in Section 1.
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). The yellow power source indicator LED
should be ON.
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.
Figure 5. Hardware Setup Example
6Rev. 0.2
ToolStick-CapTouchSenseDC
6.2. Playing the Memory Game
This section describes how to play the memory game using the capacitive touch sense switches on the
CapTouchSenseDC. The objective of the game is to remember a sequence of lights and press the corresponding
switches. As the player correctly presses the sequence of switches and advances to the next level, the number of
switch presses in a sequence increases. The player wins when the correct sequence at the last level is entered.
1. Press the S2 switch on the daughter card to enter the game. After pressing the S2 switch, all four LEDs will light
up.
2. Press one of the capacitive touch sense switches to select the difficulty level and start the game. Switches A, B,
C, and D select 4, 8, 16, and 32 levels, respectively.
3. The game begins at level 1. One LED will blink. Press the corresponding switch to advance to the next level.
4. In the second level, there will be a sequence of two blinks. Press the corresponding switches in the same
sequence as the LED blinks to advance to the next level.
5. Continue the game until you complete all levels to win the game. A game win is indicated by the blue 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 have two such retries. The third
error will end the game. This will be indicated by the red and yellow LED blinking alternately.
6. The game can be restarted by pressing the S2 switch.
6.3. Evaluating the Capacitive Touch Sense Switch Sensitivity
Holding the S2 switch for longer than 5 seconds places the device in a switch sensitivity test mode where the
corresponding LED lights up each time a switch press is detected. If connected to the ToolStick Terminal, the raw
codes corresponding to the relaxation oscillator period are displayed on the screen. When the switch capacitance
increases (i.e., the switch is touched), the raw code from the switch should increase. By knowing the approximate
value of "switch pressed" and "switch idle", the appropriate finger-detect threshold can be determined.
When ToolStick Terminal is connected, ensure that the GPIO0 and GPIO1 pins are configured as inputs so that
they do not interfere with the MCU. While running this software, the GPIO pins should only be driven by the MCU.
See the board schematic in "12. ToolStick CapTouchSense Daughter Card Schematic‚" on page 13 to see the
connection between the GPIO pins and the MCU.
Rev. 0.27
ToolStick-CapTouchSenseDC
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 onchip 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.
8Rev. 0.2
ToolStick-CapTouchSenseDC
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.
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
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.
While the firmware is running,
7.4.
pressing any switch on the daughter card will turn on the
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
Rev. 0.29
ToolStick-CapTouchSenseDC
pressing the S2 switch. The blue and green LEDs will blink a few times and switch off. This indicates
configuration is complete.
9. Press each of the capacitive touch sense switches to test the configuration, and finally press the S2 switch to
return to the game. All four LEDs will 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 ToolStick download package also
includes another example project named CapTouchSenseDC_Memory_Game. The instructions for running this
example can be found at the top of the source file.
The project and source files for these examples can be found by default in the
C:\SiLabs\MCU\ToolStick\CapTouchSenseDC\Firmware\ folder.
10Rev. 0.2
ToolStick-CapTouchSenseDC
9. Using the CapTouchSense Daughter Card as a Development Platform
The prototyping area on the ToolStick CapTouchSense Daughter Card makes it easy to interface to external
hardware. All of the digital I/O pins of the C8051F931 MCU are available so it is possible to create a complete
system.
9.1. C8051F931 Pin Connections
It is important to note that if external hardware is being added, some of the existing components on the board can
interfere with the signaling. The following is a list of port pins on the C8051F931 that are connected to other
components:
P0.2—This pin is connected to the P0.2 switch. The switch and R10 can be safely removed from the daughter
card if they are not needed.
P0.0, P0.1, P0.3, P1.2—These pins are connected to capacitive touch sense switches. The 0 Ω resistors R15,
R17, R18, and R19 be safely removed from the daughter card if the capacitive touch sense switches are not
needed.
P0.4, P0.5—These pins are connected directly to the ToolStick Base Adapter for UART communication.
P1.0, P1.1—These pins are connected directly to the ToolStick Base Adapter’s GPIO pins. By default, these
GPIO pins on the Base Adapter are high-impedance pins so they will not affect any signaling. Configuring these
pins on the Base Adapter to output pin or handshaking pins could affect signaling.
P1.3—This pin is connected to the power source detect signal.
P1.0—This pin is connected to the cathode (-) of the blue LED on the daughter card. The LED or R23 resistor
can be removed to disconnect 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 connected to the cathode (-) of the red LED on the daughter card. The LED or R5 resistor can
be removed to disconnect the LED from the pin.
P1.6—This pin is connected to the cathode (-) of the yellow LED on the daughter card. The LED or R4 resistor
can be removed to disconnect the LED from the pin.
See the daughter card schematic in Section 12 for more information.
9.2. VREF Capacitor
On the C8051F931 devices, if VREF is generated using the High-Speed Internal Reference, no output capacitor is
required. If using the on-chip Precision Voltage Reference, it is highly recommended to place a capacitor on the
VREF output pin. On the ToolStick CapTouchSense Daughter Card, there are pads on the board (C5) to populate a
0603 surface mount capacitor. There are also pads on the board (R14) to facilitate shorting P0.1 to the ground
plane for use as an analog ground reference (AGND). The firmware examples for the daughter card use the HighSpeed Internal Reference as VREF and the GND pin as a ground reference, so no external capacitor on P0.0 is
necessary for proper operation. Also, P0.1 may be used for general purpose I/O.
9.3. C2 Pin Sharing
On the C8051F931, the debug pins, C2CK, and C2D, are shared with the pins /RST and P2.7 respectively. The
daughter card includes the resistors necessary to enable pin sharing which allow the /RST and P2.7 pins to be
used normally while simultaneously debugging the device. See Application Note “AN124: Pin Sharing Techniques
for the C2 Interface” at www.silabs.com for more information regarding pin sharing.
Rev. 0.211
ToolStick-CapTouchSenseDC
10. Capacitive Touch Sense Switches
The capacitive touch sensitive switches on the CapTouchSenseDC are implemented as relaxation oscillators, with
the PCB trace forming the touch-sensitive capacitive element. The relaxation oscillator is constructed using the onchip analog comparator, on-chip resistors in the C8051F931 MCU. The on-chip analog multiplexer allows multiple
switches to be operated using one comparator. See Application Note “AN338: Capacitive Touch Sense Solution” at
www.silabs.com for more information related to the capacitive touch sense switches.
11. Information Locations
Example source code is installed by default in the “C:\SiLabs\MCU\ToolStick\CapTouchSenseDC\Firmware”
directory during the ToolStick installation.
Documentation for the ToolStick kit, including this User’s Guide, can be found by default in the
C:\SiLabs\MCU\ToolStick\Documentation and the C:\SiLabs\MCU\ToolStick\CapTouchSenseDC\Documentation
directories.
The installer for the ToolStick software is available at www.silabs.com/toolstick.
All application notes are available at http://www.silabs.com/products/microcontroller/applications.asp.
Silicon Laboratories Inc.
400 West Cesar Chavez
Austin, TX 78701
Email: MCUinfo@silabs.com
Internet:
www.silabs.com
The information in this document is believed to be accurate in all respects at the time of publication but is subject to change without notice.
Silicon Laboratories assumes no responsibility for errors and omissions, and disclaims responsibility for any consequences resulting from
the use of information included herein. Additionally, Silicon Laboratories assumes no responsibility for the functioning of undescribed features
or parameters. Silicon Laboratories reserves the right to make changes without further notice. Silicon Laboratories makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Silicon Laboratories assume any liability
arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. Silicon Laboratories products are not designed, intended, or authorized for use in applications intended to
support or sustain life, or for any other application in which the failure of the Silicon Laboratories product could create a situation where personal injury or death may occur. Should Buyer purchase or use Silicon Laboratories products for any such unintended or unauthorized application, Buyer shall indemnify and hold Silicon Laboratories harmless against all claims and damages.
Silicon Laboratories and Silicon Labs are trademarks of Silicon Laboratories Inc.
Other products or brandnames mentioned herein are trademarks or registered trademarks of their respective holders.
14Rev. 0.2
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.