Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!well!hoptoad!gnu From: gnu@hoptoad.UUCP Newsgroups: sci.electronics Subject: Re: time of year clock chips Message-ID: <2239@hoptoad.uucp> Date: Thu, 4-Jun-87 01:45:27 EDT Article-I.D.: hoptoad.2239 Posted: Thu Jun 4 01:45:27 1987 Date-Received: Sat, 6-Jun-87 05:44:24 EDT References: <16819@amdcad.AMD.COM> <8089@utzoo.UUCP> Organization: Nebula Consultants in San Francisco Lines: 45 The Sun-2 "TOD clock" was the National Semi MM58167. It's a 24-pin chip with .001 second resolution and a very slow 8-bit bus interface. It requires at least an external 32767Hz crystal and 2 caps. Here's what Tom Lyon and Joe Skudlarek had to say about it in "All the Chips that Fit": "Another problem in chip design is the tendency to put functionality in the chip which could be done just as well, or better, in the software driving the chip. In fact, users must sometimes program around incomplete solutions to create the required complete solution; this adds to the complexity of the code, costing in development time, and execution time and space. An example here is the National Semiconductor MM58167 Time Of Year Clock. This is a low power clock used to keep the system time when the system is powered off. The chip is apparently designed to appeal to users of microprocessors which can't do division and multiplication, for the chip keeps the time in separate registers for the month (no year), day, hour, minute, second, etc., rather than just providing a counter which counts at a known rate. In addition, each register is kept in BCD format, which makes displaying the time very easy. Unfortunately, UNIX doesn't want to display the time, it just wants something from which to set its 32 bit counter of seconds since Jan. 1 1970, GMT. 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. 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." As Henry mentioned, the Sun-3 system clock is the Intersil 7170. As I recall, there were some problems with the early Intersil 7170's used in prototyping the Sun-3. The switch to battery backup was not painless. This may have been fixed in future chips, or it may be that they didn't document how to wire it up well enough. Check it twice! 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. -- Copyright 1987 John Gilmore; you may redistribute only if your recipients may. (This is an effort to bend Stargate to work with Usenet, not against it.) {sun,ptsfa,lll-crg,ihnp4,ucbvax}!hoptoad!gnu gnu@ingres.berkeley.edu