View Full Version : HowTo: Single host computer and multiple propeller serial comm and programming

Michael O'Brien
01-10-2009, 06:15 AM
ˇˇ I have a requirement where I need to connect three propellers to a single host computer (currently running propeller tool 1.2 and the SUN Java javax.comm API).

ˇˇ Previously I ran different propellers from different PC's but I was running out of computers, with this setup I was able to run three (3) concurrent com sessions from three (3) propeller tool windows.ˇ I was also able to note the com#'s for each of the propellers and perform bidirectional comms from a single java application.

ˇˇ Iˇfound this procedure for enabling multiple propeller tool IDE windows about 6 weeks ago that enables one to run multiple propeller tools in parallel, I think it is very usefull and would like to post it.

ˇˇ References:
ˇˇˇ ˇˇ First off I would like say a very big thank you to Chip Gracey for the FullDuplexSerial.spin object it works perfectly at 38400 baud against a java comm client host - right out of the box.
ˇˇˇ ˇˇ Second I would like to also say thank you to the author of a post where It was explained how to program multiple propellers using multiple propeller tool API windows.ˇ I amˇsorry I don't have your name, Iˇtried a lot of google searches but can't re-find the originalˇpage or author of about 6 weeks ago.

ˇˇˇ Procededure:
ˇ(essentially each current propeller tool will pick up the first propeller com port it finds)
ˇˇˇˇ1 - open the propeller tool and navigate to the menu "Edit | Preferences" or F5
ˇˇˇ 2 - goto the "Files & Folders" tab and the "Associations" section
ˇˇˇ 3 - deselect "Associated files launch into single editor" - the default was selected
ˇˇˇ 4 - in sequence for each combination (propeller tool x, usb cable x and propeller x)
ˇˇˇˇˇˇ 4.1 -ˇopen propeller tool #x and connect usb #x to propeller x
ˇˇˇˇˇˇ 4.2 - press F7 to identify - note com#x
ˇˇˇˇˇˇ 4.3 - disconnect the usb cable
ˇˇˇ 5 - when each propeller tool has associated with a different com# you are ready to reconnect all propellers
ˇˇˇ 6 - you can hit F10/F11 on all three at the same time now
ˇˇˇ 7 -ˇthe propeller tool windows will survive a power down of all propellersˇ - so no need to redo this procedure while the pc is up.

ˇˇˇ Alternatively you can run a custom comm control program or terminal on all (x) propeller chips while leaving the propeller tool windows open.

ˇˇ Here are some photos of multiple propeller comm channels in action (there is no inter-propeller communication yet).

ˇˇˇJava as a host for Propellers:
ˇˇ Also for reference, here is a procedure to get the SUN javax.comm API working on Windows - thank you to Rick Proctor of MIT.

ˇ* References:
ˇ*ˇˇˇˇ Sun Java Communication API
ˇ*ˇˇˇˇ See the following tutorial by Rick Proctor for the Lego RCX Brick at
ˇ*ˇˇˇˇˇˇˇˇ http://dn.codegear.com/article/31915
ˇ*ˇ Prerequisites:
*ˇˇˇˇˇ Java Serial Support on Windows
*ˇˇˇˇˇ See "PC Serial Solution" for the Lego(TM) RCX Brick at the following URL at MIT
*ˇˇˇˇˇ - it explains how to get the SUN javax.comm API working on Windows (it is officially supported only on Solaris and Linux).
*ˇˇˇˇˇˇˇˇˇˇˇ http://llk.media.mit.edu/projects/cricket/doc/serial.shtml
*ˇˇˇˇˇ SUN Java communications API (1998-2004)
*ˇˇˇˇˇˇˇˇˇˇˇ http://java.sun.com/products/javacomm/
*ˇˇˇˇˇ - copy comm.jar and javax.comm.properties to both yourJDK and JRE lib directories
*ˇˇˇˇˇ - copy win32com.dll to both your JDK and JRE bin directories - no need for a registration via regsvr32
*ˇˇˇˇˇ - in your IDE (IE: eclipse.org) project add a library reference to comm.jar to get your javax.comm java code to compile

ˇˇ thank you very much
ˇˇ /michael

01-10-2009, 07:43 AM
Alternatively you can use bst, check the "Allow individual ports" option and simply right click on each editor tab to select which propeller that code gets downloaded to :)

Cardinal Fang! Fetch the comfy chair.