Problem with BS2 _functions object?
I have been useing the BS2_functions object and seem to have a problem with it.
When useing the FREQOUT.Set function in three cogs ,,If the freq is set the same in two of the cogs..the
command fails,in those two cogs.If the freq commands are different the results are ok....Irv
When useing the FREQOUT.Set function in three cogs ,,If the freq is set the same in two of the cogs..the
command fails,in those two cogs.If the freq commands are different the results are ok....Irv

Comments
The following example will start 4 cogs generating the same frequency. Each cog will use its private instance of the BS2 object.
CON _clkmode = XTAL1|PLL16X _xinfreq = 5_000_000 OBJ helper[4]: "BS2_Functions" VAR long stack[32 * 4] PUB null | n repeat n from 0 to 3 cognew(pulse(n, 16 + n), @stack[32 * n]) PRI pulse(idx, pin) helper[idx].FREQOUT_Set(pin, 1{Hz}) ' start counter waitpne(0, 0, 0) ' keep cog aliveAlternatively, you could use the Synth object instead which avoids this issue by not having duplication protection.
CON _clkmode = XTAL1|PLL16X _xinfreq = 5_000_000 OBJ helper: "Synth" VAR long stack[32 * 4] PUB null | n repeat n from 0 to 3 cognew(pulse(16 + n), @stack[32 * n]) PRI pulse(pin) helper.Synth("A", pin, 1{Hz}) ' start counter waitpne(0, 0, 0) ' keep cog alive