Home
People
Publications
Events
Teaching
Projects
Resources
Contact
Community
Blog







Tutorials
Software
Docs

:: Research Group Embedded Interaction :: Media Informatics :: Ludwig-Maximilians-University Munich


Particle How-To and Documentation Page

How to get started with Particle software development (please see at the end of the page for other related links and how-tos).

1. Install the Compiler
We prefer the CCS C compiler. You can install the compiler anywhere you like. We chose the home directory as follows:
C:\Program Files\PICC which we further reference as $COMPILER_HOME

We use PCH compiler, update to revision 3.219, later versions make problems in the form of compiler error messages which do not occur with ealier versions.

The compiler reports that it installed an interface to mplab - that is incorrect. You definitely have to get the MPLAB plugin file from www.ccsinfo.com.

2. Particle Base System
Download the Particle base system from TecO. You find it under 'Software' and then 'Particle Base System'.
Extract the base system anywhere you like, the base directory containing all files will be referenced as $PARTICLEBASESYSTEM_HOME. We prefer C:\svn\Particles for we share our code base.

To successfully compile code, you need to pass the ccsc a corresponding argument:

+STDOUT +FH +LN +T -A +M +Z +Y=0 +EA I="C:\PROGRAM FILES\PICC\devices;C:\PROGRAM FILES\PICC\drivers;$PARTICLEBASESYSTEM_HOME" "$(FilePath)"

Please note the double quotes around the include directories. These are needed in some cases, e.g. as in EditPlus (as argument when defining user tools).

For compiling code using our I2D display, the Barton 96040, please download the files from our Particle Source Code page.Make sure you can compile the template.c file!

Please note that you may have to change some slashes in the TecO code! See our template. It seems that the conversion seems necessary to make the code compile under windows. We need / under windows. The base system comes with \.

3. Chose Programmer
The programmer you chose is basically up to you - and your nerves.

  • USB Bridge/XBridge
  • MPLAB ICD2
  • CCS ICD-U

We definitely prefer the ICD-U as it is one of the fastest programmers and offers command line functionality which makes it usable by many editors and IDES.

For the USB Bridge, you need to install JAVA version greater 1.5 update 4. You also need the drivers for the USB to serial conversion of the data arriving via RF. You can download the operation software from TecO and the drivers from www.ftdichip.com.
Follow the instructions in the USB Bridge readme file. 

It seems that the USB bridge JAVA program does not always work with the Particle Analyzer (new or old). Packets are received by the bridge (counters go up and increase) but no packets are displayed in the analyzers.

Attention: the java version (latest version of the bridge software) does receive data but this is somehow not provided to any particle analzer or network. So we are using the bridge software of 2004 which works fine for us.

For the new JAVA based USB bridge, edit the env_run.bat according to your needs, point it to the location of the java.exe of your JAVA SDK. You will need to reboot after installing the driver for the bridge to make it really work...
R E B O O T !

You should be able to program Particles over the air (otap) by using the old Particle Analyzer (see development tools below). The new analzyer does not support otap as of writing.

I will omit the steps to set up MPLAB to work as it is documented from Microchip.

For the ICD-U download the drivers and software. It will immediately work.

4. Editor and IDEs
We use several editors and IDEs for Particle development.

We prefer any other program other than MPLAB (everyone who has ever used MPLAB will know why) but is the only tool using the MPLAB ICD2 programmer. Please follow the links above for instructions on how to integrate the compiler and the programmers into the editors and ides.

5. Development of Particle Code (to run on the Particles)
TecO provides several development tools for debugging and facilitating program development. The most valuable tool is the Particle Analyzer.

Make sure the send and receive ports of e.g. the USB bridge and the Particle Analyzer are switched, so if the USB bridge does use port 5555 for sending and port 5556 for receiving, the analyzer has to use port 5556 for sending and port 5555 for receiving.

Since service pack 2 for Windows XP, the old Prticle Analyzer can not do a "scan network" anymore for discovering Particles. You have to start the the console and then switch on a Particle and listen for its CTR boot packets. The new Particle Analyzer can do a (passive or active) scan. But it seems that the new Particle Analyzer does not always seem to work with the USB bridge (when its connected to the same host), no matter which software you run for the USB bridge (old or new JAVA version). Packets are received by the bridge (counters go up and increase) but no packets are displayed in the analyzers.

The old Particle Analyzer does support over the air programming (otap). But from time to time it does not work and deletes the program on the Particle. Then manual programming with a physical programmer is required to get the Particle back working.

6. Development of Particle Code (to run on a host PC)
On the Particle source code page you find some files adapted from us for programming host applications for Particles with VisualStudio and Windows XP.

 

Please see also our other how-to pages:

How-Tos