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.
electronic components distributor