Date: Fri, 22 Oct 1999 08:40:14 -0500 From: Eric Rudd Subject: Re: new uclock.c (with Windows VTD.VXD support) To: djgpp-workers AT delorie DOT com Cc: Eli Zaretskii Message-id: <3810693E.57B486B3@cyberoptics.com> Organization: CyberOptics MIME-version: 1.0 X-Mailer: Mozilla 4.08 [en] (Win95; U) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit 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