Hi Hank
I think You and Robert got the sequence correct.
Now, the counts between 2 Comp1 ints is proportional to the frequency and you have no problems here.
The counts2 that you refer, are these raw counts? or are they converted as per the formula you showed in an earlier post?
If it is this formula you are using, I think you will need to revise this like sothis means @1khz, with that error I'm getting a phase shift of about 23 degrees being erroneouly calculated - ie 5000 (1st timer count) divided by 360 (degrees) muyltiplied by 325 (second timer count) - but I know for a fact there's actually no phase shift present at all (I can see this on my scope).
Phase(degrees) = ( Phase (Counts) * 360 degrees ) / Frequency (Counts)
The sequence of operation is significant and I have bracketed them on purpose.
As to why you cannot go below 325, I was wrong earlier. The latency cannot be so high. The explanation is like this
for a freq count of 500 (100Hz) the equation breaks down to 500/360 * 325
Now, Using integer math, 500/360 = 1, so 1*325
Bookmarks