www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2007/01/13/18:31:48

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Rod Pemberton" <do_not_have AT bitfoad DOT cmm>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Performance enhancement for gettimeofday()?
Date: Sat, 13 Jan 2007 18:18:48 -0500
Organization: Aioe.org NNTP Server
Lines: 89
Message-ID: <eobpbn$q25$1@aioe.org>
References: <OF77475379 DOT 7BA371D5-ON8725725F DOT 00598107-8725725F DOT 0059B5ED AT seagate DOT com> <eo3b26$te5$1 AT aioe DOT org> <5t3iq2dlv4hoh2sdf9c4dbot50e6ge28mn AT 4ax DOT com>
NNTP-Posting-Host: IVw7K97ih4IohxRqyKkqFw.user.aioe.org
X-Complaints-To: abuse AT aioe DOT org
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MSMail-Priority: Normal
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Brian Inglis" <Brian DOT Inglis AT SystematicSW DOT Invalid> wrote in message
news:5t3iq2dlv4hoh2sdf9c4dbot50e6ge28mn AT 4ax DOT com...
> On Wed, 10 Jan 2007 13:25:42 -0500 in comp.os.msdos.djgpp, "Rod
> Pemberton" <do_not_have AT bitfoad DOT cmm> wrote:
>
> >
> ><Gordon DOT Schumacher AT seagate DOT com> wrote in message
>
>news:OF77475379 DOT 7BA371D5-ON8725725F DOT 00598107-8725725F DOT 0059B5ED AT seagate DOT com.
..
> >> Rod Pemberton wrote on Tue, 9 Jan 2007 at 03:46:03 -0500:
> >>
> >> # I believe this it the math you'll need:
> >> #
> >> # 14.318Mhz=4*3.58Mhz=4*(4.5Mhz*455/572)
> >> #     (4.5Mhz US TV bandwith/channel, 455 colorburst phase
changes/line,
> >> 572
> >> # total lines/frame including sync)
> >> # 14.318Mhz/12=1.93182Mhz
> >>
> >> Aha, this is the one that's why our numbers don't agree:
> >> 14.318MHz divided by 12 is actually 1.193666... MHz.
> >>
> >
> >Sorry, it appears I failed to type a 1 following the decimal.  It's not
> >14.318000MHz, but 14.318181MHz.  You really need to enter
> >4*4.5*(10^6)*455/572 to compute the 14.318MHz and work from there.  IIRC
> >('twas 25+ years ago), it's 4 times the colorburst as calculated by the
> >original engineer who designed the US color TV standard.  That way you
won't
> >loose precision.  Of course, a real crystal usually has a tolerance
range,
> >but that range is usually small compared to the frequency, like +/- 100Hz
or
> >+/-10KHz.  Of course, you could go to Mouser or another electronic
supplier,
> >and look for a crystal if you think the range would help.
> >
> >Like you, I'll use ... for repeating digits.  The 1 and 8 repeat for
both.
> >I was using more decimals but rounded/truncated.
> >
> >14.318181818181...  Mhz  / 12 = 1.193181818181... Mhz.
> >1.193181818181...Mhz / 65536 = 18.206509676846 Hz
>
> IIRC crystal frequency 157.5MHz = 9/2*7*5*1E6, /11 colour burst

A 157.5Mhz crystal in 1980's?    ROFL!

In a PC, in the 1980's?    ROFL!  (Where's the Kleenex, I've got to wipe
away the tears...)

It's possible that 157.5Mhz crystals are being used in PC's today.  It's
plausible, but I doubt it (I haven't looked lately.).  The primary factor is
cost.  For PC's, the lowest cost solution usually wins.  I know of only
three PC exceptions to that rule.  A 157.5Mhz crystal costs more than a
14.318Mhz crystal, and only provides an advantage _if_ the PC uses needs an
other clock closely related to 157.5Mhz.  With common PC bus frequencies of
66, 100, 133, 166, 200, 215, and 225Mhz, 157.5Mhz _seems_ to be a really
_odd_ frequency choice to me.

I had schematics for a few '80's PC's during the '80's: C64, Apple II, etc.
The highest frequency in the schematic was always some multiple of the
colorburst which was used by the video circuitry.  If you actually have a
real schematic showing a that 157.5Mhz crystal was in use in a 1980's era PC
of any common make (i.e., no Crays), it'd probably be worth a fortune...
Unfortunately, I wasn't actively monitoring the advancement in crystal
oscillator frequencies.  However, if you're interested, this link contains
an oscillator frequency timeline:
http://www.npcamerica.com/Datasheets/KEYNOTE2.PDF

> 14318181.8..Hz, /3 for PC clock 4772727.27..Hz, /4 for timer
> 1193181.8..Hz, /65536 for tick 18.2065096768465909..Hz, giving a period
> of 54925.4095238..us with the last six digits repeating.
>
> So the relevant factors here are 7*5*3/11/2^19.
>

Sure, except if one of those factors came from the 157.5Mhz.  As I showed,
the colorburst and the common 4*colorburst crystal are derived from the TV
baseband, created for the US color TV standard to be compatible with US
Black & White (BW) TV's, i.e., not from 157.5Mhz.


Rod Pemberton


- Raw text -


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