Silicon Laboratories C8051F930-DK User Manual

C8051F930-DK
C8051F930 DEVELOPMENT KIT USERS GUIDE
1. Relevant Devices
The C8051F930 Development Kit is intended as a development platform for the microcontrollers in the C8051F93x-C8051F92x MCU family. The members of this MCU family are C8051F930, C8051F931, C8051F920, and C8051F921.
Notes:
2. Code developed on the C8051F930 can be easily ported to the other members of this MCU family.
3. Refer to the C8051F93x-C8051F92x data sheet for the differences between the members of this MCU family.
2. Kit Contents
The C8051F930 Development Kit contains the following items:
C8051F930 Target BoardC8051Fxxx Development Kit Quick-Start GuideSilicon Laboratories IDE and Product Information CD-ROM. CD content includes the following:
Silicon Laboratories Integrated Development Environment (IDE) Keil 8051 Development Tools (macro assembler, linker, evaluation C compiler) Source code examples and register definition files Documentation C8051F930 Development Kit User’s Guide (this document)
AC to DC Power AdapterUSB Debug Adapter (USB to Debug Interface)2 USB Cables2 AAA Batteries
Rev. 0.5 8/09 Copyright © 2009 by Silicon Laboratories C8051F930-DK
Figure 1. C8051F930 Target Board
C8051F930-DK
3. Software Overview
All software required to develop firmware and communicate with the target microcontroller is included in the CD­ROM. The CD-ROM also includes other useful software.
Below is the software necessary for firmware development and communication with the target microcontroller:
Silicon Laboratories Integrated Development Environment (IDE)Keil 8051 Development Tools (macro assembler, linker, evaluation C compiler)
Other useful software that is provided in the CD-ROM includes the following:
Configuration Wizard 2Keil µVision DriversCP210x USB to UART Virtual COM Port (VCP) Drivers
3.1. Software Installation
The included CD-ROM contains the Silicon Laboratories Integrated Development Environment (IDE), Keil software 8051 tools and additional documentation. Insert the CD-ROM into your PC’s CD-ROM drive. An installer will automatically launch, allowing you to install the IDE software or read documentation by clicking buttons on the Installation Panel. If the installer does not automatically start when you insert the CD-ROM, run autorun.exe found in the root directory of the CD-ROM. Refer to the ReleaseNotes.txt file on the CD-ROM for the latest information regarding known problems and restrictions. After installing the software, see the following sections for information regarding the software and running one of the demo applications.
3.2. CP210x USB to UART VCP Driver Installation
The C8051F930 Target Board includes a Silicon Laboratories CP2103 USB-to-UART Bridge Controller. Device drivers for the CP2103 need to be installed before PC software such as HyperTerminal can communicate with the target board over the USB connection. If the "Install CP210x Drivers" option was selected during installation, this will launch a driver “unpacker” utility.
1. Follow the steps to copy the driver files to the desired location. The default directory is C:\SiLabs\MCU\CP210x.
2. The final window will give an option to install the driver on the target system. Select the “Launch the CP210x VCP Driver Installer” option if you are ready to install the driver.
3. If selected, the driver installer will now launch, providing an option to specify the driver installation location. After pressing the “Install” button, the installer will search your system for copies of previously installed CP210x Virtual COM Port drivers. It will let you know when your system is up to date. The driver files included in this installation have been certified by Microsoft.
4. If the “Launch the CP210x VCP Driver Installer” option was not selected in step 3, the installer can be found in the location specified in step 2, by default C:\SiLabs\MCU\CP210x\Windows_2K_XP_S2K3_Vista. At this location run CP210xVCPInstaller.exe.
5. To complete the installation process, connect the included USB cable between the host computer and the USB connector (P3) on the C8051F930 Target Board. Windows will automatically finish the driver installation. Information windows will pop up from the taskbar to show the installation progress.
6. If needed, the driver files can be uninstalled by selecting “Silicon Laboratories CP210x USB to UART Bridge (Driver Removal)” option in the “Add or Remove Programs” window.
3.3. Silicon Laboratories IDE
The Silicon Laboratories IDE integrates a source-code editor, a source-level debugger, and an in-system Flash programmer. See Section 5. "Using the Keil Software 8051 Tools with the Silicon Laboratories IDE‚" on page 9 for detailed information on how to use the IDE. The Keil Evaluation Toolset includes a compiler, linker, and assembler and easily integrates into the IDE. The use of third-party compilers and assemblers is also supported.
3.3.1. IDE System Requirements
The Silicon Laboratories IDE requirements:
Pentium-class host PC running Microsoft Windows 2000 or newerOne available USB port64 MB RAM and 40 MB free HD space recommended
2 Rev. 0.5
C8051F930-DK
3.3.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:
KeilIARRaisonanceTaskingHi-TechSDCC
The demo applications for the C8051F930 target board are written to work with the Keil and SDCC toolsets.
3.4. Keil Evaluation Toolset
3.4.1. Keil Assembler and Linker
The Keil demonstration toolset assembler and linker place no restrictions on code size.
3.4.2. Keil Evaluation 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 installed from the CD-ROM, the C51 compiler is initially 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.
Rev. 0.5 3
C8051F930-DK
3.5. 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 2. Configuration Wizard 2 Utility
The Configuration Wizard 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 language. For more information, refer to the Configuration Wizard documentation. Documentation and software is available on the kit CD and from the downloads webpage: www.silabs.com/
mcudownloads.
4 Rev. 0.5
C8051F930-DK
3.6. Silicon Labs Battery Life Estimator
The Battery Life Estimator is a system design tool for battery operated devices. It allows the user to select the type of battery they are using in the system and enter the supply current profile of their application. Using this information, it performs a simulation and provides an estimated system operating time. The Battery Life Estimator is shown in Figure 3.
From Figure 3, the two inputs to the Battery Life Estimator are battery type and discharge profile. The utility includes battery profiles for common battery types such as AAA, AA, A76 Button Cell, and CR2032 coin cell. The discharge profile is application-specific and describes the supply current requirements of the system under various supply voltages and battery configurations. The discharge profile is independent of the selected power source. Several read-only discharge profiles for common applications are included in the pulldown menu. The user may also create a new profile for their own applications.
To create a new profile:
1. Select the profile that most closely matches the target application or choose the "Custom Profile".
2. Click Manage
3. Click Duplicate
4. Click Edit
Profiles may be edited with the easy-to-use GUI (shown in Figure 4).
Figure 3. Battery Life Estimator Utility
Rev. 0.5 5
C8051F930-DK
Figure 4. Battery Life Estimator Discharge Profile Editor
The Discharge Profile Editor allows the user to modify the profile name and description. The four text entry boxes on the left hand side of the form allow the user to specify the amount of time the system spends in each power mode. On the right hand side, the user may specify the supply current of the system in each power mode.
Since supply current is typically dependent on supply voltage, the discharge profile editor provides two columns for supply current. The V2 and V1 voltages at the top of the two columns specify the voltages at which the current measurements were taken. The Battery Life Estimator creates a linear approximation based on the input data and is able to feed the simulation engine with an approximate supply current demand for every input voltage.
The minimum system operating voltage input field allows the system operating time to stop increasing when the simulated battery voltage drops below a certain threshold. This is primarily to allow operating time estimates for systems that cannot operate down to 1.8 V, which is the voltage of two fully drained single-cell batteries placed in series.
6 Rev. 0.5
C8051F930-DK
The wakeup frequency box calculates the period of a single iteration through the four power modes and displays the system wake up frequency. This is typically the "sample rate" in low power analog sensors.
Once the battery type and discharge profile is specified, the user can click the "Simulate" button to start a new simulation. The simulation engine calculates the estimated battery life when using one single-cell battery, two single-cell batteries in series, and two single-cell batteries in parallel. Figure 5 shows the simulation output window.
Figure 5. Battery Life Estimator Utility Simulation Results Form
The primary outputs of the Battery Life Estimator are an estimated system operating time and a simulated graph of battery voltage vs. time. Additional outputs include estimated battery capacity, average current, self-discharge current, and the ability to export graph data to a comma delimited text file for plotting in an external graphing application.
Rev. 0.5 7
C8051F930-DK
PC
USB
Cable
AC/DC
Adapter
Target Board
P0.2 P0.3
J3
J4
J2
`
P3
CP
2103
U3
P2
DEBUG
J9
USB POWER
RESET
P1.6
P1.5
POWER OFF BEFORE
SW4
SWITCHING MODE
2 CELL
1 CELL
J17
IMEASURE
H2
SILICON LABS
www.silabs.com
H1
J6
VDD/DC+
J5
J7 J13
F930
U1
J14
J11
J10
VBAT
WALL_PWR
AAA_BAT
COIN_CELL
TOUCH SENSE SWITCH
P2.0
TOUCH SENSE SWITCH
P2.1
J15
J16
R15
J12J8
+3VD
+1VD
VBAT
J1
SW5
ON
OFF
Silicon Laboratories
USB DEBUG ADAPTER
Run
Stop Power
USB Debug
Adapter
3.7. Keil µVision2 and µVision3 Silicon Laboratories Drivers
As an alternative to the Silicon Laboratories IDE, the µVision 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 rapid updating of 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, refer to the µVision driver documentation. The documentation and software are available on the kit CD and from the downloads webpage: www.silabs.com/mcudownloads.
4. Hardware Setup using a USB Debug Adapter
The target board is connected to a PC running the Silicon Laboratories IDE via the USB Debug Adapter as shown in Figure 6.
1. Connect the USB Debug Adapter to the DEBUG connector on the target board with the 10-pin ribbon cable.
2. Connect one end of the USB cable to the USB connector on the USB Debug Adapter.
3. Verify that a shorting block is installed on J17 and that SW5 is in the ON position.
4. Connect the other end of the USB cable to a USB Port on the PC.
5. Connect the ac/dc power adapter to power jack P1 on the target board (Optional).
Notes:
Use the Reset button in the IDE to reset the target when connected using a USB Debug Adapter.Remove power from the target board and the USB Debug Adapter before connecting or disconnecting the
ribbon cable from the target board. Connecting or disconnecting the cable when the devices have power can damage the device and/or the USB Debug Adapter.
8 Rev. 0.5
Figure 6. Hardware Setup using a USB Debug Adapter
C8051F930-DK
5. Using the Keil Software 8051 Tools with the Silicon Laboratories IDE
To perform source-level debugging with the IDE, configure the Keil 8051 tools to generate an absolute object file in the OMF-51 format with object extensions and debug records enabled. Build the OMF-51 absolute object file by calling the Keil 8051 tools at the command line (e.g., batch file or make file) or by using the project manager built into the IDE. The default configuration when using the Silicon Laboratories IDE project manager enables object extension and debug record generation. the “SiLabs\MCU\Documentation\ApplicationNotes” directory on the CD-ROM for additional information on using the Keil 8051 tools with the Silicon Laboratories IDE.
To build an absolute object file using the Silicon Laboratories IDE project manager, you must first create a project. A project consists of a set of files, IDE configuration, debug views, and a target build configuration (list of files and tool configurations used as input to the assembler, compiler, and linker when building an output object file).
The following sections illustrate the steps necessary to manually create a project with one or more source files, build a program, and download it to the target in preparation for debugging. (The IDE will automatically create a single-file project using the currently open and active source file if you select Build/Make Project before a project is defined.)
5.1. Creating a New Project
1. Select Project
2. Select File recognized extension, such as .c, .h, or .asm, to enable color syntax highlighting.
3. Right-click on “New Project” in the Project Window. Select Add files to project. Select files in the file browser and click Open. Continue adding files until all project files have been added.
4. For each of the files in the Project Window that you want assembled, compiled and linked into the target build, right-click on the file name and select Add file to build. Each file will be assembled or compiled as appropriate (based on file extension) and linked into the build of the absolute object file.
5. If a project contains a large number of files, the “Group” feature of the IDE can be used to organize. Right-click on “New Project” in the Project Window. Select Add Groups to project. Add pre-defined groups or add customized groups. Right-click on the group name and choose Add file to group. Select files to be added. Continue adding files until all project files have been added.
New Project to open a new project and reset all configuration settings to default.
New File to open an editor window. Create your source file(s) and save the file(s) with a
Refer to
"AN104: Integrating Keil 8051 Tools into the Silicon Labs IDE"
in
Rev. 0.5 9
Loading...
+ 19 hidden pages