CogInit doesn't
steprog
Posts: 227
Hi Guys,
Trouble with coginit.· I was trying to load assem routines in all 8 cogs, but doesn't seem to work.· Mainly I need to load assem into the cog 0 where the main program is working.· I thought that should work, but it seems to ignore me.
Perhaps this is too general a question, but I thought an assem could be loaded on the same code asking for it. True?
Gre
Trouble with coginit.· I was trying to load assem routines in all 8 cogs, but doesn't seem to work.· Mainly I need to load assem into the cog 0 where the main program is working.· I thought that should work, but it seems to ignore me.
Perhaps this is too general a question, but I thought an assem could be loaded on the same code asking for it. True?
Gre
Comments
Can you post a code example?
·obj
· FreqLast······ : "mixerLast"
This code basically gets a command from the gui and starts loading the cogs
··· if strcomp(@RunCLK, @command)
······ Freqlast.start(LO2,Fo2A,Fo2B,Frequency2,delay2,deg180_2,1)
······ Freqlast.start(LO3,Fo3A,Fo3B,Frequency3,delay3,deg180_3,2)
······ Freqlast.start(LO4,Fo4A,Fo4B,Frequency4,delay4,deg180_4,3)
······ Freqlast.start(LO5,Fo5A,Fo5B,Frequency5,delay5,deg180_5,4)
······ Freqlast.start(LO6,Fo6A,Fo6B,Frequency6,delay6,deg180_6,5)
······ Freqlast.start(LO7,Fo7A,Fo7B,Frequency7,delay7,deg180_7,6)
······ Freqlast.start(LO8,Fo8A,Fo8B,Frequency8,delay8,deg180_8,7)
······ Freqlast.start(LO1,Fo1A,Fo1B,Frequency1,delay1,deg180_1,0)
This code that resides in "mixerlast" calls the coginit command and loads up the assembly
PUB start(LO,FA,FB,Period4,dely,deg180,cognum)
· D180 := deg180·
· LOpin := |< LO
· FApin := |< FA
· FBpin := |< FB
· Delay := dely
· Per4:= Period4
· Phase1:= 1
· Phase2:= 0
· If Delay > Per4
··· Delay:= Delay - Per4··
··· Phase1:=0
··· Phase2:=1
·
··· coginit(cognum,@entry,PAR )
'
· return
Thanks for the help.
Greg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
8x8 color 80 Column NTSC Text Object
Wondering how to set tile colors in the graphics_demo.spin?
Safety Tip: Life is as good as YOU think it is!
I use it I just boneheaded it.
Thanks,
Greg