🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.electronics
Article #17639

Re: time of year clock chips

#17639
From: phil
Date: Thu, 04 Jun 1987 16:42
46 lines
2873 bytes
In article <2239@hoptoad.uucp> gnu@hoptoad.uucp (John Gilmore) writes:
>	An attempt to do a straightforward
>	conversion from UNIX time to chip time fails because the chip
>	has no support for leap years or daylight savings time.

I've looked at National's three clock chips and it is amusing to watch
them correct their mistakes with each later version. The first one,
58167, as you pointed out, had no leap year support. It had no idea
what the year was at all! The second, the 58174, did have a year
register and leap year support, but the year register was write only!
Finally, with the 58274, they introduced a clock chip which had both
leap year support and a read/write year register. 

As someone else has noted, you really don't want to put daylight
savings time into silicon. 

>	Ultimately, we ended up using the chip just as a bizarre
>	series of modulo counters; the amount of arithmetic to convert
>	chip time to UNIX time is disgusting."

Actually, the lack of leap years and daylight savings time would seem
to make the conversion from chip time to seconds a very
straight-forward series of multiplications and table look ups, unless
I am missing something. You would precalculate the number of seconds
in a year (although I don't know how you figure out what year it is
using the 58167 -- look at the filesystem and hope the system hasn't
been turned off more than one year?), compute the Julian day and
multiply by the number of seconds in a day, etc. 

It is sort of disgusting but I imagine the market for unix time
keeping is much less than the market for VCR clocks and microwave oven
clocks, etc. 

>The 7170 also provides a 100Hz interrupt, which is what the Sun-3 uses
>for its Unix timing, so there is no other clock chip in the Sun-3.  I
>find this a bit of a lose, since I like to time things to the
>microsecond, but only having one clock chip on the board certainly wins
>in other ways.

Could you elaborate on the hardware support you'd like to have to time
things to the microsecond? In particular, does the 29000's on-chip
clock counter seem useful? (40 nS resolution)

-- 
Bumper Snicker: If this car were a horse, it would have to be shot!
Phil Ngai, {ucbvax,decwrl,allegra}!amdcad!phil or amdcad!phil@decwrl.dec.com
Technical Details
Message-ID: <16995@amdcad.AMD.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!gatech!amdcad!phil
References: <16819@amdcad.AMD.COM> <8089@utzoo.UUCP> <2239@hoptoad.uucp>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!gatech!amdcad!phil
From: phil@amdcad.UUCP
Newsgroups: sci.electronics
Subject: Re: time of year clock chips
Message-ID: <16995@amdcad.AMD.COM>
Date: Thu, 4-Jun-87 12:42:06 EDT
Article-I.D.: amdcad.16995
Posted: Thu Jun  4 12:42:06 1987
Date-Received: Sat, 6-Jun-87 08:17:38 EDT
References: <16819@amdcad.AMD.COM> <8089@utzoo.UUCP> <2239@hoptoad.uucp>
Reply-To: phil@amdcad.UUCP (Phil Ngai)
Organization: Advanced Micro Devices, Inc., Sunnyvale, Ca.
Lines: 46