LOPY Timer interrup
-
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-confugrationbut it doesnt compile on my LOPY ?
Could you please give me some help or ideas to solve my problem ?
thanks
-
@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.
-
This post is deleted! -
hi.
thanks for this informations.
Is there a way to acheive my goal or have i to return on more real time uController ?regards
-
@easytryer
We introducing a Python interface to the RMT peripheral very soon (already in testing) I think it’ll do what you neeed -
@jmarcelino
thanks. I'll wait and try.
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