IRQ0
Re:IRQ0
Hi,
http://www.cin.ufpe.br/~if118/projeto/PCtim003.txt
IRQ0 is the PIT (Programmable Interval Timer) chip which is capable of generating IRQs at a fixed frequency (oscillator), or after a preset time delay (one shot). It also controls the PC speaker.
IRQ8 is the RTC (Real Time Clock), which can generate a periodic interrupt capable of generating IRQs at a fixed frequency (same as PIT/IRQ0 only different). The RTC also keeps track of real time (second, minute, hour, day, month, year). It also has an update interrupt (which generates an IRQ every second, which is independant to the periodic interrupt). There's also an alarm, which can be set to generate an IRQ at a specific time on a specific day in a specific month in a specific year. This alarm also allows you to set things to "don't care", which can be used to generate an IRQ every hour, every day, once a month, once a year, etc.
Cheers,
Brendan
You can find information on PIT/IRQ0 and RTC/IRQ8 here:Jess wrote: I see.. I just wanted to make a simple delay function.. should I use this IRQ then? You know any place where I can find info about the PIT?
and by the way, whats the differenses between IRQ0 and IRQ8?
http://www.cin.ufpe.br/~if118/projeto/PCtim003.txt
IRQ0 is the PIT (Programmable Interval Timer) chip which is capable of generating IRQs at a fixed frequency (oscillator), or after a preset time delay (one shot). It also controls the PC speaker.
IRQ8 is the RTC (Real Time Clock), which can generate a periodic interrupt capable of generating IRQs at a fixed frequency (same as PIT/IRQ0 only different). The RTC also keeps track of real time (second, minute, hour, day, month, year). It also has an update interrupt (which generates an IRQ every second, which is independant to the periodic interrupt). There's also an alarm, which can be set to generate an IRQ at a specific time on a specific day in a specific month in a specific year. This alarm also allows you to set things to "don't care", which can be used to generate an IRQ every hour, every day, once a month, once a year, etc.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re:IRQ0
thank you
I also found this document, http://www.nondot.org/sabre/os/files/MiscHW/PIT.txt
about the PIT, but it claims that IRQ 8 will fire? But I thought IRQ0 was bonded to the PIT and that IRQ8 was binded to the RTC? A little bit confusing... All I want is to make a function that will wait for some time(milliseconds).
I also found this document, http://www.nondot.org/sabre/os/files/MiscHW/PIT.txt
about the PIT, but it claims that IRQ 8 will fire? But I thought IRQ0 was bonded to the PIT and that IRQ8 was binded to the RTC? A little bit confusing... All I want is to make a function that will wait for some time(milliseconds).
Re:IRQ0
Hi,
Cheers,
Brendan
This just means that "PIT.txt" (wrongly) assumes that BIOS default PIC settings are in use.Jess wrote: Or no, it claims that Interrupt 8 will fire. But what is interrupt 8? I?ve remapped the PIC so that IRQ0 will generate Interrupt 0x20.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re:IRQ0
IRQ 0 is the PIT, whereas IRQ 8 is the RTC. The PIT is a wonderfully versatile chip that can be set to perform a number of tasks, including generating periodic interrupts. The RTC can generate periodic interrupts as well, but only certain frequencies. An advantage of the RTC is that it always generates a particular number of interrupts per second, whereas the PIT is hard to program to generate an exact integer number of interrupts per second. Also, because the RTC lacks the flexibility of the PIT, it actually makes a better source for interrupts for use in task switching and the like. The PIT can do things the RTC can't, so it's a waste to tie it up doing anything the RTC can do just as well. For anything that either chip could do, use the RTC, that way, the PIT will still be available for doing the things only the PIT can do (like one-shots, odd frequencies, and the like).Jess wrote:and by the way, whats the differenses between IRQ0 and IRQ8?
Re:IRQ0
Hi,
If you want something really simple you could use the PIT and leave it set to it's default fequency (18.2065 Hz, or once every 54.9254 milliseconds). In this case all you'd need to do is install an IRQ handler and enable it in the PIC.
Cheers,
Brendan
Use which-ever one you feel like (it probably wouldn't matter much).Jess wrote: Well, I just want to make a simple delay function for my kernel.. should I use the Real time clock or the PIT for that (any opinions?)
If you want something really simple you could use the PIT and leave it set to it's default fequency (18.2065 Hz, or once every 54.9254 milliseconds). In this case all you'd need to do is install an IRQ handler and enable it in the PIC.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.