First steps sending data from a cPart using a  cPart bridge

If you follow the steps below you can easily send data from a cPart and see the sent data in the Particle Analyser. Please note, that this guide is written for Windows (for device drivers and software for linux see http://particles.teco.edu/software/index.html)!

 

1) Devices needed

cpart cPart
USB bridge USB bridge

 

2) Downloading needed software and device drivers

 

3) Installing the software and device drivers

3.1) Install JDK 1.5

Install the Java Development Kit as described on the Sun page.

3.2) USB bridge software (Windows)

Start usbbridge_v100.msi from your computer and choose 'Typical '

usbbridge.msi

If finished, you should find a link to the program on your desktop.

USBBridge start link on desktop

 

3.3) USB Loader

Start usbloader.msi from your computer and choose 'Typical '

usb_loader

After the installation process .hux files are registered to start with the USB Loader.

 

3.4) Windows Drivers for the USB bridge

Extract the usbbridge_v200_driver_libusb.zip into a directory of your choice.

Now insert the USBBridge in your USB port. Please note that the receiver (cPart) should be
connected on the USB board on top like in the image shown below.

USB Bridge Hardware

Windows will now request you to select the driver.
Specify the Driver directory you chose earlier. The installation concludes automatically the correct .inf file.
Check for the "TecO particle USBBridge [based on libusb]" in the Device Manager. It should read like the following:

TecO particle USBBridge in the device Manager

If you have already installed an older version of the USBBridge driver, please update it:

TecO particle USBBridge in the device Manager

 

3.5) SDCC Compiler

Start sdcc_20060226_setup.exe and choose full installation

sdcc

Make sure that sdcc is added to the path environment on your system.

sdcc

 

3.6) Cygwin

Start the setup.exe.

cygwin

Click yourself through the installation.

cygwin

Choose install from the internet, select a directory (Note: Please don't use spaces in the directory, cygwin had problems with that in former versions) and select a mirror in the next dialogues.

cygwin

Just to be sure install at least the following packages: Admin, Archive, Base, Devel, Doc editors, Interpreters, Libs, Perl, Python, Shells, System, Text, Utils. Now the neccessary files are downloaded and installed. This might take a while...

Please take care that you cygwin\bin folder is added to the path environment of your system otherwise add it.

change_path

 

3.6) cPart CSMA source code

Extract the cpart_CSMA.zip to your cygwin home folder if it doesn't exist start cygwin first so the home directory is being created.

 

 

4.) Starting the applications

4.1) Test sdcc and compile the demo project

Start cygwin from the link on your desktop. The first steps are to check if cygwin and sdcc are installed correctly and compile the demo project.

compiling_a_project

Change to the path where you installed the demo code directory. Try sdcc -v and see if it's installed correctly. After that try to build the demo project with make "usb=1". Now a .hux file is created which you can flash to your cPart with the next step. If you need a .hex file to flash it with a programmer like GALEP just leave the "usb=1" out.

Note: You have to put 'make clean' before you can compile the next time (or touch the source files)

4.2) Flashing the .hux to the cPart

First you have to insert a USB bridge (without a cPart on it). Eventually you need to install the driver again, just choose the directory you extracted usbbridge_v200_driver_libusb.zip to.

The double click on the generated .hux file (here sender.hux).

flashing

The following console appears then:

flashing

Now you can attach the cPart. The blue and red leds will glow. Now you have 3 seconds to press enter and begin the flashing of the demo hux file. A number indicates how many bytes are written. If it stops before the maximum is reached you need to try again. If you missed the 3 seconds you will also have to try again.

Note: Before you can flash a .hux file on a cPart you need to install a bootloader to it with a programmer. Otherwise you are not capable of flashing via USB. Download the .hex file for the bootloader here: cc1010_bootloader.hex

How to flash the cc1010_bootloader.hex will be described in a later tutorial.

5.) Congratulations! It should work now!

For more information about ACL tuples or how to use the libparticle framework to write client applications see the documentationat the particle website.