I’m trying to setup an Programmable Intervall Timer (PIT) on a x86 machine, but it doesn’t work anyway. I’ve registered an ISR at IRQ0, wrote timer control word to port 0x43, and wrote timer-value to 0x42.
Soo far, soo good.
My counter was counting and Interrupts happened, but not from my ‘source’ .
Perhaps someone have idea how to use this timers excatly.
The timer I was talking about is sometimes called the “Real-Time” clock, which is clearly not what you are talking about. There is an interval timer that the OS uses for scheduling and most timer services, which fires interrupt 0. You should not be programming this timer directly. I may be missing something however.
Hi,
thanks for your reply.
As far as I know the system uses the counter0, which fires IRQ 0, as you say, but on this chip(it’s the intel 8254) there are two more timers (one was used for the dram-refesh and the other one is normally used for generating the input for the small speaker in the pc. But one can change their mode). Perhaps you know something about them??? hope so
Otherwise do you know if there any other possiblities on a x86 machine, to use a counter which fires every 0.5 ms (or less) an interrupt???
I although found this (which is nearly excatly what I want):
Along with using a POSIX timer, hooking into interrupt 0 and figuring out what its frequency is, you can use the REAL-TIME clock, which is on another interrupt, I believe 8.