home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
private
/
mpc93mar.zip
/
SLOWCLOK.DAT
< prev
next >
Wrap
Text File
|
1993-02-16
|
3KB
|
52 lines
Why is my PC Clock Always Slow?
by Charlie Rider
Valley Computer Club
Before the AT/286, XT PC systems had to have a clock chip installed
and on system boot up that chip told the system the date and time.
All that chip had to do was keep track of the date and time and some
chips did a lot better job than others.
When the AT/286 came out it contained a new chip like a Motorola MC
14818 Real-Time Clock (RTC chip). This CMOS chip (or a functional
equivalent) provides a real-time clock, 14 bytes of clock, calendar
and control registers and some 50 bytes of general purpose RAM. The
RAM is backed by a battery so it retains the data even when the
system is shut down. The chip is capable of generating a hardware
interrupt at a program specified frequency of time.
At power-on, the BIOS power-on-self-test (POST) program verifies the
system setup information from the RTC CMOS RAM and sets the system
clock from the RTC date and time. The chip is then completely
ignored unless some software program decides to activate it for some
reason. The problem is that a lot of smart programmers have started
using the RTC to time operations within or for their programs
instead of the MS-DOS clock function.
The RTC ticks 18.2 times per second (once every 54.9 milliseconds),
so you might actually assume that that should be well above average
in accuracy good old every day clock time. In order to update the
time registers the RTC has to stop once every second (for 1,948
microseconds) and advance the second counter and as needed the
minute and hour and date counters also. When an application program
uses the RTC it disables the RTC interrupts so the application
operation won't be disturbed. When that happens the time does not
update. You probably have the same problem with the clock on your
computer controlled microwave oven, it loses time when it's telling
the oven what to do and when it's timing cooking operations. The
problem is that your super terrific computer programs keep the RTC
disabled for a considerable chunk of time while they do their
whiz-bang things.
Just keeping track and doing its own thing the RTC is going to lose
some time in the course of a year, but only a small part. The
super-duper application you've been running all day has kept the RTC
clock from updating. The DOS time function has been clicking right
along, but when you turn your system off that time is forgotten.
When you turn the system back on, the DOS time keeping function is
reset from the CMOS RTC and is now a little slow and continues to
get slower each time you turn the system off and on.