I have to measure pulse about 20 Mhz. On average, I have about 200 000 pulses in 1 second, but these pulses are not sent regularly. In reality, the pulses are sent per packet, and therefore has a frequency higher than 200 kHz (I think about 20 Mhz, may be more).
I developped a solution with an Arduino Nano (ATmega328), and its 16-bit counter. But I have a problem, the meter can not count correctly. In fact, I have about 4 times less pulses than expected.
I saw that the Arduino Leonardo has a high-speed counter (ATmega32U4 64MHz).
- Do you think this counter will be good enough for my problem?
- I'm trying to understand the datasheet of ATmega32U4 (10 bits), and the counter seems harder to use than the ATmega328 (16 bits).
I use Arduino for rapid prototyping, but after I develop my own card.
Can you help me with my questions?
Thank you a lot