How do computers keep time?


by wil3
Tags: computers, time
wil3
wil3 is offline
#1
Dec4-10, 09:11 PM
P: 181
Is there some process by which a computer is able to keep track of time in a linear order? Ie, how can a computer determine when a fixed time increment of arbitrary length has passed?

Please don't dismiss this until you've at least thought about it a little bit. Is there a specific fixed frequency signal that serves as the basis of unit time for a computer? I was thinking it had something to do with the 60 hz signal, but that seems to irregular to give the machine a definite time interval.

This question can be generalized to digital systems of timekeeping in general. Given varying power and resistance in different conditions, what allows constant, steady timekeeping?
Phys.Org News Partner Science news on Phys.org
Review: With Galaxy S5, Samsung proves less can be more
Making graphene in your kitchen
Study casts doubt on climate benefit of biofuels from corn residue
zhermes
zhermes is offline
#2
Dec4-10, 09:55 PM
P: 1,262
Computers have internal, reliable 'oscillators' which have a known period; thus keeping track of the number of oscillations yields the time interval.
wil3
wil3 is offline
#3
Dec4-10, 10:02 PM
P: 181
Okay, that's what I was curious about: what sort of oscillator keeps time that accurately? An LC seems like it would have a little bit of R, and so the system would lose energy. Is the "oscillator" just a very high quality LC, such that time loss is negligible?

DaleSwanson
DaleSwanson is offline
#4
Dec4-10, 10:24 PM
P: 351

How do computers keep time?


Digital clocks commonly use oscillations of quartz crystals.
rcgldr
rcgldr is offline
#5
Dec5-10, 01:46 AM
HW Helper
P: 6,925
The original PC used a crystal with a frequency of 4.77272 mhz. It included an 8254 that divided this frequency by 4 so that it's channel 0 ran at 1.19318 mhz or 838.0965 nsecs / cycle. This was used to drive the dram refresh rate and also was divided by 65536 to produce the 54.9255 ms ticker, about 18.2 ticks per second in DOS mode. There was also a real time clock in a PC that ran off a battery or capicator to keep track of time when the computer is turned off.

http://www.beaglesoft.com/mainfaqclock.htm

Modern computers have this logic integrated and/or emulated in their chip sets. Windows XP defaults to a 64hz ticker rate insetad of the classic 18.2 hz ticker. I'm not sure about Vista or Windows 7. There are also other clock sources on a modern PC.
MATLABdude
MATLABdude is offline
#6
Dec8-10, 09:38 PM
Sci Advisor
P: 1,724
If you have a digital alarm clock, the heart of it is probably also a Real Time Clock (RTC, though some are fancier than others). Because the 50/60 Hz is so exacting, many older (alarm) clocks that ran off of AC power actually did use that as their time base (sometimes with, and sometimes without a switch to adjust between the two modes).

32.768 kHz crystals are very popular for time-keeping applications (and many RTCs are designed to use them). Why 32.768 kHz? If you're keeping track of 'ticks' (i.e. the oscillations), there's exactly 2^15 of them in one second, or, in binary 0b1000000000000000 (hexadecimal 0x8000). Assuming you're using it at the proper temperature, or that the crystal is temperature compensated (many are temperature sensitive).


Register to reply

Related Discussions
The jet age of computers General Discussion 39
Old Computers Computing & Technology 17
IQ with Computers Social Sciences 7
I have Computers now What? Computing & Technology 49
Do you think computers cause.... Computing & Technology 2