Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
hsimola wrote:
Those other things you mentioned goes too diffcult for me.
I have PC's from Pentium II to Pentium 4, mostly laptops.
they involve ripping out your processor and soldering on it, so it's probably out of the question anyway.
Can't you make an external card containing its own counter etc. all working at 4mhz or something, and then clock its count in the processor? say you make the input connect to the invert-input on a flipflop that controls the enable-pin of a 24-bit counter, and when you get the disable-signal (inverse of enable) you start sending the count. That no idea?
hsimola wrote:
Yes, that's also good idea. But I would like to work only with PC, not external cards.
Most people don't notice when you have a very small control thingy in your connection cable And then again, you can make it so small you can put it inline in a small box... does cost some more...
What is your final opinion about STROBE pin compared to ACK pin or serial port pins ?
I don't know if ACK will be fast enough, but I guess they're both equally fast. The strobe pin might have a slightly faster response because the data must be read within a microsecond, but I think ACK also has that.
hsimola wrote:
Frequencies I feed to serial port CTS pin are between 10-100Hz.
I don't see anything wrong with using CTS for <= 100 Hz....
As I mentioned you should be able to get 0.001 uS resolution using RDTSC, so I guess the question is, why isn't your original code this accurate?
To start with your first measurement should be discarded, as it will measure part of a cycle rather than a full cycle. You could wait for a rising edge before you start counting to remove this problem.
Other than this your accuracy will depend on how you calibrate RDTSC, how you interpret the results, and if your CPU's/RDTSC's clock remains at a fixed frequency (it can be messed up by automatic thermal monitoring, but it's unlikely).
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.