Nice way to get 2 cogs that are 180 degrees out of phase WRT HUB?
Rayman
Posts: 14,849
I'm trying to double throughput to an LED matrix array using two cogs instead of one.
Anyway, I'm not sure if this is possible, but if it is possible, I think I'll need two cogs that are 180 degrees out of phase with respect to the HUB.
So, I think I need, e.g., cog#0 and cog#4
But, this is unfamiliar territory for me, I've never cared before which cogs things are on...
Here's my current approach:
1. Start this driver first so that only the main Spin cog is being used before looking for 2 more cogs.
2. Start up the first cog.
3. Start up three dummy cogs
4. Start up the second cog.
5. Stop the three dummy cogs.
Is this approach guaranteed to work?
Is there a cleaner way?
Anyway, I'm not sure if this is possible, but if it is possible, I think I'll need two cogs that are 180 degrees out of phase with respect to the HUB.
So, I think I need, e.g., cog#0 and cog#4
But, this is unfamiliar territory for me, I've never cared before which cogs things are on...
Here's my current approach:
1. Start this driver first so that only the main Spin cog is being used before looking for 2 more cogs.
2. Start up the first cog.
3. Start up three dummy cogs
4. Start up the second cog.
5. Stop the three dummy cogs.
Is this approach guaranteed to work?
Is there a cleaner way?
Comments
IIRC the old manual mentioned greater equal 8 for cognew (which is the reason I use/d &7). The interpreter does a max id, #8 which settles this argument I believe.