Shop OBEX P1 Docs P2 Docs Learn Events
Syncronising Multiple Props — Parallax Forums

Syncronising Multiple Props

Brian FairchildBrian Fairchild Posts: 549
edited 2012-09-04 18:00 in Propeller 1
I have a need to sync two or more Props together or to be accurate 16 or more COGs.

Assuming they are running off a single external clock, would tying them together on a common line and getting each COG to wait on a WAITPEQ work? I could drive the line from one COG or even from a monostable delay kicked by a COG.

The end requirement is that one COG generates a clock signal for an external device but multiple COGs, including the one generating the clock, read the data which comes back. This could, by way of example, be something like an SPI memory.

Comments

  • JBealeJBeale Posts: 25
    edited 2012-09-04 13:35
    I haven't tried it, but my understanding is yes, using a single external clock source, and syncing each cog with WAITPEQ would work. If you are using a lower external frequency and multiplying it with the internal PLL then I expect some phase jitter due to the different PLL circuits in the different physical prop chips, but with good power supply bypass caps and ground planes, I assume that jitter would be small.
  • prof_brainoprof_braino Posts: 4,313
    edited 2012-09-04 18:00
    An alternative would be to drive the master cog from the external clock. Then have that prop generate a clock line to the slaves. In this case the master and slave are always exactly synchronized, and you can do a high speed serial connection at the master's clock speed. We do this in propforth for the multiprop configurations, where we just as bare prop chips and run the slaves with no rom and no crystal. This is how we make big props with N * 8 cogs and N*32 pins.

    Also you can add sub slaves. Each slave continues to be exactly sync's with its master.

    In the propforth download, look in

    Propforth-V.5.x\kernels\doc\tutorials

    at

    tutorial-3.3 MCS Loopack.txt
    tutorial-7.2 NoROM.txt
Sign In or Register to comment.