Re: How to use PWM?

2016-01-21 Thread Raman Gopalan
Dear JB, > When I plug the data cable into any pin on the entire board the > servo spins clockwise, even when plugged into PWM0 and (pwm-stop 0) > being called. Understand. The servo might be responding that way to the default level of the pins on the Mizar32. What does your multimeter say for

Re: How to use PWM?

2016-01-21 Thread Jake
Thanks John, I had to wiggle the % around. I think I ended up with 10 and 3, but it spins the same speed both ways. Thanks :) On 19/01/16 19:18, John Duncan wrote: You have a cycle that is 21.7ms (t) in length, with 1.7ms on and 20ms off. The frequency is 1/t or 46Hz. The duty cycle is the

Re: How to use PWM?

2016-01-21 Thread John Duncan
Glad I could help On Thu, Jan 21, 2016 at 12:42 PM, Jake wrote: > Thanks John, I had to wiggle the % around. I think I ended up with 10 and > 3, but it spins the same speed both ways. Thanks :) > > On 19/01/16 19:18, John Duncan wrote: > > You have a cycle that is

Re: How to use PWM?

2016-01-19 Thread John Duncan
You have a cycle that is 21.7ms (t) in length, with 1.7ms on and 20ms off. The frequency is 1/t or 46Hz. The duty cycle is the amount of time on divided by the length of the cycle, 1.7/21.7 or 8%. I'm rounding to the nearest integers. On Tue, Jan 19, 2016 at 1:53 PM, Jake

Re: How to use PWM?

2016-01-19 Thread Jake
I can't test those numbers as I don't have a power supply at home. I'm curious how your work out hte duty cycle as a percentage? Thanks. On 19/01/16 18:32, John Duncan wrote: Just a guess, you probably need to consider the whole 21.7ms or 21.3ms to be your period (46Hz or 47Hz) and then your