delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/10/22/10:06:13

Date: Fri, 22 Oct 1999 08:40:14 -0500
From: Eric Rudd <rudd AT cyberoptics DOT com>
Subject: Re: new uclock.c (with Windows VTD.VXD support)
To: djgpp-workers AT delorie DOT com
Cc: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Message-id: <3810693E.57B486B3@cyberoptics.com>
Organization: CyberOptics
MIME-version: 1.0
X-Mailer: Mozilla 4.08 [en] (Win95; U)
References: <001701bf1be2$71889ac0$0201a8c0 AT center1 DOT mivlgu DOT ru>
Reply-To: djgpp-workers AT delorie DOT com

Sergey Vlasov wrote:

> /* tics = about 18.2 * 65536 (1,192,755)
>
>    actually, it's   0x1800b0 tics/day (FAQ)
>                   / 24*60*60 sec/day
>                   * 65536 utics/tic
>                   = 1,193,180 utics/sec */

I know this is not of great importance, but I can't resist setting the record
straight regarding the frequency of the 8254 timer.  It has its origins in the
original IBM PC.  In those days, it was considered important to have
compatibility with NTSC monitors, so the system clock was chosen to be 4/3 of the
NTSC subcarrier frequency (call it Fsc), and the 8254 chip ran at 1/4 of that
rate, or 1/3 Fsc.  According to the EIA RS-170A specification, Fsc is nominally
3579545 Hz.  This is an approximation of the philosophically correct frequency of
315/88 MHz. (The reason this frequency was chosen is too complicated to explain
here. See A. Bruce Carlson, "Communication Systems", 2nd ed. (McGraw-Hill, 1975)
for a more complete discussion.) Thus, the original PC ran at (4/3)*(315/88) =
105/22 MHz, and the 8254 ran (and still runs) at (315/88)/3 MHz = 105/88 MHz.
The major tick frequency is 1/2^16 of this.

Somewhere in the docs is the statement that there are 65536 ticks per hour.  This
is very close, but not quite correct, as one can verify with a calculator given
the above facts.

-Eric Rudd
rudd AT cyberoptics DOT com


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019