Silicon Laboratories C8051F930 User manual
Add to my manuals
10 Pages
Silicon Laboratories C8051F930 is a versatile 8-bit microcontroller that offers high performance and low power consumption for a wide range of embedded applications. With its 8051 core, it boasts a maximum operating frequency of 25 MHz and features 32 kB of flash memory, 256 bytes of RAM, and 2 kB of XRAM. It also includes a variety of peripherals such as a UART, I2C, SPI, and a 10-bit ADC. The C8051F930 is ideal for applications requiring low-power operation, such as battery-powered devices, as it features several power-saving modes including idle and power-down modes.
advertisement
S i 11 2 0 - E K
S i 11 2 0 E
V A L U A T I O N
K
I T
U
S E R
’
S
G
U I D E
1. Kit Contents
The Si1120 Evaluation Kit contains the following items:
Si1120 Evaluation Board
C8051F930 Target Board
Si1120EK Quick Start Guide
AC to DC Power Adapter
USB Debug Adapter (USB to Debug Interface)
2 USB Cables
2. Introduction
The Si1120EK is intended as an evaluation and development platform for the Si1120 infrared proximity and
guide will focus on the Si1120 EVB and the example firmware. For more specific information on the C8051F930
TB, refer to the “C8051F930-DK User’s Guide”. The main components of the Si1120 EVB are the Si1120 sensor
(U1), the infrared emitters (D1 through D7), and header J1 which allows for selection between different infrared emitters on the board. On this PCB, the infrared emitters used are OSRAM part number SFH 4650-Z. These emitters have a power rating of 45 mW and a half-angle of 20 degrees. Other emitters with different characteristics may also be used, depending on the specific application requirements.
The example firmware for the kit measures the infrared light energy detected by the Si1120 while each of three infrared emitters are independently activated. The infrared light from these emitters will be reflected back to the
Si1120 by any object that is placed in proximity to the sensor. X, Y, and Z positions can be calculated from these measurements. If no object is close enough to the board, the measured signal levels will fall below pre-determined thresholds, and the position calculations will not update. The example firmware is intended to be used in conjunction with the Si1120 Performance Analysis Tool to provide user feedback. In addition to calculating the
type of ambient light present.
Note: The touchless infrared position detection implemented in the example is patent pending.
3. Getting Started
The Si1120 Evaluation Kit requires some PC software to be installed, as well as some basic hardware setup of the boards included in the kit.
3.1. Software Download and Installation
1. Browse to the Si1120 Evaluation Kit page at the URL http://www.silabs.com/Si1120EK .
2. Download and install the latest CP210x USB-to-UART Virtual COM Port (VCP) driver. This driver is necessary to establish serial communications with the board.
3. Download and install the latest version of the Optical Sensors Programmer’s Toolkit. The Si1120 Performance
Analysis Tool is part of this package, and is an integral part of the example firmware functionality.
4. (Optional) Download and install the Silicon Laboratories IDE and the Si1120 Evaluation Kit package. This will enable programming and debugging of the example source code. Note that the firmware is pre-loaded into the board during manufacturing. The IDE and board package are needed to upgrade or modify the firmware.
Rev. 0.3 7/13 Copyright © 2013 by Silicon Laboratories Si1120-EK
2
S i 11 2 0 - E K
3.2. Hardware Setup
2. Connect the Si1120 EVB to the 96-pin connector on the C8051F930 TB.
3. Connect the USB Debug Adapter to the DEBUG connector on the C8051F930 TB with the 10-pin ribbon cable.
4. Connect one end of a USB cable to the USB connector on the USB Debug Adapter, and the other end to a USB
Port on the PC.
5. Verify that a shorting block is installed on J17 of the C8051F930 TB and that SW5 is in the ON position.
6. Connect the ac/dc power adapter to power jack P1 on the C8051F930 TB (Optional).
7. Connect one end of a USB cable to connector P3 on the C8051F930 TB, and the other end to a USB port on the PC. Note that the CP210x VCP drivers should have been installed during the software setup described in
the user that a new USB device has been found.
Refer to Figure 3 for the full hardware connection diagram.
D5 D6 D7 D1
J4
J2
U1
J9
VTX0
D2
SILICON LABS
Si1120 EVB
D3
VTX0
B1
J1
J3
D4
VDD
VTX0
P1
Figure 1. Si1120 Evaluation Board—Shorting Block Settings
P1
R15
J16
H1
P1.4
J15
GND
TOUCH SENSE SWITCH
P2.0
PORT2
PORT1
J6
TOUCH SENSE SWITCH
P2.1
P1.6
P1.5
SW2
P0.2
P0.3
SW3
USB POWER
P3
CP
2103
U3
J4
SILICON LABS www.silabs.com
C8051F930-TB
U1
J3
VDD/DC+
J5
J7
J8 J12
+1VD
F930
PORT0
`
J2
J11
COIN_CELL
J13
J14
AAA_BAT
SW1
WALL_PWR
+3VD
VBAT
RESET
IMEASURE
J17
H2
VBAT
OFF
ON
SW5
J1
P2
SW4
J9
Figure 2. C8051F930 Target Board—Shorting Block and Switch Settings
Rev. 0.3
Si1120-EK
CP
210
3
Communication with PC
C8051F930-TB
F930
P1
SILICON LABS
Si1120 EVB
`
Debug
Connection to PC
AC/DC
Adapter
Figure 3. Hardware Setup
3.2.1. Si1120 EVB Header J1 Settings
To function properly with the demonstration firmware, the shorting blocks on header J1 should be set as indicated
but a shorting block point is provided for debug purposes. The “X” and “Y” axis emitters can each be moved
between three different positions on the board, as shown in Figure 4.
Select Corner Emitter
(D1 Only)
Select “X”
Axis Emitter
D1
D7
D6
D5
Select “Y”
Axis Emitter
D2
D3
D4
J1
Figure 4. Header J1 Setup
Rev. 0.3
3
S i 11 2 0 - E K
4. Software Overview
There are several software packages available to support the example firmware that is pre-loaded on the board.
The primary package that is required for functionality is the Si1120 Performance Analysis Tool, which can be used to collect data from the board over the USB interface and display it graphically on screen.
Optional software packages include the Silicon Labs Integrated Development Environment (IDE), and the Si1120
Evaluation Kit package. The Silicon Labs IDE provides a means of developing code for the C8051F930 and uses the USB Debug Adapter to program the MCU and perform in-system debugging. For users wishing to modify the example code or download the latest version of firmware into the board, the Si1120 Evaluation Kit installation package contains board-specific materials such as the latest version of the pre-built firmware .HEX image and the firmware example source code.
4.1. Using the Si1120EK With the Si1120 Performance Analysis Tool
The Si1120 Evaluation Kit is supported by the Si1120 Performance Analysis Tool. The Performance Analysis Tool allows users to see real-time measured infrared proximity and ambient light measurements from the Si1120 in a graphical form, as well as the calculated values for distance from each of the infrared LEDs and the X, Y, and Z positions. Additionally, recognized gestures and the ambient light conditions can be displayed in dedicated group windows. The communications interface to the Si1120 EVB is provided over USB (P3) via the CP2103 USB-to-
UART bridge.
To use the Performance Analysis Tool with the Si1120 Evaluation Kit:
1. Connect the C8051F930-TB to the PC using a USB cable.
2. Launch the Performance Analysis Tool from the “Start” menu.
3. Select the board from the “Devices” menu (it will normally show up as the last COM port in the list).
4. Select the channels you wish to display on the picture of the Si1120 EVB that appears. The individual channels
available are described in “4.1.1. Channel Selection” .
5. Click the green “Acquisition” arrow to begin collecting data.
graph, a hand was moved above the Si1120EVB. The selected traces shown are the calculated X and Y positions.
The green trace represents the X position, while the yellow trace represents the Y position of the hand above the board.
4
Figure 5. Performance Analysis Tool Main Window
Rev. 0.3
Si1120-EK
4.1.1. Channel Selection
Selecting which channels to display is a simple matter of checking the appropriate boxes over the board
photograph, shown in Figure 7.
4.1.2. Gestures and Ambient Light Conditions
In addition to infrared and ambient light measurements and distance calculations, the example firmware contains algorithms for gesture recognition and ambient light condition detection. When connected to the board with the
firmware, the gesture name and parameter information will be added to the top of the 3D Gesture group. Four
ambient light conditions (Sunlight, Incandescent/Halogen, or Fluorescent/CFL) will be displayed in the Light Type.
Figure 6. Performance Analysis Tool Group Windows
Gesture Name
Swipe Left
Swipe Right
Swipe Up
Swipe Down
Parameter
Speed
Speed
Speed
Speed
Table 1. Recognized Gestures
Parameter Range Description of Action
1 18 (Slow to Fast) Move hand rapidly from the right side to the left side of the board.
1 18 (Slow to Fast) Move hand rapidly from the left side to the right side of the board.
1 18 (Slow to Fast) Move hand rapidly from the bottom to the top of the board.
1 18 (Slow to Fast) Move hand rapidly from the top to the bottom of the board.
4.2. Silicon Laboratories IDE
The Silicon Laboratories IDE integrates a source-code editor, a source-level debugger, and an in-system Flash programmer. This tool can be used to develop and debug code for the C8051F930 MCU. The use of several thirdparty compilers and assemblers is supported by the IDE.
4.2.1. IDE System Requirements
The Silicon Laboratories IDE requirements:
Pentium-class host PC running Microsoft Windows 2000 or newer.
One available USB port.
4.2.2. Third Party Toolsets
The Silicon Laboratories IDE has native support for many 8051 compilers. The full list of natively supported tools is as follows:
Keil
IAR
Rev. 0.3
5
S i 11 2 0 - E K
Raisonance
Tasking
SDCC
4.2.3. Downloading the Example Firmware Image
Example firmware source code as well as a pre-built .HEX image are available from the Si1120-EK web page at http://www.silabs.com/products/sensors/infraredsensors/Pages/si1120ek.aspx
. The prebuilt .HEX image can be downloaded directly into the C8051F930 target board. The firmware source code and an example IDE project are configured to use a default path of C:\SiLabs\Optical_Sensors/Si1120/Firmware. Follow the steps below to update or refresh the .HEX image in the C8051F930-TB:
1. Connect the hardware as described in "3.2. Hardware Setup" on page 2.
2. Launch the Silicon Labs IDE, and click on Options->Connection Options.
3. Select “USB Debug Adapter” and then select the connected adapter from the list (it should show up as “EC3” followed by a serial number).
4. Select “C2” as the debug interface, and press “OK”.
5. Connect to the board by pressing the “Connect” icon, or using the keyboard shortcut Alt+C.
6. Click on the “Download” icon, or use the keyboard shortcut Alt+D.
7. In the download dialog window, click “Browse”.
8. Change to Files of Type “Intel Hex (*.hex)” and then browse to select the file.
9. Click “Open” then “Download”.
10.To run the new image, either press “Run” or “Disconnect” in the IDE.
Figure 7. Channel Selection
There are three different types of measurements available from the example firmware:
1. Raw infrared proximity and ambient light measurements. The infrared channels are indicated by the check boxes near the infrared emitters (D1-D7), while the ambient light channel is the check box over the Si1120 (U1).
6 Rev. 0.3
Si1120-EK
The data for these channels represents a measurement of the duration of the Si1120’s PRX low time, as seen by the C8051F930 MCU. The Y axis indicates the number of 6.125 MHz clock cycles that occurred while PRX was low. The maximum output limit of the Si1120 is 2 ms, which would correspond to 12250 counts of a
6.125 MHz clock.
2. Linearized distance measurements for each IR channel. The raw proximity values output from the Si1120 will be exponentially larger the closer an object is to the sensor. The channels labeled “Radius 1”, “Radius 2” and
“Radius 3” are linearizations of the raw data output from the sensor when illuminating the three different selected emitters. To use the example effectively, the shorting blocks on header J1 should be set according to
the diagram in Figure 1. This will select D1, D4, and D7 as the three reference emitters.
3. Calculated coordinate measurements. The linearized IR proximity measurements are used to calculate X (leftto-right), y (up-to-down) and a Z (far-to-near) measurements.
Due to the nature of infrared proximity measurements, the object’s size and reflectivity will have an impact on the values measured.
Rev. 0.3
7
S i 11 2 0 - E K
5. Schematic
8 Rev. 0.3
D
OCUMENT
C
HANGE
L
IST
Revision 0.2 to Revision 0.3
Replaced QuickSense Studio references and instructions with Optical Sensors Programmer’s
Toolkit.
Updated instructions for downloading and using
Si1120-EK example code.
Si1120-EK
Rev. 0.3
9
Smart.
Connected.
Energy-Friendly
.
Products
www.silabs.com/products
Quality
www.silabs.com/quality
Support and Community
community.silabs.com
Disclaimer
Silicon Laboratories intends to provide customers with the latest, accurate, and in-depth documentation of all peripherals and modules available for system and software implementers using or intending to use the Silicon Laboratories products. Characterization data, available modules and peripherals, memory sizes and memory addresses refer to each specific device, and
"Typical" parameters provided can and do vary in different applications. Application examples described herein are for illustrative purposes only. Silicon Laboratories reserves the right to make changes without further notice and limitation to product information, specifications, and descriptions herein, and does not give warranties as to the accuracy or completeness of the included information. Silicon Laboratories shall have no liability for the consequences of use of the information supplied herein. This document does not imply or express copyright licenses granted hereunder to design or fabricate any integrated circuits. The products are not designed or authorized to be used within any Life Support System without the specific written consent of Silicon Laboratories. A "Life Support System" is any product or system intended to support or sustain life and/or health, which, if it fails, can be reasonably expected to result in significant personal injury or death. Silicon Laboratories products are not designed or authorized for military applications. Silicon Laboratories products shall under no circumstances be used in weapons of mass destruction including (but not limited to) nuclear, biological or chemical weapons, or missiles capable of delivering such weapons.
Trademark Information
Silicon Laboratories Inc.® , Silicon Laboratories®, Silicon Labs®, SiLabs® and the Silicon Labs logo®, Bluegiga®, Bluegiga Logo®, Clockbuilder®, CMEMS®, DSPLL®, EFM®, EFM32®,
EFR, Ember®, Energy Micro, Energy Micro logo and combinations thereof, "the world’s most energy friendly microcontrollers", Ember®, EZLink®, EZRadio®, EZRadioPRO®, Gecko®,
ISOmodem®, Precision32®, ProSLIC®, Simplicity Studio®, SiPHY®, Telegesis, the Telegesis Logo®, USBXpress® and others are trademarks or registered trademarks of Silicon Laboratories Inc. ARM, CORTEX, Cortex-M3 and THUMB are trademarks or registered trademarks of ARM Holdings. Keil is a registered trademark of ARM Limited. All other products or brand names mentioned herein are trademarks of their respective holders.
Silicon Laboratories Inc.
400 West Cesar Chavez
Austin, TX 78701
USA
http://www.silabs.com
advertisement
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Related manuals
advertisement