Pages: [1]   Go Down
Author Topic: Counting the impulses between two signals  (Read 342 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Dubai, UAE
Offline Offline
Edison Member
*
Karma: 21
Posts: 1670
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged


Pages: [1]   Go Up
Jump to: