Hi.
I am creating a program that performs pwm. In order to do so, I need the most precise timing possible, in order to refresh the image at a professor designed rate. It is a fairly easy assignment, except for the timing issue. We have been using the Sleep function for delays in between refreshing the image, however it is almost completely inaccurate, especially when we input a fixed frequency. We were hoping to find a function that works on clock ticks alone, rather than the sleep function. I imagine that I could make a loop that would stop after so many interupts (depending of course on the speed of the system- which would alos need to be queried) and therefore create the correct delay. Mind you, this delay is not in seconds, but rather milliseconds and less, so it needs to be extra acurate. If anyone has any bright ideas, please help. In the meantime, I will continue to search libraries for this type of function.