View Full Version : Can cogs be synchronized?
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, 08: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...
01-18-2008, 08: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:firstname.lastname@example.org)
Propeller Applications Engineer
Parallax, Inc. (http://www.parallax.com)
Excellent. Thanks be to both of you for the help.
01-19-2008, 12:27 AM
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.
01-19-2008, 03: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:email@example.com)
IC Layout Engineer
Thank you. You've saved me many hours of grovelling!