i'm trying to count pulses using my AVR.
but i'm not sure how to accomplish that.
I was thinking of using timer interrupt using the same frequency as the pulses.
i'm trying to count pulses using my AVR.
but i'm not sure how to accomplish that.
I was thinking of using timer interrupt using the same frequency as the pulses.
Some of the timers in the AVR also have an input capture feature. It will provide an interrupt on rising or falling edges and record the value of the timer on that edge. You can measure time intervals between successive edges.
Phone rings would be detected with a 48V zener accross the line .Each ring is a 50V or so burst is it not? When the handset is picked up the line goes to 50V and stays there until hangup.