Starting a new cog
Newzed
Posts: 2,503
Graham, you are a helpful sort of chap so I am asking once again.
I have this program on my Proto Board which controls a dual Nichia RGB chip by PWMing - I use BS2_Functions.· The program works beautifully, but I can not do anything else while my main program is running.· So.....
I thought that if the PWM function, using BS2_Functions, could run on a separate cog, I could incorporate it into my piggyback program.· For instance, say I am reading the EEPROM, and that the cog has these methods:
PUB rred
· repeat
··bs.pwm(red1, 200, 1000
PUB rredstop
··bs.pwm(red1, 0 100)
When I start reading the EEPROM I want to call "rred", and when I am finished reading the EEPROM I want to call "rredstop".· Can this be done?
Now the fun part - I do not·know how to start a new cog.· Could you show me how to do this, which really means would you write the whole thing for me?· Once I have the "rred" method working, then I can add the other colors.
Thanks
Sid··
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.
That is why they call it the present.
Don't have VGA?
Newzed@aol.com
·
I have this program on my Proto Board which controls a dual Nichia RGB chip by PWMing - I use BS2_Functions.· The program works beautifully, but I can not do anything else while my main program is running.· So.....
I thought that if the PWM function, using BS2_Functions, could run on a separate cog, I could incorporate it into my piggyback program.· For instance, say I am reading the EEPROM, and that the cog has these methods:
PUB rred
· repeat
··bs.pwm(red1, 200, 1000
PUB rredstop
··bs.pwm(red1, 0 100)
When I start reading the EEPROM I want to call "rred", and when I am finished reading the EEPROM I want to call "rredstop".· Can this be done?
Now the fun part - I do not·know how to start a new cog.· Could you show me how to do this, which really means would you write the whole thing for me?· Once I have the "rred" method working, then I can add the other colors.
Thanks
Sid··
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.
That is why they call it the present.
Don't have VGA?
Newzed@aol.com
·
Comments
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.
That is why they call it the present.
Don't have VGA?
Newzed@aol.com
·