PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram



Similar documents
How To Develop A Toolstick

ZigBee-2.4-DK 2.4 GHZ ZIGBEE DEVELOPMENT KIT USER S GUIDE. 1. Kit Contents. Figure GHz ZigBee Development Kit

CP2110-EK CP2110 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup

AN220 USB DRIVER CUSTOMIZATION

APPLICATION. si32library. Callback CMSIS HARDWARE. Figure 1. Firmware Layer Block Diagram

AN220 USB DRIVER CUSTOMIZATION

AN655 R ANGE TEST APPLICATION FOR EZRADIO AND EZRADIOPRO. 1. Introduction. 2. Supported Radio Types

1 Software Overview ncp-uart ash-v3-test-app ash-v3-test-app Command Line Options Testing... 2

AN104 I NTEGRATING KEIL 8051 TOOLS INTO THE SILICON LABS IDE. 1. Introduction. 2. Key Points. 3. Create a Project in the Silicon Labs IDE

AN588 ENERGY HARVESTING REFERENCE DESIGN USER S GUIDE. 1. Kit Contents. 2. Introduction. Figure 1. Energy Harvesting Sensor Node

UG103.8 APPLICATION DEVELOPMENT FUNDAMENTALS: TOOLS

USB FM Radio-RD USB FM RADIO USER S GUIDE. 1. USB FM Radio Setup. One-time set-up enables configuration of presets and region specific FM band

AN335 USB DRIVER INSTALLATION UTILITY. 1. Description. 2. Installation Install Package

AN335 USB DRIVER INSTALLATION METHODS. 1. Introduction. 2. Relevant Documentation. 3. DPInst Installation and Customization

Serial Communications

QSG105 GETTING STARTED WITH SILICON LABS WIRELESS NETWORKING SOFTWARE

In the idle state, the TIP lead will be high impedance to ground and the RING lead will have the battery voltage. See Figure 1.

Figure 1. 8-Bit USB Debug Adapter

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

AND8336. Design Examples of On Board Dual Supply Voltage Logic Translators. Prepared by: Jim Lepkowski ON Semiconductor.

USER GUIDE EDBG. Description

In-System Programmer USER MANUAL RN-ISP-UM RN-WIFLYCR-UM

AN710 BRINGING UP CUSTOM DEVICES FOR THE EMBER EM35XX SOC OR NCP PLATFORM. (Formerly document )

CodeWarrior Development Studio for Freescale S12(X) Microcontrollers Quick Start

Lab Experiment 1: The LPC 2148 Education Board

AN437. Si4432 RF PERFORMANCE AND FCC COMPLIANCE TEST RESULTS. 1. Introduction. 2. Relevant Measurements to comply with FCC

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

Bootloader with AES Encryption

C8051F020 Utilization in an Embedded Digital Design Project Course. Daren R. Wilcox Southern Polytechnic State University Marietta, Georgia

Developing an Application on Core8051s IP-Based Embedded Processor System Using Firmware Catalog Drivers. User s Guide

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

Serial Communications

etpu Host Interface by:

RN-XV-RD2 Evaluation Board

Design Considerations in Adding USB Communications to Embedded Applications

Software Real Time Clock Implementation on MC9S08LG32

Freescale Semiconductor, Inc. Product Brief Integrated Portable System Processor DragonBall ΤΜ

Software User Guide UG-461

COM Port Stress Test

Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A

SUDT AccessPort TM Advanced Terminal / Monitor / Debugger Version 1.37 User Manual

RN-131-PICTAIL & RN-171-PICTAIL Evaluation Boards

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

USB / Data-Acquisition Module NOW LEAD-FREE

AN10866 LPC1700 secondary USB bootloader

FLoader User's Manual

TWR-KV31F120M Sample Code Guide for IAR Board configuration, software, and development tools Rev.0

Microtronics technologies Mobile:

Freescale Semiconductor, I

Connect the EFM32 with a Smart Phone through the Audio Jack

UM0834 User manual. Developing and debugging your STM8S-DISCOVERY application code. Introduction. Reference documents

SMARTCARD XPRO. Preface. SMART ARM-based Microcontrollers USER GUIDE

AN108 IMPLEMENTING A REALTIME CLOCK. Relevant Devices. Introduction. Key Points. Overview

AN111: Using 8-Bit MCUs in 5 Volt Systems

Application Note: AN00141 xcore-xa - Application Development

ELAN DIGITAL SYSTEMS LTD. SL232 PC- CARD USER S GUIDE

XPort Universal Demo Board User Guide

RN-131-PICTAIL & RN-171-PICTAIL Web-Server Demo Application

Getting Started with Kinetis SDK (KSDK)

Using Xbee in Serial Communication

USER GUIDE Programming Adapter Cable for Fujitsu Flash Microcontroller- F²MC-16LX/FR Family Fujitsu Microelectronics America, Inc.

ET-BASE AVR ATmega64/128

AN LPC1700 timer triggered memory to GPIO data transfer. Document information. LPC1700, GPIO, DMA, Timer0, Sleep Mode

Evo Laser Firmware Developer s Manual

Robust Over-the-Air Firmware Updates Using Program Flash Memory Swap on Kinetis Microcontrollers

Performance Monitor on PowerQUICC II Pro Processors

Production Flash Programming Best Practices for Kinetis K- and L-series MCUs

AN428 J UMP START: IN-SYSTEM, FLASH-BASED PROGRAMMING FOR SILICON LABS TIMING PRODUCTS. 1. Introduction

Windows 7: Using USB TAP on a Classic CodeWarrior Installation (MGT V9.2 DSC V8.3)

An introduction to nxpusblib. March 2012

Installing Service Pack Updater Archive for CodeWarrior Tools (Windows and Linux) Quick Start

AN3332 Application note

Using WinUSB in a Visual Studio Project with Freescale USB device controller

Scanning Comparator (ScanComp) Features. General Description. Input/Output Connections. When to Use a Scanning Comparator. clock - Digital Input* 1.

APPLICATION NOTE. AT07175: SAM-BA Bootloader for SAM D21. Atmel SAM D21. Introduction. Features

AN10811 Programming SPI flash on EA3131 boards Rev May 2009 Application note Document information Info Content Keywords Abstract

Programming Audio Applications in the i.mx21 MC9328MX21

Embedded Component Based Programming with DAVE 3

AN862. OPTIMIZING Si534X JITTER PERFORMANCE IN NEXT GENERATION INTERNET INFRASTRUCTURE SYSTEMS. 1. Introduction

APPLICATION. Using the PB-100 to Make Calls and Announcements From a Database. Using the PB-100 for All-Call Dialing

Current Digital to Analog Converter

RN-WIFLY-EVAL-UM. WiFly Evaluation Kit Roving Networks. All rights reserved. RN-WIFLY-EVAL-UM Version 1.32r 10/9/2012 USER MANUAL

UART Boot Loader Design on the Kinetis E Series

POCKET SCOPE 2. The idea 2. Design criteria 3

How To Add A Usb Secondary Ipo Bootloader To An Lpc23Xx Flash Device To A Flash Device

Comtrol Corporation: Latency Performance Testing of Network Device Servers

Installing Service Pack Updater Archive for CodeWarrior Tools (Windows and Linux) Quick Start

December 2002, ver. 1.0 Application Note 285. This document describes the Excalibur web server demonstration design and includes the following topics:

Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface

AT89C5131A Starter Kit... Software User Guide

Using the HCS12 Serial Monitor on Wytec Dragon-12 boards. Using Motorola s HCS12 Serial Monitor on Wytec s Dragon-12 boards

Making Prototyping Boards for the EFM32 kits

AT88CK490 Evaluation Kit

USB TO SERIAL ADAPTER

Product Brief. 2.0 microtoled. Intelligent GOLDELOX Display Module. µtoled-20-g2. Rev 1.0

Genesi Pegasos II Setup

IRTC Compensation and 1 Hz Clock Generation

Design and Implementation of Home Monitoring System Using RF Technology

Keep it Simple Timing

MCF54418 NAND Flash Controller

Transcription:

TOOLSTICK VIRTUAL TOOLS USER S GUIDE RELEVANT DEVICES 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: ToolStick Terminal 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. PC Base Adapter Daughter Card Silicon Labs IDE USB Debug Logic Card Edge MCU Debug HW UART & GPIO ToolStick Virtual Tools UART GPIO External HW Data Communication Debug Functions 2. Getting Started Figure 1. ToolStick Development Platform Block Diagram 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.1 9/07 Copyright 2007 by Silicon Laboratories AN333

2.1. System Requirements Figure 2. ToolStick Virtual Tools 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.1

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() TerminalWrite() TerminalRead() LCD_ControlWrite() LCD_ControlRead() LCD_DataWrite() LCD_DataRead() ScopeClearBuffer() ScopeSampleWrite() Lib_VersionRead() - Initializes the C8051F020 MCU for use with the Virtual Tools - Writes a byte to the ToolStick Terminal - Reads a byte from the ToolStick Terminal - Writes a control byte to the Virtual LCD - Reads a control byte from the Virtual LCD - Writes a data byte to the Virtual LCD - Reads a data byte from the Virtual LCD - Clears the Virtual Oscilloscope data buffer - Writes a sample value to a Virtual Oscilloscope channel - 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. C8051F020 void SilabsInit020 (void) 3.2. Lib_VersionRead Description: This function reads a version number of the ToolStick Virtual Tools interface library. See Appendix A. U8 Lib_VersionRead (void) Returns an unsigned 8-bit value indicating the library version. Rev. 0.1 3

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.1

4.1. TerminalRead Description: This function reads a byte from the ToolStick Terminal. See Appendix A. U8 TerminalRead (void) Returns an unsigned 8-bit value read from the ToolStick Terminal. 4.2. TerminalWrite Description: This function writes a byte to the ToolStick Terminal. void TerminalWrite (U8 SendChar) 1. SendChar 8-bit value to be sent to the ToolStick Terminal Rev. 0.1 5

5. ToolStick Virtual LCD The ToolStick Virtual LCD (Liquid Crystal Display) offers a virtual LCD with a serial interface on the PC. This enables learning how to interface with a serial LCD without the additional hardware cost of an actual LCD. Figure 4 shows the Virtual LCD as it appears on the PC. The following sections describe the four Virtual LCD interface functions included in the ToolStick Virtual Tools Interface Library Figure 4. ToolStick Virtual LCD Application 5.1. LCD_ControlRead Description: This function reads a control byte from the Virtual LCD. U8 LCD_ControlRead (void) Returns an unsigned 8-bit value read from the Virtual LCD. 6 Rev. 0.1

5.2. LCD_ControlWrite Description: AN333 This function writes a control byte to the Virtual LCD. The control commands that can be sent to the Virtual LCD are listed in Table 1. void LCD_ControlWrite (U8 SendChar) 1. SendChar 8-bit value to be sent to the Virtual LCD.. Table 1. LCD Control Commands SendChar Value 0x0C 0x01 0x06 Description Display ON, Cursor OFF Clear LCD Entry mode increment without shift 5.3. LCD_DataRead Description: This function reads a data byte from the Virtual LCD. U8 LCD_DataRead (void) Returns an unsigned 8-bit value read from the Virtual LCD. 5.4. LCD_DataWrite Description: This function writes a data byte to the Virtual LCD. void LCD_DataWrite (U8 SendChar) 1. SendChar 8-bit value to be sent to the Virtual LCD. Rev. 0.1 7

6. ToolStick Virtual Oscilloscope The ToolStick Virtual Oscilloscope application allows the PC to be used as an oscilloscope by sending data points to be plotted through the target MCU s UART interface via the ToolStick Base Adapter. Data, such as analog measurements from the MCU, can be sent to the virtual oscilloscope to be plotted. The virtual oscilloscope has four channels and can plot data up to 12-bits wide. The 12-bit data is ORed with the 4-bit channel number and sent to the PC as a 16-bit number. The following sections describe the two Virtual Oscilloscope interface functions included in the ToolStick Virtual Tools interface library. Figure 5 shows the ToolStick Virtual Oscilloscope application. Figure 5. ToolStick Virtual Oscilloscope Application 6.1. ScopeClearBuffer Description: This function clears the data in its buffer for the specified channel of the Virtual Oscilloscope. void ScopeClearBuffer (U8 ChannelMask) 1. ChannelMask 8-bit value of the channel whose buffer needs to be cleared. Valid values are between 0 and 3. 6.2. ScopeSampleWrite Description: This function writes a sample value to the specified channel of the Virtual Oscilloscope. void ScopeSampleWrite (U8 Channel, U8 sendvaluemsb, U8 sendvaluelsb) 1. Channel 8-bit value of the channel whose buffer needs to be cleared. Valid values are between 0 and 3. 2. sendvaluemsb 8-bit value that holds the most significant 4 bits of the 12-bit sample value. 3. sendvaluelsb 8-bit value that holds the least significant 8 bits of the 12-bit sample value. 8 Rev. 0.1

7. Library Files, Header Files, and Code Examples The ToolStick Virtual Tools interface library (for SDCC and Keil toolsets), SFR definition header files for the C8051F020 MCU, and code examples are included in the ToolStick Virtual Tools installer. This can be downloaded and installed from www.silabs.com/mcuniversity. The files are installed at the following default location: C:\SiLabs\MCU\ToolStick\UniversityDC\Firmware\. The examples included are UniDC_SimpleDemo, UniDC_FeaturesDemo, and UniDC_VirtualTools_Demo. Open the *.wsp project from the Silicon Labs IDE using the Project Open Project menu option, and follow the instructions listed at the top of the C source file to try these examples. Rev. 0.1 9

APPENDIX A TOOLSTICK VIRTUAL TOOLS INTERFACE L IBRARY DETAILS All the three ToolStick Virtual Tools applications share the same UART channel for data transfer. In order to distinguish between the data going to the different ToolStick Virtual Tools applications, an escape character should be added before the actual data byte indicating for which ToolStick Virtual Tools application the data is intended. The ToolStick Virtual Tools interface library functions automatically add the appropriate escape character; so, there is no need to add these extra characters when using those functions. As an alternative to the interface functions, the ToolStick Virtual Tools can be accessed directly by adding the appropriate escape character before the UART data. A list of escape characters and descriptions is included in Table 2. Table 2. ToolStick Virtual Tools Escape Characters Value 0x01 0x02 0x17 0x18 0x19 0x20-0x7F 0x80 0x07 0x01 Description Prefix before sending a character to be written to the Terminal. Prefix before trying to read a character from the Terminal. Prefix before sending a control character to be written to the Virtual LCD. Prefix before trying to read a control character from the Virtual LCD. Prefix before trying to read a data byte from the Virtual LCD. Values in this range are meant for the virtual LCD and can be sent without any escape character prefix. This is the mask for any Virtual Oscilloscope control characters. The most significant bit should be set for all these characters. Channel 8 is used to send Virtual Oscilloscope commands. Virtual Oscilloscope command to clear a channel buffer. For this command, the first character sent should be 0xF1 [0x80 (0x07 << 4) 0x01], and the next character sent should be the number of the channel whose buffer should be cleared. Note: All the interface library functions (except the SilabsInit020 function) can be used with all Silicon Labs MCUs as long as the UART0 is set up for 230400 bps, 8-N-1. For devices with SFR Paging, the SFR page should be set to the UART0 page before calling any of the interface library functions. The only SFRs used by the interface functions (except the SilabsInit020 function) are SBUF0, TI0, and RI0, which are located at the same SFR locations in all Silicon Labs MCUs. 10 Rev. 0.1

NOTES: Rev. 0.1 11

CONTACT INFORMATION Silicon Laboratories Inc. 400 West Cesar Chavez Austin, Texas 78701 Tel: 1+(512) 416-8500 Fax: 1+(512) 416-9669 Toll Free: 1+(877) 444-3032 Email: mcuapps@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. 12 Rev. 0.1