Quantcast
Channel: Counter/Timer topics
Viewing all articles
Browse latest Browse all 1271

USING TWO COUNTERS TO COUNT INDEPENDAN EVENTS

$
0
0

Hi Group,

Been searching an trying many things to find a solution.  I know there is one but just can't seem to get it right.

 

I have two devices which supply TTL pulses which I need to count.  Ctr 1 will be used as a master clock, Ctr 2 will be used to count pulses from the other device based upon a finite number of ticks from counter 1.

Both pulses are asynchronus, and run continuously.  For instance I want Ctr 1 to read 500 pulses from device 1, and concurrently read pulses from device 2.  Both signals are relatively low freq (<10kHz).  I would like to start and stop both counters with the same clock, but realize this might be an issue with my X Series USB MIO

 

At the conclusion of counting the 500 pulses from device 1, I want end the while loop and read the accrued pulses from both devices.

A little error is tolerable on the second counter, as to it generally being a higher freq than counter 1 source.

 

I'm thinking that the two-edge seperation technique is what's needed, but just can't seem to get there.

 

Help would be greatly appreciated.

Chris B.

 


Viewing all articles
Browse latest Browse all 1271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>