120deg phase offset pwm in one cog
bmentink
Posts: 107
Hi There,
I am trying to generate two 50% duty square waves with 120deg phase shift in one cog using the counters, at the highest freq I can, but still having some resolution to be able to change the phase.
The closest I can see as an example is the counterpwm.spin file posted elsewhere on the forum, but I don't see anywhere in the code how to adjust phase.
Can anyone give me a clue how to do this ..
Cheers,
bernie
I am trying to generate two 50% duty square waves with 120deg phase shift in one cog using the counters, at the highest freq I can, but still having some resolution to be able to change the phase.
The closest I can see as an example is the counterpwm.spin file posted elsewhere on the forum, but I don't see anywhere in the code how to adjust phase.
Can anyone give me a clue how to do this ..
Cheers,
bernie
Comments
The above .spin file requires passing start(pin,Freq,PwmAddr), can anyone remind me how to pass the PwmAddr pointer?
Cheers,
B