Mail Archives: djgpp/1997/04/22/21:50:29
On Tue, 22 Apr 1997 10:40:27 GMT, Christoph Kukulies
<kuku AT gilberto DOT physik DOT rwth-aachen DOT de> wrote:
>I need a (relatively fine grained) time base and I'm thinking of using
>the system timer chip for this purpose. Never programmed that chip
>before and never dealt with hardware interrupts under djgpp.
>Can anyone point me to some sample code?
>The timer should interrupt at a rate of 10 KHz and the interrupt
>service routine is just supposed to increment a global 32 bit value.
>Hope, the 10KHz doesn't bring down the overall system performance.
ACTUALLY, you'd probably be better programming the timer chip to
count for you - leave the system timer alone, use the speaker channel;
it can be disconnected from the speaker, set to count, and cleared.
Time passes.
Read the timer.
Tadah!
Think that'd be awkward to do? Well, look up uclock() in the info
pages!
ABW
--
"Plug and Play support: WfEWAD will autodetect any installed
Nuclear Arsenals, Laser Satellites, Battlefield Control Networks,
Radar Installations, Fighter Squadrons, and other WfEWAD compliant
devices, including the new Macrosoft Unnatural Keyboard, with
full support for the now-famous Big Red Buttom(tm)."
(Windows for Early Warning and Defence User's manual P26)
Alaric B. Williams Internet : alaric AT abwillms DOT demon DOT co DOT uk
<A HREF="http://www.abwillms.demon.co.uk/">Hello :-)</A>
- Raw text -