|
From: | Till Hülder |
Subject: | Accurate GPIO Clock |
Date: | Sun, 1 Mar 2020 13:52:00 +0100 |
Hello,
i want to build a accurate GPIO Clock . I wrote a wait function :
void sleepus(int n)
{
clock_t end=clock()+n*CLOCKS_PER_SEC/1000000;
while(clock() < end) continue;
}
And wait until the value of the bits change .I recognized that the time of these wait time is not constant. It differs by a few microseconds.
Is there are another way to get a more accurate clock ?
Best regards ,
Till
[Prev in Thread] | Current Thread | [Next in Thread] |