C8051F580DK
C8051F580 D
EVELOPMENT
K
IT
U
S E R
’
S
G
UIDE
1. Relevant Devices
The C8051F580 Development Kit is intended as a development platform for the microcontrollers in the
C8051F58x/59x MCU family. The members of this MCU family are: C8051F580, C8051F581, C8051F582,
C8051F583, C8051F584, C8051F585, C8051F586, C8051F587, C8051F588, C8051F589, C8051F590, and
C8051F591.
The target board included in this kit is provided with a pre-soldered
C8051F580
MCU (QFP48 package) and a
C8051F582
(QFN32 package).
Code developed on the C8051F580 can be easily ported to the other members of this MCU family.
Refer to the C8051F58x/59x data sheet for the differences between the members of this MCU family.
2. Kit Contents
The C8051F580 Development Kit contains the following items:
C8051F580 Target Board
C8051Fxxx Development Kit Quick-Start Guide
Silicon Laboratories IDE and Product Information CD-ROM. CD content includes:
Laboratories Integrated Development Environment (IDE)
Keil 8051 Development Tools (macro assembler, linker, evaluation ‘C’ compiler)
Source code examples and register definition files
Documentation
C8051F580 Development Kit User’s Guide (this document)
Silicon
AC to DC Power Adapter
USB Debug Adapter (USB to Debug Interface)
Two USB Cables
3. Getting Started
The necessary software to download, debug, and communicate with the target microcontroller is included in the
CD-ROM. The following software is necessary to build a project, download code to, and communicate 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:
Configuration Wizard 2
Keil uVision Drivers
CP210x USB to UART Virtual COM Port (VCP) Drivers
Rev. 0.1 11/08
Copyright © 2008 by Silicon Laboratories
C8051F580DK
C8051F580DK
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 C8051F580 Target Board includes a Silicon Laboratories CP2102 USB-to-UART Bridge Controller. Device
drivers for the CP2102 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 is selected during installation, a driver
“unpacker” utility will launch.
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
(P5) on the C8051F580 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.
4. Software Overview
4.1. Silicon Laboratories IDE
The Silicon Laboratories IDE integrates a source-code editor, a source-level debugger, and an in-system Flash
programmer. See Section 6. "Using the Keil Software 8051 Tools with the Silicon Laboratories IDE‚" on page 5 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.
4.1.1. IDE System Requirements
The Silicon Laboratories IDE requirements:
Pentium-class host PC running Microsoft Windows 2000 or newer.
One available USB port.
4.1.2. Third Party Toolsets
The Silicon Laboratories IDE has native support for many 8051 compilers. The full list of natively supported tools is:
Keil
IAR
Raisonance
Tasking
Hi-Tech
SDCC
Please note that the demo applications for the C8051F580 Target Board are written to work with the Keil and
SDCC toolsets.
2
Rev. 0.1
C8051F580DK
4.2. Keil Evaluation Toolset
4.2.1. Keil Assembler and Linker
The assembler and linker that are part of the Keil Demonstration Toolset are the same versions that are found in
the full Keil Toolset. The complete assembler and linker reference manual can be found on-line under the
Help
menu in the IDE or in the “SiLabs\MCU\hlp” directory (A51.pdf).
4.2.2. Keil Evaluation C51 C Compiler
The evaluation version of the C51 compiler is the same as the full version with these limitations: (1) Maximum 4 kB
code generation, and (2) Floating point library not 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. Please refer to the Application
Note “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.
4.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 1. 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 help available under the
Help
menu in Configuration Wizard 2.
Rev. 0.1
3
C8051F580DK
4.4. Keil uVision2 and uVision3 Silicon Laboratories Drivers
As an alternative to the Silicon Laboratories IDE, the uVision debug driver allows the Keil uVision IDE 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 uVision IDE 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 uVision driver documentation. The documentation and software are
available from the Downloads webpage (www.silabs.com/mcudownloads).
5. 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 2.
1. Connect the USB Debug Adapter to one of the DEBUG connectors on the target board (DEBUG_A or
DEBUG_B) with the 10-pin ribbon cable. The recommended connection is to DEBUG_A as this microcon-
troller is the primary MCU on the board and more peripherals are easily available.
2. Connect one end of the USB cable to the USB connector on the USB Debug Adapter.
3. Connect the other end of the USB cable to a USB Port on the PC.
4. Connect the ac/dc power adapter to power jack P4 on the target board.
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.
Target Board
J27
J28
Port 2 “B”
Port 0 “B”
Port 1 “B”
J29
SIDE “B”
C8051F580-TB
J26
P1.3_B
DS1
DEBUG_B
J31
F582
U2
J11
RESET_B
P1.4_B
PC
P3
J32
J8
SILICON LABS
J17
www.silabs.com
J14
PWR
J22
J24
DS3
C8051
F580
R27
J20
J9
J10
J21
TB3
U1
P4
Silicon Laboratories
USB DEBUG ADAPTER
Power
P1.3_A
DS2
P1
J19
J7
SIDE “A”
COMM
J1 DS4
P1.4_A
RESET_A
DEBUG_A
U5
J18
P2
J5
J4
J3
Port 3 “A”
Port 4 “A”
Port 0 “A”
Port 1 “A”
Port 2 “A”
J2
USB Debug
Adapter
P1
Figure 2. Hardware Setup using a USB Debug Adapter
4
Rev. 0.1
Stop
Run
LIN_OUT
CAN_H
+LIN_V
CAN_L
GND
GND
AC/DC
Adapter
USB
Cable
C8051F580DK
6. Using the Keil Software 8051 Tools with the Silicon Laboratories IDE
To perform source-level debugging with the IDE, you must configure the Keil 8051 tools to generate an absolute
object file in the OMF-51 format with object extensions and debug records enabled. You may 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. Refer to Application Note "AN104: Integrating Keil
8051 Tools into the Silicon Labs IDE" in the “SiLabs\MCU\Documentation\ApplicationNotes” directory 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 the program 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.)
6.1. Creating a New Project
1. Select
Project
New Project
to open a new project and reset all configuration settings to default.
2. Select
File
New File
to open an editor window. Create your source file(s) and save the file(s) with a
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.
Note:
If a project contains a large number of files, the “Group” feature of the IDE can be used to organize
the files. 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.
Rev. 0.1
5