Real Time Clock

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
AvengerX

Real Time Clock

Post by AvengerX »

Alright.. i'm enablng the RTC, and have some across a few problems... for one, i can't get it to trigger every second using the UIE or the AIE [from the document at http://www.nondot.org/sabre/os/files/Mi ... ockFAQ.txt ]. I've got the alarm set for FF:FF:FF so it triggers every second of every minute of every hour, and the UIE jsut plain doesn't work [it worked ONCE.. and then the rest of the times i started it up, it didn't, and it only worked once, as if i had not EOI'ed both PICs.. i'm setting byte 4 for UIE and byte 5 for AIE [In status register B], and making sure that it's not in binary mode [BOCHS complained with a >>PANIC<<].. yet neither method works.. can anyone shed some light on this situation? If you need code, just say so..
Adek336

Re:Real Time Clock

Post by Adek336 »

are you acknowledging the interrupt with reading Status C? sending 0x20 to 0xa0?

you may also want to try the periodic interrupt with 1024Hz. You could count the ticks and call another func each 1024 ticks.

Cheers,
Adrian
AvengerX

Re:Real Time Clock

Post by AvengerX »

Hmm.. i never thought of acknowledging it by reading Status C... and i'd prefer not to use the Timer IRQ0 for this [if it's what you meant..], because it's not something i particularly like, but hold on while i try the Status acknowledgement... Heh.. It worked!! Thanks!! Only the AIE though.. i'll work at getting the UIE/PIE to work.. see a rtio of intervals.. Thanks again!
Post Reply