Another cog usage question -SOLVED-
ratronic
Posts: 1,451
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
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
zip
77K
Comments
Also note that one cog can run all the objects you listed. I dont like to waste cogs
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
···································Fix it, if ain't broke!
D Rat
Dave Ratcliff N6YEE