Palatis / arduino-softpwm

Software PWM library for Arduino
78 stars 27 forks source link

Question: Any difference between using a hard pwm pin or not? #8

Closed Fireflaker closed 7 years ago

Fireflaker commented 7 years ago

What is the approximate usable frequency range for a 16Mhz clock? Does clock cycle divider work when using a soft pwm/ hard pwm pin? Or the 0-255 counter handles all the work adjusting frequency.

Thank you very much for this library.

Palatis commented 7 years ago
  1. it's a combination of pwm channels, pwm levels, and pwm frequency. you want to update the pin as fast as you can (fast enough so that persistent of vision comes into play), but still leave enough processing power to run your own code. use the printInterruptLoad() method to determine if the current combination of values is suitable for your application.

  2. this lib is a softpwm lib, doesn't use any hw pwm support.

Fireflaker commented 7 years ago

Thank you very much!

On Tue, May 9, 2017 at 4:38 PM Victor Tseng notifications@github.com wrote:

Closed #8 https://github.com/Palatis/arduino-softpwm/issues/8.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Palatis/arduino-softpwm/issues/8#event-1075326661, or mute the thread https://github.com/notifications/unsubscribe-auth/AVn2QzpG9wnXY6-LGEIErrpsVz_HUm4Rks5r4M69gaJpZM4NVTXj .