View Full Version : Can cogs be synchronized?

01-18-2008, 08:49 AM
Can assembly language routines in each cog be synchronized so as to allow each cog to read the same external port in evenly spaced intervals?


01-18-2008, 09:07 AM
Yes, you have to "post" some future time to all the involved COGs, so they can sync by WAITCNT to this time stamp. This is possible, because all COGS see the same CNT.

It is also possible to do this using a "pin", waiting by WAINTPEQ...

Paul Baker
01-18-2008, 09:16 AM
As deSilva has said, yes it is possible. There are a few objects which have synchronized cogs, take a look at any of the vga drivers with higher resolution (1024x768, 1600x1200) to see how it can be done.

Paul Baker (mailto:pbaker@parallax.com)
Propeller Applications Engineer
[/url][url=http://www.parallax.com] (http://www.parallax.com)
Parallax, Inc. (http://www.parallax.com)

01-18-2008, 10:23 AM
Excellent. Thanks be to both of you for the help.

01-19-2008, 01:27 AM
Hi David-

I had to get some help to do this very thing. Have a look at this thread for some code examples:

Scroll down to Ariba's first post. He makes it pretty clear how to do this. If you have questions about the code I posted, don't hesitate to ask.

Good luck.

Beau Schwabe
01-19-2008, 04:44 AM

There are several discussions on this subject... here is another example of Syncing more than one COG together on one Propeller and even Syncing more than one COG between two different Propellers together...


Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

01-20-2008, 12:46 AM
Thank you. You've saved me many hours of grovelling!