Hi,
I want to read PWM duty and freq from GPIO22. I want to attach a sensor there, that measures 2 things and encodes that to duty (10-90%) and freq (50-250Hz) values.
Does anybody has an example code for me how to do that?
Thanks in advance!
How to read PWM duty and frequency from pin?
-
- Posts: 290
- Joined: Wed Sep 05, 2018 6:23 am
Re: How to read PWM duty and frequency from pin?
MCPWM Capture feature can help you
Re: How to read PWM duty and frequency from pin?
Is there any example or a library?
Cannot find anything
For sure, I am not the first, who want to do something like this.
Cannot find anything
For sure, I am not the first, who want to do something like this.
Re: How to read PWM duty and frequency from pin?
Otherwise I have to go the "hard way" and implement edge-rising/falling interrupts + calculation of duty and freq.
Didn't expect, that there is nothing available
Didn't expect, that there is nothing available
-
- Posts: 361
- Joined: Mon Jan 04, 2021 2:06 pm
Who is online
Users browsing this forum: Corand, stijnb1234, thormj and 141 guests