AN333
Debug FunctionsData Communication
PC Base Adapter Daughter Card
Silicon Labs IDE Debug Logic
ToolStick
Virtual Tools
UART
GPIO
MCU
Debug HW
UART & GPIO
External HW
USB
Card
Edge
TOOLSTICK VIRTUAL TOOLS USER’S GUIDE
RELEVANT DEVICES
All Silicon Labs MCUs.
1. Introduction
The ToolStick development platform consists of a ToolStick Base Adapter and a ToolStick Daughter card. The
ToolStick Virtual Tools application provides a set of tools for the PC that can be controlled via the UART serial
interface of the ToolStick Base Adapter. The ToolStick Virtual Tools application includes the following components:
To o lS ti c k Te rm i na l
ToolStick Virtual LCD
ToolStick Virtual Oscilloscope
Figure 1 shows a system block diagram of the ToolStick platform and the communication path between the
ToolStick Virtual Tools application and the MCU firmware.
Figure 1. ToolStick Development Platform Block Diagram
2. Getting Started
The ToolStick Virtual Tools installer can be downloaded from www.silabs.com/mcuniversity. This installer includes
the following components:
ToolStick Virtual Tools
Documentation
PCB files
ToolStick Virtual Tools interface libraries
Code examples
Figure 2 shows the ToolStick Virtual Tools launch window from which each of the individual tools can be launched.
Rev. 0.2 4/20 Copyright © 2020 by Silicon Laboratories AN333
AN333
Figure 2. ToolStick Virtual Tools
2.1. System Requirements
ToolStick Virtual Tools requirements consist of the following:
Pentium class host PC running Windows 2000 or newer.
One available USB port.
64 MB RAM and 40 MB free HD space recommended.
2.2. Software Installation
Download the ToolStick Virtual Tools installer from www.silabs.com/mcuniversity. Launch the installer, and follow
the prompts to complete the installation. The ToolStick Virtual Tools are installed to the following default location:
C:\SiLabs\MCU\ToolStick\UniversityDC\VirtualTools\.
If you plan to build and download code to the target MCU on the daughter card, you will need the Silicon
Laboratories Integrated Development Environment (IDE). This IDE integrates a source-code editor, a source-level
debugger, and an in-system Flash programmer. It is also available for download from the above website
(www.silabs.com/mcuniversity). See the ToolStick University Daughter Card User’s Guide included with the
ToolStick Virtual Tools for instructions on using the IDE. This document would be installed by default at
C:\SiLabs\MCU\ToolStick\UniversityDC\Documentation\.
Note: The ToolStick Base Adapter uses a USB connection to the PC, but does not require any external device drivers to be
installed. This is because the base adapter conforms to the USB Human Interface Device (HID) class, for which the
device drivers are supplied with the Windows OS (Windows 2000 or newer).
2 Rev. 0.2
AN333
3. ToolStick Virtual Tools Interface Libraries
The following set of device interface functions implement an Application Programming Interface (API) on the target
MCU. Using these functions simplifies code development when interfacing with the ToolStick Virtual Tools. The API
is provided in the form of precompiled libraries compiled under the Keil (TS_vInterface_Keil.LIB) and SDCC
(TS_vInterface_SDCC.LIB) toolsets. All functions in the interface library are declared in the header file,
TS_vInterface.h. In order to make use of these libraries, device firmware must be developed using one of these
toolsets, with the appropriate library included in the build. The available interface functions are:
SilabsInit020() - Initializes the C8051F020 MCU for use with the Virtual Tools
TerminalWrite() - Writes a byte to the ToolStick Terminal
TerminalRead() - Reads a byte from the ToolStick Terminal
LCD_ControlWrite() - Writes a control byte to the Virtual LCD
LCD_ControlRead() - Reads a control byte from the Virtual LCD
LCD_DataWrite() - Writes a data byte to the Virtual LCD
LCD_DataRead() - Reads a data byte from the Virtual LCD
ScopeClearBuffer() - Clears the Virtual Oscilloscope data buffer
ScopeSampleWrite() - Writes a sample value to a Virtual Oscilloscope channel
Lib_VersionRead() - Returns the ToolStick Virtual Tools interface library version
Each of these functions is described in detail in the following sections. The interface libraries are included in the
ToolStick Virtual Tools installer and are installed to the following default location:
C:\SiLabs\MCU\ToolStick\UniversityDC\Interface_Libraries\. See "Appendix A—ToolStick Virtual Tools Interface
Library Details" on page 10 for more details about the interface libraries.
3.1. SilabsInit020
Description: This function initializes the C8051F020 MCU for use with the ToolStick Virtual Tools. The MCU
system clock is configured to use the external 22.1184 MHz crystal present on the ToolStick University daughter card. The crystal is required for proper UART communication. The UART is configured for a baud rate of 230400 bps with a data format of 8-N-1 (8 data bits, No parity,
1 stop bit). Timer 1 is used as the baud rate generator. The Port I/O crossbar is enabled. The
port pin, P0.0 (TX), is configured as a push-pull output, and the port pin, P0.1 (RX), is configured
as a digital input.
Supported Devices: C8051F020
Prototype: void SilabsInit020 (void)
Parameters: None.
Return Value: None.
3.2. Lib_VersionRead
Description: This function reads a version number of the ToolStick Virtual Tools interface library.
Supported Devices: All Silicon Labs MCUs. See Appendix A.
Prototype: uint8_t Lib_VersionRead (void)
Parameters: None.
Return Value: Returns an unsigned 8-bit value indicating the library version.
Rev. 0.2 3
AN333
4. 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, the 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), two GPIO pins on the target microcontroller can be controlled using the Terminal
for RTS/CTS handshaking. The UniDC_VirtualTools_Demo example code included with the ToolStick Virtual
Tools installer illustrates the use of this application. See "7. Library Files, Header Files, and Code Examples" on
page 9 to locate this example.
Note: The ToolStick Terminal application integrated within the ToolStick Virtual Tools application differs from the standalone
ToolStick Terminal application available from www.silabs.com/toolstick. In the case of the Terminal in Virtual Tools, the
baud rate is fixed at 230400 bps and is set up for RTS/CTS handshaking. These two options cannot be changed for any
of the ToolStick Virtual Tools applications.
The following sections describe the two Terminal interface functions included in the ToolStick Virtual Tools Interface
Library. Figure 3 shows the ToolStick Terminal application.
Figure 3. ToolStick Terminal Application
4 Rev. 0.2