Shop OBEX P1 Docs P2 Docs Learn Events
Tri-motor (3 propellers) communication — Parallax Forums

Tri-motor (3 propellers) communication

KenBashKenBash Posts: 68
edited 2006-12-28 10:54 in Propeller 1
Does anyone have a (reasonably) ·fast program or protocol·that lets multiple propellers talk to each other over three or fewer·I/O lines?··

I have a machine that needed more I/O than a single prop could provide so I designed a board with three propellers onboard.· ( It was almost worth it just to be able to name it the "Tri-Motor" )· I left three I/O lines for processor to processor communications knowing that I could hack something together relatively quickly.·· I did, it's a two wire com protocol.· One of the props generates a sync pulse, then 200 clock pulses.· Prop 1 uses the first 64 clocks, for sending it's data, Prop 2 uses the second block of 64 clocks and Prop 3 uses the third block of 64.· ·It's really crude and I haven't done any optimization because it works for the simple functions I need for this application.··

I haven't done much processor to processor communications so I assume that there are some much better functions out there somewhere.· Any Ideas?


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
" Anything worth doing... is worth overdoing. "

··············································· ( R.A.H. )
····································

Comments

  • T ChapT Chap Posts: 4,223
    edited 2006-12-28 03:07
    You could use fiber with two pins per chip, and either a single fiber or dual fibers, doesn't matter. The light can go both ways and be split at the ends really cheaply. Distance is not an issue either compared to wire. I think the potential speeds could be faster than wire as well. I have some links for the parts, I'll look for them if you are interested. You simply use the Full Duplex Object with the transmitter and receiver attached to the pins. Otherwise you can just use Full Dup with two pins and wire, if needed add a Max3232 driver.



    here is the detector
    www.i-fiberoptics.com/leds/IFD95.pdf


    more parts

    www.fiberopticproducts.com/Emiters_detectors.htm

    Post Edited (originator) : 12/28/2006 3:17:21 AM GMT
  • BTXBTX Posts: 674
    edited 2006-12-28 04:01
    Hi Ken.

    I don't know ...what you name "fast", I think, that perhaps it could be easy for you, to express it in kbps, etc.

    But also, I think, that 8 bit parallel, plus two or three lines like R/W CS, would be easy and "faster" than another serial protocol.

    If you have your board yet, with only three lines tied together,·could be, some like SPI·"in asm" driver, although three·lines are not enough.

    Regards.

    Alberto.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Bill HenningBill Henning Posts: 6,445
    edited 2006-12-28 06:02
    How exactly did you wire the three lines on each prop, and between props?

    Also, it depends on what speed you need. You could always use I2C if 400kbps is enough.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com - a new blog about microcontrollers
  • KenBashKenBash Posts: 68
    edited 2006-12-28 08:51
    I appreciate the posibilities on how it "Might" have been done, fiber optics, parallel and such, but the board is already built. The chips are less than an inch from each other. Since the main goal was to increase my I/O capability, it didn't seem to make sense to tie up a lot of lines for inter-processor communication.

    All I did was tie 3 I/O ports together on all three chips. I put pull-down resistors on these lines so that any processor could drive the data line high while the other 2 processors are listening. I'm not sure that the full duplex idea will work with 3 processors all talk/listening on the same lines.

    My current scheme gives a time-slot for each chip to talk while the other two processors are listening. I suppose that a similar idea might work with the full-duplex function but it isn't inherent in the current code is it? Since I haven't done any speed optimization I suspect that I'm getting less than 400 kbps now. Anything would probably be an improvement.

    I was just hoping that someone had already done a inter-board com function between multi props. Do you think that I2C is the optimum for something like this? I don't really need much speed for this current use, but I expect future aps to need a bit more "OOMPH" in processor to processor communication.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    " Anything worth doing... is worth overdoing. "

    ··············································· ( R.A.H. )
    ····································
  • nutsonnutson Posts: 242
    edited 2006-12-28 10:54
    I posted a·master-multiple slave·communication experiment·here·http://forums.parallax.com/showthread.php?p=613523·, you might have a look at it. Disclaimer: as the communication scheme completely·relies·on the exact timing·of assembly instruction sequences, it is not very robust. Change one instruction in the wrong place and the whole thing·blows up (in other·words: no claims, no support)

    Nico Hattink····
Sign In or Register to comment.