Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max interrupt frequency #77

Closed
albertfaromatics opened this issue Sep 7, 2022 · 2 comments
Closed

Max interrupt frequency #77

albertfaromatics opened this issue Sep 7, 2022 · 2 comments

Comments

@albertfaromatics
Copy link

What's the maximum interrupt frequency on a pin the library allows? I'm trying to control a DC motor with encoder, with an encoder frecuency of about 20KHz but I'm not achieving the expected results.

@pjueon
Copy link
Owner

pjueon commented Sep 15, 2022

Do you mean the frequency of the PWM? or just manually setting the pin to HIGH/LOW repeatedly?
I'm guessing it's not PWM because I'm using jetson nano and I could get 40kHz and 60kHz output with the PWM pin.
(This could be changed depending on your jetson model and the pin you're using.)

And I believe that the library doesn't intentionally limit the frequency at the software level.
What does limit the frequency is probably the hardware.

Of course, the implementation of the library could be optimized better but I don't believe that's gonna happen in the near feature.

@pjueon
Copy link
Owner

pjueon commented Sep 29, 2022

Sorry, I confused the "interrupt frequency" with "output frequency".

But the thing is, there is no intentional limit for the interrupt frequency in the source code.

#78 seems to be similar issue. If you need further discussion, let's continue on #78.
Closing this issue.

@pjueon pjueon closed this as completed Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants