Hi
the best way to count edges is to use the
T input of the counter or an external interrupt.
T input makes the counter count edges.
If you want to measure the period of
the signal, the best way is to use the input capture of the counter
controlled
by the analog comparator.
For slow signals : frequency = 1 / period
For fast signals, the best way is to count
the periods (using T input) inside a time window
________________________________
From: shirin ghanbari
To: avrclub
Sent: Monday, November 19, 2012 3:26 AM
Subject: [AVR club] counter /atmega8