background image

C 8 0 5 1 F 8 0 0 - D K

4

Rev. 0.2

5.1.2. Getting Started With the Silicon Labs IDE

The following sections discuss how to open an example project in the IDE, build the source code, and download it
to the target device.

5.1.2.1.  Running the F800_Blinky example program

The 

F800_Blinky

 example program blinks an LED on the target board.

1. Open the Silicon Labs IDE from the Start menu.

2. Select 

Project

Open Project

 to open an existing project.

3. Browse to the 

C:\SiLabs\MCU\Examples\C8051F80x_83x\Blinky

 directory (default) and select the 

F800_Blinky_C.wsp project file and click 

Open

.

4. Once the project is open, build the project by clicking on the 

Build/Make Project 

button in the toolbar or 

selecting 

Project

Build/Make Project 

from the menu.

Note:

 After the project has been built the first time, the 

Build/Make Project

 command will only build the files 

that have been changed since the previous build. To rebuild all files and project dependencies, click on the 

Rebuild All

 button in the toolbar or select 

Project

Rebuild All

 from the menu.

5. Before connecting to the target device, several connection options may need to be set. Open the 

Connection 

Options

 window by selecting 

Options

Connection Options...

 in the IDE menu. First, select the “USB Debug 

Adapter” option. Next, the correct “Debug Interface” must be selected. C8051F80x-83x devices use Silicon 
Labs “

C2

” 2-wire debug interface. Once all the selections are made, click the 

OK

 button to close the window.

6. Click the 

Connect

 button in the toolbar or select 

Debug

Connect

 from the menu to connect to the device.

7. Download the project to the target by clicking the 

Download

 

Code

 button in the toolbar.

Note:

 To enable automatic downloading if the program build is successful select 

Enable automatic connect/

download after build

 in the 

Project

Target Build Configuration

 dialog. If errors occur during the build 

process, the IDE will not attempt the download.

8. Click on the 

Go

 button (green circle) in the toolbar or by selecting 

Debug

Go 

from the menu to start running 

the firmware. The LED on the target board will start blinking.

5.1.2.2.  Creating a New Project

Use the following steps to create a new projects. Once steps 1–5 in this section are complete, continue at Step 3 in
Section 5.1.2.1.

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. 

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.

5. Save the project when finished with the debug session to preserve the current target build configuration, editor 

settings and the location of all open debug views. To save the project, select 

Project

Save Project As...

 from 

the menu. Create a new name for the project and click on 

Save

.

Summary of Contents for C8051F800

Page 1: ...e C8051F800 Development Kit contains the following items C8051F800 Target Board C8051Fxxx Development Kit Quick Start Guide Silicon Labs IDE and Product Information CD ROM CD content includes the following Silicon Labs Integrated Development Environment IDE Evaluation assembler compiler and linker tools Source code examples and register definition files Documentation Optional Third Party Tools CD ...

Page 2: ...llation utility s startup screen 2 In the Kit Selection box that appears choose the C8051F800 DK development kit from the list of options 3 In the next screen choose Components to be Installed The programs necessary to download and debug on the MCU are the Silicon Labs IDE and the Keil 8051 Evaluation Toolset The CP210x Drivers are necessary to use the UART capabilities of the target board See Sec...

Page 3: ...allation process connect the included USB cable between the host computer and the USB connector P5 on the C8051F800 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 Labs CP210x USB to UART Bridge Driver Removal option in the A...

Page 4: ... connect download after build in the Project Target Build Configuration dialog If errors occur during the build process the IDE will not attempt the download 8 Click on the Go button green circle in the toolbar or by selecting Debug Go from the menu to start running the firmware The LED on the target board will start blinking 5 1 2 2 Creating a New Project Use the following steps to create a new p...

Page 5: ...le under the Help menu in Configuration Wizard 2 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 5 3 Keil µVision2 and µVision3 Silicon Labs Drivers As an alternative to the Silicon Labs IDE the µVision debug driver allows the Keil µVision IDE to communicate with Silico...

Page 6: ...he UART 6 1 Register Definition Files Register definition files C8051F800 inc C8051F800_defs h and compiler_defs h define all SFR registers and bit addressable control status bits These files are installed into the SiLabs MCU Examples C8051F80x_83x Header_Files default directory during IDE installation The register and bit names are identical to those used in the C8051F80x 83x data sheet 6 2 Blink...

Page 7: ...bug Adapter interface J5 Connects pin P0 0 to the VREF bypass capacitors and TB1 J6 J7 Connects the potentiometer R14 to pin P0 7 and 3VD J8 J9 Connects pins P0 2 XTAL1 and P0 3 XTAL2 to J1 J10 Connects pin P0 1 to GND and TB1 TB1 Analog I O terminal block Figure 3 C8051F800 Target Board with Pin Numbers CAPACITIVE SENSE P1 5 P1 6 R14 D10 D9 3VD P0 7 J7J6 D8 D7 P1 0_LED P1 1_LED P1 2_LED P1 3_LED ...

Page 8: ...NSE P1 5 P1 6 R14 D10 D9 3VD P0 7 J7J6 D8 D7 P1 0_LED P1 1_LED P1 2_LED P1 3_LED C8051F800 TB P1 4 RESET D4 COMM F326 USB DEBUG J4 P1 POWER D6 PWR P1 0_LED P1 1_LED P1 2_LED P1 3_LED P1 4_SW TX_MCU RX_MCU RTS CTS P1 0 P1 1 P1 2 P1 3 P1 4 P0 4 P0 5 P1 5 P1 6 J3 GND P2 0 P1 6 P1 4 P1 2 P1 0 P0 6 P0 4 P0 2_J8 GND RST P1 7 P1 5 P1 3 P1 1 P0 7 P0 5 P0 3_J9 J1 P0 0 3VD P0 1 3VD F800 U1 J9 J8 P0 3_J9 P0 ...

Page 9: ...rammable high frequency internal oscillator 24 MHz base frequency 2 which is enabled as the system clock source on reset After reset the internal oscillator operates at a frequency of 3 0625 MHz by default but may be configured by software to operate at other frequencies The on chip crystal is accurate for many serial communications UART SPI SMBus and an external oscillator is not required dependi...

Page 10: ...tails about example source code Six LEDs are provided on the target board to serve as indicators The red LED labeled PWR is used to indicate the presence of power to the target board Another red LED labeled USB is used to indicate a valid USB connection via the USB connector labeled COMM Note that this LED will light up only after CP210x device drivers are loaded successfully on the PC The four gr...

Page 11: ... signals will prevent the simultaneous use of the capacitive sense switches because those GPIO pins are shared on this board The shorting block positions for connecting each of these signals to the CP2103 are listed in Table 3 To use this interface the USB to UART device drivers should be installed as described in Section 4 3 CP210x USB to UART VCP Driver Installation on page 3 7 7 Potentiometer J...

Page 12: ...in the C8051F800 Refer to the C8051F80x 83x data sheet for more information on configuring the voltage and ground reference options 7 9 C2 Pin Sharing On the C8051F800 the debug pins C2CK and C2D are shared with the pins RST and P2 0 respectively The target board includes the resistors necessary to enable pin sharing which allow the RST and P2 0 pins to be used normally while simultaneously debugg...

Page 13: ...and Headers MCU Pin Name Pin F800 GM Primary Function Alternate Fixed Function Target Board Function Relevant Headers P0 0 1 P0 0 GPIO VREF VREF J1 19 TB1 6 J5 1 P0 1 20 P0 1 GPIO AGND GPIO AGND J1 20 TB1 4 J10 1 P0 2 19 P0 2 GPIO XTAL1 XTAL1 J1 17 J8 2 P0 3 18 P0 3 GPIO XTAL2 XTAL2 J1 18 J9 2 P0 4 17 P0 4 GPIO TX_MCU TX_MCU J1 15 J3 12 P0 5 16 P0 5 GPIO RX_MCU RX_MCU J1 16 J3 14 P0 6 15 P0 6 GPIO...

Page 14: ...C8051F800 DK 14 Rev 0 2 8 Schematics Figure 5 C8051F800 Target Board Schematic Page 1 of 2 ...

Page 15: ...C8051F800 DK Rev 0 2 15 Figure 6 C8051F800 Target Board Schematic Page 2 of 2 ...

Page 16: ...ein 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 rep resentation or guarantee regarding the suitability of its products for any particular purpose nor does Silicon Laboratories assume any liability arising out...

Reviews: