Mail Archives: djgpp-workers/1999/10/22/10:06:13
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 -