View Full Version : Multiple cogs usage
01-19-2008, 10:46 PM
I·want to generate 5bit parallel·data and the clock signal from the Propeller. Clock frequency should be 5 - 7.5MHz, so it's necessary to use multiple cogs. But I'm not sure how to implement this.·Can anybody give me·any idea or any example with comments, how does it work ??
01-20-2008, 01:14 AM
What kind of data do you need to produce? If it can be precomputed, you could use the video generator to output it. 5 bits plus a clock is not very different from VGA and you could use the VGA drivers as models. You'd get two sets of data per long (one with clock low and one with clock high). You'd have to do a WAITVID instruction at least every 250 to 400ns which is doable.
If you look in Graham Stabler's Thread Index (http://forums.parallax.com/showthread.php?p=609066) under Visual, you'll find a link to "VGA 1600 x 1200 Tile Driver" which would be a reasonable model. This uses several synchronized cogs to build scan lines, then output them as VGA.
01-20-2008, 01:51 AM
You could also consult dSilva's Machine Language Tutorial, where one of the last chapters contains explicite examples of how to use the video logic for general applications http://forums.parallax.com/images/smilies/smile.gif
01-20-2008, 12:14 PM
I did a project that read two bytes from the main memory and output them (total 16 bits) at about 2.5-3MHz. Thats not as fast as you need but its getting close. If you like I can post the code.