Society of Robots - Robot Forum

Software => Software => Topic started by: Stephanie on August 18, 2009, 07:51:28 PM

Title: 1~2ms pwm?
Post by: Stephanie on August 18, 2009, 07:51:28 PM
Okay, I got my Sabertooth 2x5 with the R/C signal mode (simulated by an Axon MCU).

But I can't find how to PWM 1~2ms! All I see is a servo command that uses "cycles" as an argument. How many cycles = 1 ms? Can I use a function that uses ms as an argument?

Thanks.
Title: Re: 1~2ms pwm?
Post by: sonictj on August 18, 2009, 08:03:48 PM
I can definitely explain how but it may be easier for you to use Webbot's Library.  If you want me to elaborate on how to manipulate the registers in the atmega640 to create the pwm signal let me know, and I'll post how.
Title: Re: 1~2ms pwm?
Post by: Stephanie on August 18, 2009, 08:07:58 PM
Oh... I thought it would be a single function with port and pulse width.

Thanks, I'll just use Webbot's library then.
Title: Re: 1~2ms pwm?
Post by: Admin on August 19, 2009, 07:05:38 AM
http://www.societyofrobots.com/axon/axon_function_list.shtml#hardware_defines

or

http://www.societyofrobots.com/axon/axon_function_list.shtml#servo_centering