PWM SetPulse Parameters
#1
Posted 11 January 2012 - 04:30 PM
Igor Kondrasovas
www.inovativatec.com
#2
Posted 12 January 2012 - 05:20 PM
Hi,
I have read many different information, and do not have an osciloscope near.. so can anyone please help me clarify what is the unit of time expected in the period an pulse parameters of the PWM SetPulse method? Milliseconds? Microsendons? clock pulses?
AFAIK it is microseconds... I've read examples on servo driving where the servos needed a 20ms duration signal and to turn it to middle position it needed an "on-time" of 1,3 ms... it worked with the following command:
servoLen.SetPulse(20000, 1300);Greets, Markus
- Victor M. and Igor Kondrasovas like this
NeonMika.Webserver
> Control your N+ and write webservice methods easyily
> Receive data from you N+ (in XML or JSON)
> Browse the SD on your N+ directly in the browser and down - and upload files
If you need help with NeonMika.Webserver, please just leave a note in the thread and/or contact me via Skype
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Mistakes teach you important lessons. Every time you make one, you are one step closer to your goal. ----
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
#3
Posted 13 January 2012 - 08:19 PM
AFAIK it is microseconds... I've read examples on servo driving where the servos needed a 20ms duration signal and to turn it to middle position it needed an "on-time" of 1,3 ms... it worked with the following command:
servoLen.SetPulse(20000, 1300);Greets, Markus
Yes this is correct - I did some measurement with a scope some time ago - results in my post at http://forums.netdui...ch__1#entry4323
Phil
- Igor Kondrasovas likes this
#4
Posted 14 January 2012 - 11:26 AM
AFAIK it is microseconds... I've read examples on servo driving where the servos needed a 20ms duration signal and to turn it to middle position it needed an "on-time" of 1,3 ms... it worked with the following command:
servoLen.SetPulse(20000, 1300);Greets, Markus
Sorry if this reply is a little bit outside the scope of the question. But I've an addition to Markus VV. answer:
Some servo have a value of 1,3ms other have 1,5ms as middle position...
Regards
Guido
#5
Posted 07 March 2012 - 03:21 PM
#6
Posted 20 July 2012 - 11:58 AM
SetPulse arguments seem to max out at 65535. After that the square wave flatlines. Is uint 16 bit on a Netduino or am I doing something silly? To be clear: I can't get setpulse() to generate output with a period greater than 66ms.
Hi Captainlffy,
Did you solve your problem? I was wondering about this and unfortunately this seems to be true. I believe the workaround should be using native code (C++).
Igor Kondrasovas
www.inovativatec.com
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users