background image

C8051F34x-DK

Rev. 0.2

5

5.3.1. Setting-up the Firmware

1. Set up the hardware on the C8051F340 target board according to the instructions in Section 2.
2. Create a project using the following steps.

a. Open the Silicon Laboratories IDE.
b. Click on the 

Project

Open Project...

 option in the IDE menus.

c. Answer 

No

 to the following message: 

Not all project windows can be restored if not connected.
Do you want to connect now?

d. Select the 

USB__Int.wsp

 project, located by default in the 

SiLabs\MCU\Exam-

ples\C8051F34x\C\USB_INT

 directory, and click the 

Open

 button.

e. Click the 

Build/Make Project

 button in the IDE toolbar.

f.

The project should now be compiled and linked successfully, with no errors.

g. Connect to the device by clicking the 

Connect

 button on the IDE toolbar.

h. Download the project to the target by clicking the 

Download Code

 button in the IDE toolbar.

3. Begin program execution on the target by either of the following methods:

a. Click the 

Go

 button in the IDE toolbar. 

b. Disconnect the IDE from the device by pressing the 

Disconnect

 button on the toolbar. Next, press 

the 

Reset

 button on the C8051F340 target board.

5.3.2. Installing the USB Driver

1. Connect the USB cable between the host computer and the C8051F340 target board, as shown in 

Figure 2. See Figure 2 on page 6 for the location of the USB connector. 

2. At this point, Windows should notify you it has found new hardware and prompt you with a 

Found New

Hardware

 wizard. Press the 

Next

 button.

3. Select 

Search for a suitable driver for my device (recommended)

 and press the 

Next

 button.

4. Select 

Specify a location

 under “Optional search locations:” and press the 

Next

 button.

5. Press the 

Browse

 button to locate the 

SiLabsInt.inf

 driver installation file, located by default in the

SiLabs\MCU\Examples\C8051F34x\C\USB_INT

” directory. Once this file is selected press the 

OK

 button.

6. Verify that the correct path and filename are shown and press the 

Next

 button.

7. Press the 

Finish

 button. 

5.3.3. Running the Host Application

1. Once firmware has been downloaded to the target board and the driver has been installed successfully, 

run the 

USBTest.exe 

example application located by default in the “

SiLabs\MCU\Exam-

ples\C8051F34x\C\USB_INT”

 directory.

2. The 

USBTest

 application will display the status of the potentiometer, the temperature sensor, the two

switches, and the lower four bits of Port 0.

3. The application also includes check boxes for turning on the two LEDs and changing the logic levels on the

lower four bits of Port 1.

4. If any of the application functions do not operate correctly, verify shorting blocks are installed at the follow-

ing positions: J3[1-2] (P2.0 Switch), J3[3-4] (P2.1 Switch), J3[5-6] (P2.2 LED), J3[7-8] (P2.3 LED), and J16
and J17 (P2.5 Potentiometer).

5. See Figure 2 on page 6 for the location of headers, LEDs, switches, and potentiometer.

Note:

The C8051F340 target board has the ability to be powered through the USB cable. To enable the USB powered mode, 
short the pins labeled VBUS and VREGIN on the J8 header. Do not short all 3 pins on the J8 header.

Downloaded from 

Elcodis.com

 

electronic components distributor

 

Summary of Contents for C8051F34-DK Series

Page 1: ... via the USB Debug Adapter as shown in Figure 1 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 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 P1 on the target board Notes Use the Reset button in t...

Page 2: ...ng IDE installation The evaluation version of the C51 compiler is the same as the full professional version except code size is limited to 4 kB and the floating point library is not included The C51 compiler reference manual can be found under the Help menu in the IDE or in the SiLabs MCU hlp directory C51 pdf 4 4 Using the Keil Software 8051 Tools with the Silicon Laboratories IDE To perform sour...

Page 3: ...oolbar 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 2 Before connecting to the target device sev...

Page 4: ...r with a timer 5 3 Universal Serial Bus USB Application Example The included USB application example requires Windows 98SE 2000 XP operating system This example consists of three parts firmware running on the C8051F340 device a USB device driver running on the host PC and a host application The host application communicates with the C8051F340 via USB allowing the user to view and to change the sta...

Page 5: ...the Next button 3 Select Search for a suitable driver for my device recommended and press the Next button 4 Select Specify a location under Optional search locations and press the Next button 5 Press the Browse button to locate the SiLabsInt inf driver installation file located by default in the SiLabs MCU Examples C8051F34x C USB_INT directory Once this file is selected press the OK button 6 Veri...

Page 6: ...der J6Port 4 header J7Connects the 3V supply net to the VDD supply net J8USB Power or VDD power selection header J9Debug connector for debug adapter interface J10 J11External crystal enable connectors J12Port I O jumper configuration block J1396 pin female connector J15Jumper connection for pin 1 5 to capacitors used when VREF is internally generated J16Jumper connection for potentiometer source t...

Page 7: ...purpose I O GPIO pins through headers Pressing P2 0 or P2 1 generates a logic low signal on the port pin Remove the shorting blocks from the J12 header to disconnect Switch P2 0 and Switch P2 1 from the port pins The port pin signals are also routed to pins on the J1 I O connector See Table 1 for the port pins and headers corresponding to each switch Three LEDs are also provided on the target boar...

Page 8: ...340 target board can be configured as a self powered USB device to take power from the USB cable instead of the ac dc adapter connected at P1 To configure the target boards as a self powered USB device short the VREGIN and VBUS pins on the J8 header Note When the C8051F340 target board is self powered from the USB the Serial Adapter is not powered from the target board The Serial Adapter must be p...

Page 9: ...l shorting block to connect UART0 CTS P2 7 to transceiver 6 8 Analog I O P2 Several of the C8051F340 target device s port pins are connected to the P2 terminal block Refer to Table 5 for the P2 terminal block connections 6 9 USB Debug Adapter Target Board Power Connector J19 The USB Debug Adapter includes a connection to provide power to the target board This connection is routed from J9 10 to J19...

Page 10: ...C8051F34x DK 10 Rev 0 2 7 Schematics Figure 3 C8051F340 Target Board Schematic Page 1 of 2 Downloaded from Elcodis com electronic components distributor ...

Page 11: ...C8051F34x DK Rev 0 2 11 Figure 4 C8051F340 Target Board Schematic Page 2 of 2 Downloaded from Elcodis com electronic components distributor ...

Page 12: ...ts Removed Section 2 Hardware Setup using an EC2 Serial Adapter See RS232 Serial Adapter EC2 User s Guide Removed Section 8 EC2 Serial Adapter See RS232 Serial Adapter EC2 User s Guide Removed Section 9 USB Debug Adapter See USB Debug Adapter User s Guide Downloaded from Elcodis com electronic components distributor ...

Page 13: ...C8051F34x DK Rev 0 2 13 NOTES Downloaded from Elcodis com electronic components distributor ...

Page 14: ...bed 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 of the application or use of any product or circuit and specifically disclaims any and all lia...

Reviews: