Shop Learn
P2 SPIN "jm_pwm.spin2" & "_clkfreq" minimum — Parallax Forums

P2 SPIN "jm_pwm.spin2" & "_clkfreq" minimum

Hello,
in the "jm_pwm.spin2" file unfortunately nothing is specified about the minimum required frequency.

The pulse width is specified from 0 to 255.
Where do I have to spin if I want to have 0 to 2047?
Is it enough that I
dc := 0 #> dc <# 255
from 255 to 2047?

Comments

  • AribaAriba Posts: 2,481

    You can use: startx() to start the object with 2047 for 'units'.

    The min. clockfreq is: pwmfreq * units, if the clockfreq is too low, it works anyway, just the pwm freq will be lower than you have specified.

    Andy

Sign In or Register to comment.