I have a fairly silly question: how would one set different PWM frequency on different ports?
I need to pulse two separate steppers at different speeds, but when I do this (blinking LEDs for testing):
PWM left = new PWM((PWM.Pin)FEZ_Pin.PWM.Di5); PWM right = new PWM((PWM.Pin)FEZ_Pin.PWM.Di6); left.Set(3, 50); right.Set(5, 50);
LED on pin 6 blinks, LED on pin 5 is on. If I choose 2 and 4 for feq, same thing happens, but 4 and 2 behaves different: both LEDs blink at 2hz but led on pin 5 has 1/2 the duty cycle.
Is this supposed to happen?
If yes, is there a way to use hardware WPM in any other way (I don’t want to waste CPU cycles on PWM)?
P.S. I apologize if this is a no-brainer quetion… I tried searching the forum, eBook and FAQ but didn’t find any solutions…