Shop OBEX P1 Docs P2 Docs Learn Events
prop to prop comms — Parallax Forums

prop to prop comms

Guns of FunGuns of Fun Posts: 26
edited 2009-08-26 03:47 in Propeller 1
Whould there be any speed advantage to having two props communicate over an 8 I/O bus, instead of I2C or simple serial?

Comments

  • SRLMSRLM Posts: 5,045
    edited 2009-08-25 01:02
    Yes, it would be faster since you can transfer a whole byte of data at a time, instead of a single bit. Maybe 8x faster, depending on the amount of data you are putting through.
  • Guns of FunGuns of Fun Posts: 26
    edited 2009-08-25 01:27
    That's what I was thinking.· I've been in the electromechanical repair field for years, but am still new to design.

    Is there anyone who is making multi prop boards that communicate over an 8bit bus?
  • jazzedjazzed Posts: 11,803
    edited 2009-08-25 01:34
    No one has anything like that in production AFAIK. Some of us have talked about it; there is no forum contributed software for that yet.
    I have the beginnings of the design wired on my desk so that I could start software, but I have been distracted by other things.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve

    Propeller Tools
  • pjvpjv Posts: 1,903
    edited 2009-08-25 02:42
    Hi GoF;

    Do you really need an extreme rate of speed?

    The prop can transmit (and presumably receive) at over 1 Mega bit per second. And if you get fancy with two cogs (have not implemented this yet) perhaps two to three times that fast.

    Keeps the hardware a lot simpler than a parallel bus.

    Cheers,

    Peter (pjv)
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-08-25 03:10
    Guns of Fun,

    Here is something I put together awhile back that still should be cleaned up and put in the OBEX but I haven't had a chance to do yet. It was designed specifically to allow fast communication between two Propellers. Using only 4 pins you can achieve 14.5 Meg Baud which is the same as saying 14.5 million bits per second.

    http://forums.parallax.com/showthread.php?p=694610

    With a little bit of handshaking you could make this bidirectional. The main thing to consider is that the receiver is up and running before you transmit, or you will lose data. When I was testing this object I used two propellers connected using a 5 conductor ribbon cable(4-signal, 1-ground), no shielding, and 10 feet long. I did this on purpose so that (I felt anyway) it would work under an extreme condition. Both props also need to be running at the same clock frequency, but they don't need to be locked or synced together. They each can have an independent crystal. The way that the data packets are sent, (using two start bits) allow it to lock on the signal.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 8/25/2009 3:15:49 AM GMT
  • Guns of FunGuns of Fun Posts: 26
    edited 2009-08-25 03:20
    Thanks Beau

    Im not an electrical or software engineer, but I drew this up on expresspcb.

    I was thinking of 4 props communicating·with each other·over an 8bit bus.

    I have no idea what some of the software guys could do with this.

    I was also thinking that a couple of cogs in each prop could be tasks for communication purposes.
  • Guns of FunGuns of Fun Posts: 26
    edited 2009-08-25 03:59
    I think I got confused.

    Its not an 8 bit bus.

    It would be a parallel bus of 8 lines at 32bits each?· So 256 bits at a time?

    Am I close?
  • jazzedjazzed Posts: 11,803
    edited 2009-08-25 04:26
    The largest possible single indivisible transfer unit for Propeller is 32 bits at a time, and that is by playing some hardware tricks. Many people here like serial com for various reasons.

    BTW: Welcome to the Propeller forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve

    Propeller Tools
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-08-25 04:54
    Guns of Fun,

    The problem I see in the pcb layout is that there is no room for the EEPROM and you are limited to using only 4 Props.

    If you have a Buss between each Prop, where only 1 Prop can be a 'Master' and all the rest are 'Slaves' you can use many Props. At any time you can use a single wire (<-standard serial connection), 4-wires, 8-wires, or whatever to communicate to all of the 'Slaves' at once. Through software you can negotiate for a 'Slave' Prop to become a 'Master' and suppress the current 'Master' into a 'Slave' if it's necessary. Using a buss configuration to connect multiple Props, each Prop would have its own address, either hard coded through some extra I/O pins, or programmed in software. This way, the 'Master' can send a signal where all of the other Props listen as 'Slaves'. Based on the command and the requested Prop address sent from the 'Master'... all, some, or just one Prop can act on the command.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
    856 x 672 - 162K
    1083 x 661 - 188K
  • Clock LoopClock Loop Posts: 2,069
    edited 2009-08-25 05:17
    14.5 million bits per second.

    3-cogs on each prop for full duplex.


    Not too.. ,,, Schwabe ?

    !

    Now I suppose the only thing to be concerned about is multiple cog access to said memory locations?
    This where lock semaphores come handy?
  • hinvhinv Posts: 1,255
    edited 2009-08-25 08:25
    Don't forget to have a look at Props Galore.

    http://forums.parallax.com/forums/default.aspx?f=25&m=343952

    mctrivia and others worked up a board design for 8 props. I think mctrivia is just waiting for enough interest for people to join in.

    I was thinking of a similar design to yours that I called propGrid. I wouldn't use cross links like you have for point to point access from each prop because it used up too many pins and wasn't scalable.
    If you used an 8bit link to your neighbor props, you would have 16 available I/Os on each corner prop, and only use the center ones for processing, message passing, and the available memory.
    The downside(or upside depending on how you looked at it) is that the props in the center would certainly have to boot off of their neighbor. I consider this a plus because you wouldn't need a eeprom for each.
    If you run on the same clock, you might be able to eliminate one of the start bits which would raise your throughput.
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2009-08-25 09:27
    @hinv

    WoW! 8 props on a single board smile.gif

    I know you can't hook a single xtal to more than 1 prop, but I wonder if
    instead of having 8 xtals on the board and thus having no precise sync
    between the 8 props, if you could take 1 xtal and build an amplified oscillator
    circuit on the board somewhere and then just route the output from that oscillator
    to all 8 props?

    Has anyone done something like that?

    If it's a silly idea don't laugh, I'm 99% software and 1% hardware...a total
    hardware noob smile.gif

    @Guns of Fun
    I suppose that is you in your avatar image?
    It looks like you are aiming something...what is
    that big thing you are aiming???

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Some mornings I wake up cranky.....but usually I just let him sleep in -
  • hinvhinv Posts: 1,255
    edited 2009-08-25 09:53
    Holly: I know it is a long read, but the circuit you describe is in the Props Galore thread.
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2009-08-25 10:15
    @hinv

    Really?
    So I guess it wasn't a silly idea then smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Some mornings I wake up cranky.....but usually I just let him sleep in -
  • Guns of FunGuns of Fun Posts: 26
    edited 2009-08-25 11:26
    Thanks for the insight beau.· That opens up a lot more possibilities.


    Hi Holly

    What you see in the avatar is me riding backwards on top of a big truck at 75mph.··I am carrying the M249 (SAW), and dog gone it, none of the bad guys would ever come out and play.

    ·
  • Guns of FunGuns of Fun Posts: 26
    edited 2009-08-25 11:52
    Ooops, meant to thank everyone.· I don't want Beau to get a big ego (him being an engineer and all).roll.gif
  • photomankcphotomankc Posts: 943
    edited 2009-08-25 13:58
    HollyMinkowski said...
    @hinv

    Really?
    So I guess it wasn't a silly idea then smile.gif

    Nope, I'm pretty sure I have seen some other designs that use a prop output and a cog counter to provide the clock to another prop. I think the Morpheus board does that IIRC. Now I'll have to go look again. Not a far fetched idea at all.
  • LeonLeon Posts: 7,620
    edited 2009-08-25 14:24
    XMOS has a clever way of transmitting 32 bits in one chunk between cores and chips using five wires. They get 400 Mbit/s bidirectional transfers. Something like it should be feasible for communication between Propeller chips.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 8/25/2009 2:30:47 PM GMT
  • Guns of FunGuns of Fun Posts: 26
    edited 2009-08-25 14:30
    Hey Leon

    Can you post a link to that info?
  • LeonLeon Posts: 7,620
    edited 2009-08-25 17:54
    It's described here:

    www.xmos.com/search/node/xsystem.pdf

    You need Section 3. Someone on the Xlinkers forum has interfaced the two-wire link to an FPGA. His Verilog code is available.

    10 wires are in fact needed for bi-directional transfers. It would obviously make sense to try the two wire version first.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 8/25/2009 6:30:21 PM GMT
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-08-25 18:46
    Leon,

    That's actually pretty slick! In a way it's like Rectangular QAM only your constellation symbols are designated to specific wires and not quadrants. I tried to do something like this by adjusting the width of the pulse not only for the on-time, but also for the off-time. The specific width then became the constellation symbol where the on-time would represent I for example, and the off-time would represent Q.

    This method opens up an interesting possibility that would be much faster than the high speed driver I have posted.

    Thanks Leon


    QAM reference:
    en.wikipedia.org/wiki/Quadrature_amplitude_modulation

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • LeonLeon Posts: 7,620
    edited 2009-08-25 19:31
    XMOS obviously do it in hardware, I was wondering about the best way to do it in software. A state machine approach?

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 8/25/2009 7:36:39 PM GMT
  • pjvpjv Posts: 1,903
    edited 2009-08-25 22:43
    Hi Beau;

    I think your on/off time thing should work. But probably, at least for lines with anything more than a token amount of capacitance or distance, you would also need to send the complement. All of course to keep the DC balance neutral, like Manchester coding does.

    Interesting concept.... must try this.

    Cheers,

    Peter (pjv)
  • Guns of FunGuns of Fun Posts: 26
    edited 2009-08-25 23:46
    Here's my version of what Beau was talking about using 44-pin packages.· It only shows the chips, so it would have to have a bigger footprint.
    1288 x 778 - 137K
  • Bill HenningBill Henning Posts: 6,445
    edited 2009-08-26 02:59
    Umm... perhaps I should let another cat out of the proverbial bag.

    Morpheus and Propteus are designed to have a shared bus - their P0-P7 stack directly on top of each other - NOT and accident. If the SPI ram using P8-P11 is not populated, P8-P11 are available for handshaking; if it is populated, P9-P11 are available when P8 is high.

    Please note you really should only put a Mem+ boards onto the top Morpheus onto such a stack, and they cannot have the SPIO and SD sections poulated.

    I have not written any software for it yet, it is on the list - I intend to write an app note on this configuration. Due to bus loading I don't recommend stacks more than 10 high.
    jazzed said...
    No one has anything like that in production AFAIK. Some of us have talked about it; there is no forum contributed software for that yet.
    I have the beginnings of the design wired on my desk so that I could start software, but I have been distracted by other things.
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
    Morpheus & Mem+dual Prop SBC w/ 512KB kit $119.95, 2MB memory IO board kit $89.95, both kits $189.95
    www.mikronauts.com - my site 6.250MHz custom Crystals for running Propellers at 100MHz
    Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-08-26 03:47
    pjv,

    Thanks ... I think that at one time I calculated that I could send the varying widths ok with 50ns pulse resolutions (This was with a 4X4 symbol table). But receiving and decoding became an issue and I didn't gain any real speed. I hadn't thought of using the individual pins to represent symbols - wow!

    .. but feel free to explore that option... I hope that your mileage will vary, and share your results!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
Sign In or Register to comment.