What is wrong with Pit?
Posted: Fri Sep 05, 2003 9:46 am
I want my IRQ 0 to be raised only one times a second. Here is my code:
But my PitISR called lots of times a second. I can not slow it down, although changing cnt value. Am I doing something wrong??? What sould the correct code be to make my PitISR be called only ones a second?
Code: Select all
word cnt=1193180;
out(0x43, 0x36);
out(0x40,(unsigned char) (cnt));
out(0x40,(unsigned char) (cnt >> 8));
setIDTEntry(PitISR, 0x20; 0x0e + 0x80 + 0x60);
EnableIRQ(0);