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

    LOPY Timer interrup

    Scheduled Pinned Locked Moved LoPy
    timer interrupreal time changfrequency
    6 Posts 3 Posters 1.6k Views 3 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.
    • E Offline
      EasyTryer
      last edited by

      Hi,

      I need to generate a square signal on a pin at a precise frequency as the PWM function could do.
      But i need to adjust this frequency in real time .. mmm.. the goal is to generate a square signal to control a stepper motor including acceleration phases.

      So, i'm searching something like a timer interrupt where i could adjust frequency outside the handler.

      i found that :
      https://forum.pycom.io/topic/897/timer-and-uart-confugration

      but it doesnt compile on my LOPY ?

      Could you please give me some help or ideas to solve my problem ?

      thanks

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

        @easytryer The example you refer to is for a WiPy 1 device. That's not compatible to a WiPy 2 or LoPy. using a time interrupt is not recommended, since interrupts on the Lopy (and all the other Espressif devices) have a vary long and varying latency (see https://forum.pycom.io/topic/936/pin-interrupt-latency). The test was made for a Pin interrupt, but for timer interrupts you should expect the same behavior.

        1 Reply Last reply Reply Quote 0
        • E Offline
          EasyTryer
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • E Offline
            EasyTryer
            last edited by

            hi.

            thanks for this informations.
            Is there a way to acheive my goal or have i to return on more real time uController ?

            regards

            J 1 Reply Last reply Reply Quote 0
            • J Offline
              jmarcelino @EasyTryer
              last edited by jmarcelino

              @easytryer
              We introducing a Python interface to the RMT peripheral very soon (already in testing) I think it’ll do what you neeed

              E 1 Reply Last reply Reply Quote 1
              • E Offline
                EasyTryer @jmarcelino
                last edited by

                @jmarcelino
                thanks. I'll wait and try.

                1 Reply Last reply Reply Quote 0

                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