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 :smiley-roll:
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 .....
i will check it thank you
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: https://github.com/antodom/tc_lib (https://github.com/antodom/tc_lib)
@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.