(Read 271 times)
Mar 19, 2019, 09:48 pm
: Mar 19, 2019, 09:49 pm by umutgemisi
Are there any friend before used that library. its perfect one frequency counter but i need 2 counter anyone knows how can i count second frequency on other pin same time on Due? i search forum no topic about that. Thanks
Mar 20, 2019, 07:35 am
To measure frequency and duty cycle of input signals, Timer Counters in Capture Mode is the way to go (see TC_CMR register page 881 Sam3x datasheet).
AFAIK, tc_lib library from antodom does just that, although I don't know if you can select 2 input capture pins at the same time with that library. Give it a try .....
Mar 20, 2019, 06:15 pm
i will check it thank you
Mar 21, 2019, 01:40 pm
Hi there @umutgemisi,
As ard_newbie has commented you can use library tc_lib just for measuring digital signals.
You can find tc_lib at:
@HermannSW (thansk HermannSW) has already done some testing to know the limits of tc_lib. In this post you have a summary:
I think they can help you to have a better idea about tc_lib, they report measurements of signals with frequencies greater than 20Mhz.
As to if tc_lib can capture different signals in different pins simultaneously, it can, just have a look to the library's documentation.
I hope it helps.