How change the PWM frequency to 50Hz ARDUINO

Status
Not open for further replies.

eebhoi01

Advanced Member level 4
Joined
Feb 22, 2012
Messages
116
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
2,347
Hello everyone

I have been surfing the net to find answers but still no luck. I am using Duemilanove with ATmega328 and when i check the PWM frequency using an oscilloscope it reads about 500Hz which is the typical. I want to change it to 50Hz how am i going to do this? By the way i am using the 50Hz PWM signal to drive a servo motor.

Or could i still operate the servo motor with 500Hz PWM frequency?

Any help is highly appreciated.


Thank you in advance.
 

First line in Google for "arduino pwm frequency" gives me this:
https://arduino.cc/playground/Main/TimerPWMCheatsheet

If that is not what you are trying to do, then you should clarify.

Generically, you should look into ATmega328 datasheet, it explains timers and PWM generation from page 90 onwards.

Whether you can use 500kHz depends on what kind of servo do you have.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…