I want to send out one bit on the serial port with the precision in nanoseconds. Is there any functions similar to QueryPerformanceCounter() and QueryPerformanceFrequency() in windows? I use the NAgetCpuClkFreq() as I want to get the Frequency of the CPU. I can’t use the NATotalTicks(), since it is non-accurate. any ideas ? // Dan
Only thing I can recommend is using the timer 2 using fast interrupt. Any other way you would not be able to come even close to that resolution, due to unwanted interrupts. And even with this approach i doubt nano seconds are possible. I havent tried using the timer 2 yet, so cant tell you what the highest possible accuracy is though
Have you tried the fast interrupt on DIGI Connect EM on ME? It seems that it is not available on NS7520 but I cannot have a confirmation.