Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RTC not calling my interrupt handler

Status
Not open for further replies.

MarkRaymond

Programmer
Jul 5, 2007
2
0
0
GB
I'm trying to get the RTC to call an interrupt handler 1024 times a second using the Periodic Interrupt. I've done fairly extensive checking, and the period is definitely set to 1024 ints/second, the periodic interrupt bit is deifinitely set, Status Register C has been read loads of times - I set it to read and output Status Register C 160 times in a row, and it came up with 11000000b every now and again, and all the rest 00000000b, as would be expected. I've checked several sources, and the RTC should be calling interrupt 0x70. My interrupt handler is pointed to by interrupts 0x4a and 0x70, tested by having an:
int 0x4a
int 0x70
in my code, so the vectors are definitely set up right, and working. By the results in Status Register C, I know that the RTC is trying to call an interrupt, but my interrupt handler is not getting called! (It outputs an A using BIOS teletype and reads Status Regiser C to clear it, that's all)
What could possibly be wrong?
This code is bootable...I have a bootstrap which reads this code to segment 0x0050 and runs it, so there is no operating system getting in the way, either.
I've tested this on 3 different machines, all with the same output.
 
You also need to enable the interrupt in the Programmable Interrupt Controller.

According to this, the RTC interrupt is disabled in the PIC by default, so even if the chip generates it, the CPU won't see it.


--
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top