PC Timing

or "Why did the original PC run at 4.77 MHz, Daddy?"

The NTSC clock crystal in your PC clocks at 14318180Hz (look at the clock chips on your MB and VGA). This was divided by 3 to get the 4.77 MHz clock used by the original IBM PC. It's divided by 4 to get the 3.579545 MHz "colorburst" frequency used by CGA, and by various TV cards. And it's divided by 12 to give the 1.19318... MHz "clock" used by the timer chips.

The 1.19318... MHz signal is divided by 65,536 (64k) to give the "clock ticks" the PC uses to keep track of time of day (stored at 0040:006Ch). These occur every approximately 18.20650737... times a second.

This gives the following equivalences:
tickselapsed time
10.0549 sec
~181 sec
~10921 min
~65,5431 hr
~1,573,0421 day

The BIOS uses 1573040 ticks per day. That's 1573040 ticks = 86400 seconds. This reduces to the not particularly useful ratio of 19663 ticks = 1080 secs.

For converting ticks to seconds, you can use 65536 ticks = 3600 seconds (64k ticks = 1 hour), this is too small by about 112 parts per million, which isn't enough to worry about in most apps.

For converting seconds to ticks (why?) you can use the more accurate 16384 seconds = 298295 ticks. That's off by 25 parts per *billion*. Which will hardly ever bother you.

time
hh:mm:ss:ttsecsticks
00:00:00:0000
00:18:00:00108019663
00:36:00:00216039326
00:54:00:00324058989
00:59:59:113600-65536
01:12:00:00432078652
01:30:00:00540098315
01:48:00:006480117978
01:59:59:047200-131072
02:06:00:007560137641
02:24:00:008640157304
02:42:00:009720176967
02:59:59:1410798-196608
03:00:00:0010800196630
03:18:00:0011880216293
03:36:00:0012960235956
03:54:00:0014040255619
03:59:
04:12:00:0015120275282
04:30:00:0016200294945
04:33:04:0016384298294.9926
04:48:00:0017280314608
05:06:00:0018360334271
05:24:00:0019440353934
05:42:00:0020520373597
06:00:00:0021600393260
06:18:00:0022680412923
06:36:00:0023760432586
06:54:00:0024840452249
07:12:00:0025920471912
07:30:00:0027000491575
07:48:00:0028080511238
08:06:00:0029160530901
08:24:00:0030240550564
08:42:00:0031320570227
09:00:00:0032400589890
09:06:08:0032768596589.9852
09:18:00:0033480609553
09:36:00:0034560629216
09:54:00:0035640648879
10:12:00:0036720668542
10:30:00:0037800688205
10:48:00:0038880707868
11:06:00:0039960727531
11:24:00:0041040747194
11:42:00:0042120766857
12:00:00:0043200786520
12:18:00:0044280806183
12:36:00:0045360825846
12:54:00:0046440845509
13:12:00:0047520865172
13:30:00:0048600884835
13:39:12:0049152894884.9778
13:48:00:0049680904498
14:06:00:0050760924161
14:24:00:0051840943824
14:42:00:0052920963487
15:00:00:0054000983150
15:18:00:00550801002813
15:36:00:00561601022476
15:54:00:00572401042139
16:12:00:00583201061802
16:30:00:00594001081465
16:48:00:00604801101128
17:06:00:00615601120791
17:24:00:00626401140454
17:42:00:00637201160117
18:00:00:00648001179780
18:12:16:00655361193179.970
18:18:00:00658801199443
18:36:00:00669601219106
18:54:00:00680401238769
19:12:00:00691201258432
19:30:00:00702001278095
19:48:00:00712801297758
20:06:00:00723601317421
20:24:00:00734401337084
20:42:00:00745201356747
21:00:00:00756001376410
21:18:00:00766801396073
21:36:00:00777601415736
21:54:00:00788401435399
22:12:00:00799201455062
22:30:00:00810001474725
22:45:20:00819201491474.963
22:48:00:00820801494388
23:06:00:00831601514051
23:24:00:00842401533714
23:42:00:00853201553377
24:00:00:00864001573040

timesecticks
00:00:0000
01:00:003599.597265536
01:59:597199.1944131072
02:59:5910798.792196608
03:59:5814398.389262144
04:59:5817997.986327680
05:59:5821597.583393216
06:59:5725197.18458752
07:59:5728796.778524288
08:59:5632396.375589824
09:59:5635995.972655360
10:59:5639595.569720896
11:59:5543195.167786432
12:59:5546794.764851968
13:59:5450394.361917504
14:59:5453993.958983040
15:59:5457593.5551048576
16:59:5361193.1531114112
17:59:5364792.751179648
18:59:5268392.3471245184
19:59:5271991.9441310720
20:59:5275591.5411376256
21:59:5179191.1391441792
22:59:5182790.7361507328
23:59:5086390.3331572864
Copyright © 2005 Leonard Erickson
Contact: shadow@shadowgard.com
Revised:
URL: http://shadow.shadowgard.com/timer.html
Made with 1st Page 2000 - Professional tools for real minds. Valid HTML 4.01!