delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/09/13/10:31:37

Message-ID: <BDD73AE8AEE3EF438E07420C2600E9F65C913E@qtiexch0.qgraph.com>
From: "Sisco, Michael" <mdsisco AT qtiworld DOT com>
To: "Djgpp (E-mail)" <djgpp AT delorie DOT com>
Subject: Fw: uclock() within an interrupt handler
Date: Fri, 13 Sep 2002 09:31:27 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2656.59)
Reply-To: djgpp AT delorie DOT com

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.

Any suggestions?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019