Subj : Timing is everything
To : Jonathan de Boyne Pollard
From : David Noon
Date : Wed Jun 07 2000 01:20 pm
Hi Jonathan,
Replying to a message of Jonathan de Boyne Pollard to David Noon:
DN>> However, the driver I am writing needs to be able to run without
DN>> interrupts, so it uses Timer 2 and polls the port; the polling makes
DN>> it a little [as in totally] CPU-bound.
JdBP> I'm curious. Why are you not able to use interrupts ?
The Timer 2 port has no IRQ associated with it. Only Timer 0 generates the
clock IRQ.
The way Timer 2 works is that it counts down from its starting value by
decrementing a 16-bit counter every 838 nanoseconds (the base "tick" for Intel
hardware). It keeps decrementing and wraps around at zero until it is stopped.
To determine the number of ticks elapsed the program latches and reads the
port.
Regards
Dave
<Team PL/I>
--- FleetStreet 1.25.1
* Origin: The man who broke the bank at Monte Carlo (2:257/609.5)