Shop OBEX P1 Docs P2 Docs Learn Events
multi Propeller communication — Parallax Forums

multi Propeller communication

kbashkbash Posts: 117
edited 2011-02-02 09:43 in Propeller 1
This is some ( admittedly crude) code I wrote to let three Propellers on one circuit board communicate with each other using only two pins each.

I spent some time today while snowed in by the blizzard to pull up this code , re-write some of it and add some comments so that anyone interested in it could use it as a START for a working program.

The (wordy) comments at the beginning of the program explain its operation and have some suggestions for anyone wanting to use it. I DON'T have this board here with me today so this code has NOT been tested in operation. The program I modified here was one of three slightly different versions of the code.

More than anything this is presented as an outline of how such an optimized function CAN work, not as a working object itself. It DID work for my original need, but that was a pretty low-speed I had 24 cogs, and wasn't concerned about memory optimization.

If someone wants to take it further... HAVE FUN!


Ken Bash

Comments

  • Clock LoopClock Loop Posts: 2,069
    edited 2011-02-01 18:04
    I connected 55 props using only 2 pins also, with a "master" prop.
    Check it out!
    http://forums.parallax.com/showthread.php?127983-55-Parallax-Propeller-s-Parallells-Processing-of-Permanent-Perturbations.
  • kbashkbash Posts: 117
    edited 2011-02-02 09:43
    Clock Loop,

    Pretty cool hookup!

    Did you post your code?

    Reading some of the stuff going on right now with idbruce working on a "Solid" communication program for his CNC, I realized that I had already done something similar. I built my 3 prop Trimotor board because I needed more I/O than what a single prop had left over after all the VGA, keyboard, etc. functions were done. I use the full-duplex object all the time when I only need a couple of Props talking to each other, but the idea of doing factory automation with multiple Props scattered all over a factory or even on a single machine made it necessary to come up with some sort of scheme that would let a LOT of processors talk to each other and/or a master controller with a minimum of wires/fibers. I DO think that we need an optimized object that will allow a large number of Propellers to communicate with each other. Fiber optics, RF, anything that provides a high degree of electrical isolation would be best. If you look at the typical industrial machine, it will have hundreds to thousands of feet of wire run just to bring signals back to the centralized control box. It can be enormously more cost effective to scatter "Bright little processors" about a machine and let each one perform a localized function using only a couple of wires or better, fiber optics, to send signals back to the "Main" controller.

    I think it would be great to have a "standardized" object with two classes of standard physical isolated connectors ( possibly 3 including RF ) one for highest data-rates and highest reliability, possibly using off-the-shelf glass fiber optics. Another, for CHEAP connections possibly using plastic core fiber optics or non-optic isolator chips ( as in: Silicone Laboratories Inc. ISOpro series )
    ( anyone who has built machines that sit next to an arc welder or 50hp electric motor will understand my concern with electrical isolation )

    A problem with fiber-optics is the difficulty of doing a multi-drop connections without the need for repeating the signal from board to board. Lose one processor and your whole network is down.

    The common line, with all processors able to pull down the data line has the advantage of all processors being able to communicate with ALL processors, ( also letting the most important data get out at the beginning of a data packet, ie: EMERGENCY STOP ) however, this network can be shut down by a single processor "Stuck" holding the data line low.

    A more "Robust" scheme might include capacitive or inductive coupling with data "Bits" consisting of Pulses this way, a single processor "Stuck" at high or low couldn't disable the entire network.

    Anyone got any ideas for a cheap, fast, robust method of letting multiple processors talk to each other?

    Remember, "CHEAP" has a lot of definitions, depending on whether you're talking to a college student or a power-plant engineer. I'm shooting for "College student" cheap.
    also remember, even "College student" cheap isn't worth it if it isn't reliable.

    Ken Bash
Sign In or Register to comment.