RTC

From OSDev.wiki
Revision as of 15:12, 13 February 2009 by osdev>Earlz
Jump to navigation Jump to search
This page is a work in progress.
This page may thus be incomplete. Its content may be changed in the near future.

Introduction

Most OSs use the PIT for timing purposes. However, I believe the RTC works just as well. RTC stands for Real Time Clock. It is the chip that keeps your computers CMOS clock up-to-date.

Programming it

The RTC is capable of multiple frequencies. However, the only one acceptable for keeping time is 1024hz. For this reason, it is strongly NOT recommended that you change the frequency of the RTC, or your computers clock will no longer be accurate. However, if you need an interrupt frequency higher than 1024hz, it is possible to reprogram just the rate of the interrupt. The RTC can handle 15 interrupt rates between 2hz and 32767 Hz, theoretically. On most machines however, the interrupt rate can not go higher than 8khz.

See Also

Periodic Interrupts with the Real Time Clock

CMOS Ram Data Register

Using the 1024 HZ Timer Interrupt