Shop OBEX P1 Docs P2 Docs Learn Events
Another cog usage question -SOLVED- — Parallax Forums

Another cog usage question -SOLVED-

ratronicratronic Posts: 1,451
edited 2010-05-30 03:52 in Propeller 1
Hi everybody, as long as I've been playing with the propeller, this is something I still haven't quite figured out. In the example below (just an example I'm not really trying to do this, just understand the cog usage)
I have the cog #'s returned commented to the side. I know the cog #'s returned are the actual cog # + 1. What I don't know is, are there two cogs acually running the spin interperter? Cog 0 running this program and Cog 1
running the spin methods from the started objects?

con············································
· _clkmode = xtal1 + pll16x····················
· _clkfreq = 80_000_000


···············································
obj············································
· tv : "vga_text"······························
· wv : "tv_text"·······························
· fd : "fullduplexserial"······················
· ac : "mouse"·································
· rr : "realrandom"····························
· ff : "float32"·······························
· gr : "graphics"······························
···············································
pub main | a···································
· tv.start(16)·································
· tv.dec(wv.start(12))···············'3·····
· tv.dec(fd.start(31,30,0,9600))· '4·····
· tv.dec(ac.start(24,25))···········'5·····
· tv.dec(rr.start)····················· '6·····
· tv.dec(ff.start)····················· '7·····
· tv.dec(gr.start)···················· '8·····

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
···································Fix it, if ain't broke!


D Rat

Dave Ratcliff N6YEE

Post Edited (ratronic) : 5/30/2010 3:56:19 AM GMT

Comments

  • Zap-oZap-o Posts: 452
    edited 2010-05-30 03:47
    Nope start at 0 and count up from there. The main code is running in 0 most of the time.

    Also note that one cog can run all the objects you listed. I dont like to waste cogs nono.gif
  • ratronicratronic Posts: 1,451
    edited 2010-05-30 03:52
    Sorry about that, I just recounted and must had another brain fart!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ···································Fix it, if ain't broke!


    D Rat

    Dave Ratcliff N6YEE
Sign In or Register to comment.