Mail Archives: djgpp/2002/09/13/13:44:31
On Friday 13 September 2002 17:31, Sisco, Michael wrote:
> Has anyone ever tried calling uclock() from inside an interrupt handler?
>
> I have an interrupt handler which (among other things) handles an interrupt
> generated by an encoder used to calculate the speed of a running printing
> press. In order to calculate this speed with any significant accruacy, I
> need the timing resolution of the uclock() function. However, uclock()
> appears to be less than accurate when called within my handler. I have
> timed the frequency of our interrupt handler with an oscilloscope and found
> it to be repeatable to within 0.1%, but the timings I'm calculating using
> uclock() occasionally make very wild fluctuations.
How good accuracy is needed? If microseconds, then perthaps some different
event registration system (perhaps hardware) is needed.
At least I remember interrupt time jitter (measured with precedure analogous
with uclock() in interrupt handler in real mode DOS TSR, DJGPP application
was running in foreground and comunicating with that TSR) was up to about
100-200 microseconds on one 486DX2-66 box. But of course that depends
on hardware...
Andris
- Raw text -