Counting the impulses between two signals

Hi,

I have two signals:

Signal 1: 1kHz frequency
Signal 2: user signal

My programm schould count the circles of signal 1 until signal 2 becomes active. The problem is, that the counter schould immediadly start form 0 on to count until singal 2 becomes active again. So there schould be no circle of signal 1 lost between signal 2 becomes active. After signal 2 becomes active the numer of the circles of Signal 1 schould be given out on the monitor.

I´m sorry but I don´t know how I can realise this. Hopefully you can help me

Hi,
You can do this with interrupts, you have two of them available on the UNO. These links should help you give you some background, once you have read through them come back for more help if you need it.

http://arduino.cc/playground/Code/Interrupts

http://arduino.cc/en/Reference/AttachInterrupt

Duane B

rcarduino.blogspot.com