PDA

View Full Version : QuickStart active COG demonstrator



lanternfish
11-10-2011, 11:40 PM
Following on from my Spin - TRUE, FALSE and BITWISE operators (http://forums.parallax.com/showthread.php?135756-Spin-TRUE-FALSE-and-BITWISE-operators#top) thread I have this idea that the Quickstart LED's could be used to show which COG(s) are active. I envisage this would be done with code that uses COGID commands. Anyone feel up to following up on this as my SPIN knowledge is weak.

Cheers

kuroneko
11-10-2011, 11:51 PM
Add this line to each cog function. LEDs are attached to pins 16..23 so 16+cogid will cover that range. When the cog exits dira gets reset and the LED turns off.

dira[16+cogid] := outa[16+cogid] := 1

lanternfish
11-11-2011, 12:20 AM
Hi kuroneko

So, so simple to add to existing code.

Thanks