06-30-2008 10:11 PM
07-02-2008 10:30 AM
Hi stove,
While you will be sampling the counter and the analog input simultaneously, the measurements will not be fully synchronized unless they are sharing some kind of clock. As it is now, the two tasks are running separately of each other, despite the fact that you are starting them together. To synchronize the two tasks, you will want to share the signal you are counting as the source of your analog input sample clock. Also, is the data you are reading for your period measurement exactly correct? The actual rate of the analog input sample clock may also be slightly off from what you expect, as it is a divide-down of the board’s timebase. I am also interested in what your application entails. It sounds like you are trying to correlate the period measurement with the input signal, though I am not sure why. Hope this helps,