Shop OBEX P1 Docs P2 Docs Learn Events
Multiple cogs usage — Parallax Forums

Multiple cogs usage

MillhouseMillhouse Posts: 1
edited 2008-01-20 04:14 in Propeller 1
Hello..

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 ??

Thanks..

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-01-19 17:14
    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.
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-19 17:51
    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 smile.gif
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-01-20 04:14
    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.

    Steven
Sign In or Register to comment.