Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    PWM frequency

    Scheduled Pinned Locked Moved Discussion
    pwmfrequencymax
    2 Posts 2 Posters 1.1k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • RobTuDelftR Offline
      RobTuDelft
      last edited by

      I'm a little confused by the documentation.
      It states that pwm = PWM(0, frequency=5000) # use PWM timer 0, with a frequency of 50KHz will generate a PWM object with a frequency of 50 kHz. Further down the docs state that:

      frequency is an integer from 1 to 19455 Hz.

      I need the frequency to be 25 kHz, is this possible with the Wipy or Lopy?

      Without data you're just another person with an opinion.
      Hackster | About me

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @RobTuDelft
        last edited by robert-hh

        @RobTuDelft The comment in the example is wrong. Maximum is 19455. For an input value between 19456 and 19531 you'll get 19531 Hz. Generally, the precision is low at the higher frequencies. So specifying a value of 19000 give 19011 Hz, 19200 -> 19230. So it looks as if the "real" periods are multiples of a small value like 200 ns.

        1 Reply Last reply Reply Quote 1

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          Last post

        Pycom on Twitter

        Pycom