21-04-2012, 04:47 PM
Examples and Libraries User Manual
swru109a.pdf (Size: 406.37 KB / Downloads: 24)
Introduction
This User Manual covers the software examples and libraries used with the CC2500/CC2550DK
Development Kit and CC1100/CC1150DK Development Kit.
Definitions
A collective term used for all development kits for the
platform, i.e. CC2500/CC2550DK and
CC1100/CC1150 DK
USB MCU The Silicon Labs C8051F320 MCU used to provide a USB
interface on the SmartRF®04EB
Factory firmware The firmware that is programmed into the USB MCU from the
factory. This firmware supports SmartRF® Studio operation as
well as a stand-alone PER tester.
PER Packet Error Rate. Measures the percentage of packets that
contain errors or are lost.
General Notes about the Software
Both the examples and libraries are written for the Keil C51 C complier for the 8051 platform. You
may have to modify the source code somewhat if you intend to compile the code using another
8051 C compiler. The examples are supplied in both source code and .hex file form. There are
several .hex files supplied for each example. For every frequency band (315, 433, 868 etc.) there
are two .hex files; one for stand-alone use (requires that you have access to Silicon Labs’ EC2
programming tool) and one for use with the bootloader. Even if you do not have access to an 8051
C compiler, you can program the filename_bootloader.hex files into the USB MCU using SmartRF®
Studio (as long as you have not overwritten the bootloader that come programmed into the EB from
the factory).
Running the Examples
It is easy to run the examples Chipcon provide for this platform. SmartRF® Studio can be used to
load different .hex files into the USB MCU. Note that the examples have to be linked with the
bootloader libraries to work (all examples provided from Chipcon have been linked with these
libraries).
Connect the Evaluation Board to a PC using the USB interface. Start SmartRF® Studio and select
the SmartRF® 04 tab. Select the Evaluation Board (do not choose the “Calculation Windows”) and
click on the “Load USB Firmware” button. You are then presented with a file selection dialog box
where you can select the file to download (filename_bootloader.hex).
If you have overwritten the bootloader, you must program the bootloader into the USB MCU using
Silicon Labs’ EC2 serial programmer before you can program the examples by the aforementioned
method. The bootloader .hex file and programming software that uses the EC2 are included in the
SmartRF Studio installation. These files are installed into the SmartRF® Studio folder, but the
installer does not generate desktop shortcut or start menu shortcuts for this program.
If you have loaded one of the examples and then attempt to run SmartRF® Studio, SmartRF® Studio
will detect that the factory firmware has been overwritten and prompt you that it will attempt to write
the factory firmware to the USB MCU.
SWRU039a Page 3
MCU Examples
The examples should be installed into the
Audio
This example runs a loop-back test from the audio input to the audio output. The USB MCU
samples the incoming audio using the built-in ADC, and sends it right back out again using the
PWM functionality of the MCU. Copying from the ADC to the PWM is done in an interrupt routine
triggered by the timer 1 interrupt.
To test the example, connect a headset (the headset should have separate mini-jacks for
microphone and headphones) to the microphone input and the headphone output on the Evaulation
Board. You should now be able to hear your own voice in the headphones. Make sure that the
volume control is not turned all the way down.
Note that the audio quality of this example can be improved by performing processing of the raw
data. Sampling at a higher rate and then performing averaging to implement digital filtering would
help in reducing noise caused by aliasing.
Joystick
This example demonstrates reading the joystick and writing to the LCD. This program runs in an
infinite loop reading the status of the joystick and reporting this status on the LCD. To save pins, the
joystick position is coded as an analogue value on the Evaluation Board, and is read using the ADC
of the USB MCU. The ebGetJoystickPosition() function uses the ADC to read the status and
decodes this to a direction.
To test the example, simply move the joystick and see the status change on the LCD display. The
LCD display will also indicate if you have pressed down the integrated joystick button.
Potmeter
This example demonstrates reading the potmeter position using the ADC and reports the value on
the LCD display.
The program runs in an infinite loop waiting for the push button (S1) on the EB to be pushed. When
this happens, it reads the potmeter postion and sends this information to the LCD display.
To test this example, press S1 and the current potmeter value will be displayed on the LCD. Turn
the potmeter knob and press S1 again.