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

Propeller to propeller communication

MJHanaganMJHanagan Posts: 189
edited 2011-02-04 17:01 in Propeller 1
I have an application where I will need two Propeller chips to control a small process (lots of I/O pins needed). And, the two Propeller chips need to know what the other is doing so I need a a way of having them communicate and pass data back and forth. They will be next to each other so I'm thinking something like 4 I/O pins should suffice (Rx, Tx, RTS, CTS) for establishing some type of simple "serial" interface would be sufficient

I think this must have been done before and someone is likely to have some code or objects so I don't have to reinvent this wheel. Anyone aware of how best to accomplish this task?

Comments

  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2011-02-01 16:56
    A simple way to do this, if you can use a couple cogs each, would be with full duplex serial. One cog on each for RX and one for TX. You probably only need one handshake IO if you do it right.

    I will soon be working on an object that will be able to 10Mb (possibly 20Mb) communication between two propellers (half duplex), with only 1 IOs and I am hoping to suffice with one cog each propeller. It's a few weeks out at best though.

    There are a number of objects and methods to do what you are talking about. It really all depends on the needed speed and the distance and wiring between the propellers. How much information are you sending between them?
  • MJHanaganMJHanagan Posts: 189
    edited 2011-02-03 03:57
    I just took a look at your code and it looks like just the thing I need for this. Thank you!
  • TappermanTapperman Posts: 319
    edited 2011-02-04 16:04
    Bobb Fwed wrote: »
    I will soon be working on an object that will be able to 10Mb (possibly 20Mb) communication between two propellers (half duplex), with only 1 IOs and I am hoping to suffice with one cog each propeller. It's a few weeks out at best though.

    That sounds pretty quick. Does it scortch the bits on the way through the pin?

    ... Tim
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2011-02-04 16:19
    I have the system able to send single longs at 20Mb, but most of the time a bit or two are flopped. It may be a wiring limitation (I may need to terminate the comm lines properly). I had an old project that did 10Mb over 5 feet of open-air wiring without any problems to and from breadboards (without terminations). I will continue to work on it, it may also be slight timing fault or something.
  • kuronekokuroneko Posts: 3,623
    edited 2011-02-04 16:33
    Bobb Fwed wrote: »
    I have the system able to send single longs at 20Mb, but most of the time a bit or two are flopped.
    What are you using for sampling the bits, EDGE or LOGIC mode? If it's the latter forget it, the prop can't handle this cleanly. I know, too many assumptions but those are the (single cog) methods I can think of (apart from 2 cog interleave mode).
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2011-02-04 16:57
    Yeah, I was using Logic, which also requires a extra pin to throw away. I don't know if it will work with Edge. I will mess with it more Monday.
  • kuronekokuroneko Posts: 3,623
    edited 2011-02-04 17:01
    Check the update here [thread=110325][POC] single wire high speed serial link (updated 20101124)[/thread], I removed the extra pin requirement so that should give you a head start with an edge.
Sign In or Register to comment.