GC1000 is a utility to set the PC clock from the Heath GC-1000 "Most Accurate Clock." That clock "listens" to WWV (or WWVH) for time accurate within 10ms when the "Hi Spec" LED is lit. Of course the option to output using RS-232 must be present and you must hook up the clock to the serial port of your PC (using a null modem cable). Some switches can be set as desired such as 12- or 24-hour mode, while other switches must be specifically set for this program. Other remaining switches (such as propagation delay, time zone, and DST) should be set correctly as necessary for the proper time display - and the antenna should be installed for a strong signal (i.e., the tenths of seconds digit on the clock should not be dim and the Hi Spec LED should be lit sometimes - see discussion of errorlevel below for what happens with a poor signal). Remember that the DST change in the clock occurs based on 0 UTC rather than 2 a.m. local time. The switches inside the clock should be set for one stop bit, 9600 baud, and auto (rather than normal). The year setting is not used. Pins 26 & 27 of U401 should be jumpered (no delay) rather than 26 & 28 (one second delay before transmission). The GC-1000 year switches only allows years up to 1998, and many people do not think to change the switch on January 1st. GC1000 will set the month and day, but will currently leave the year unchanged from MS-DOS. 9600 and auto are used to allow the most accurate time sets, as described below. The GC-1000 does not output hundredths of seconds, but the GC1000 program can set the time with +/-.01 second accuracy. This is possible because the auto setting and 9600 baud allow two or three reports of time within each tenth of a second (two reports during even tenths and three during odd). The GC1000 program waits for transition from even to odd tenths. No matter when the program is run, the fractional part of the second will always be set to .16, .36, .56, .76, or .96 for that reason (.06 is the amount which must be added to the report from the GC-1000). Odd tenths were chosen over even because the first one occurs closer to the actual time. To justify the .06 second added, .009 is a delay loop in the program to theoretically set at the proper millisecond, .025 can be explained by the RS-232 transmission of 24 characters to the PC, and <.001 for the code execution on the PC - the remainder is assumed to be internal to the GC-1000 (perhaps within the F8 microprocessor). To set the MS-DOS clock, simply run GC1000 from the MS-DOS prompt. This assumes COM1, but can be changed to COM2 by specifying the digit 2 as a command line parameter, i.e. GC1000 2. Input occurs without hardware interrupts. Of course it can be placed in your AUTOEXEC.BAT to set the time after each boot. For accurate results don't set time in Windows 386 Enhanced mode. A display of the time read from the clock is output to the screen (without the .06 second "correction factor"). If the clock has not yet set itself from WWV/H, the clock returns a string containing question marks so it isn't displayed. "ERRORLEVEL" return codes are: 0 for proper time set (with date), 1 (reserved for minor warning), 2 for for time set but date not because it was the last second before 12am (since 1-2 are minor warnings, a routine might check for errorlevel>2), 3 (reserved for potential off by 1hr warning during change to/from DST), 4 for time/date not set due to poor reception (time displayed with ? for tenths), 5 for time/date not available (not set yet from WWV/H), and 255 for a command line syntax error. If the clock is not attached properly to the specified serial port, the program will currently "hang" until proper connection is made (or the machine power-cycled) - this might be enhanced to return errorlevel 6 in the future. Also the PC must be an 80186 or higher - instructions are used which don't exist on 8088/86. Note: Optional parameters exist for using a clock with one-second delay and/or set to normal mode. Using these parameters reduces accuracy to around +/-.05 because the program can no longer look for the change in tenths of seconds. Time sets will occur using a computed average delay after the data is transmitted from the clock. The parameters are "D" to adjust for the one second delay, and "N" for Normal mode. The mode (auto vs. normal) doesn't really matter if your clock has one second delay, so it can be set to your preference and need not be specified on the command line. Example syntax might be "GC1000 2 D" to specify COM2 with one-second delay. Credits: The programs RighTime from Tom Becker and TimeSet from Pete Petrakis were invaluable in making this program accurate. RightTime has features to improve the PC clock resolution from ~.055 second to .01 second and to adjust for drifts in timer hardware. TimeSet uses your modem to dial NIST or USNO and set your clock (this is typically a long distance call if you aren't near Boulder CO or Washington DC, and there are a limited number of lines, hence my reason for writing GC1000). Another time setting program for GC-1000 users has been TIMESET.BAS by Ray Pichulo in '88 which uses different hardware settings and claims accuracy within about 1/2 second. For that program, U401 was set to a one second delay, the clock was set to normal (rather than auto), and it used a special cable which wired TxD from the PC to RTS of the clock. I chose a more common cable (not shared with a mouse), auto (because I was only able to obtain +/-.05 second accuracy using the normal method), and my clock came without the one second delay. Yet another GC-1000 based time setting program was RTCLOCK by Michael Conley in '91. RTCLOCK uses the more common cable and auto setting, but it seems to set the time up to 1.09 second slow. (Both TIMESET.BAS and RTCLOCK always set hundredths of seconds to 0.) Finally, thanks to David H. Ransom Jr's GC1000.BAS test program for pointing out to me that "?" is returned for tenths of seconds when that part of the clock display is dim, and GCSIM.BAS to simulate a clock with one-second delay (although I had to change word size from 8 to 7). GC1000.COM itself is by Douglas W. Hogarth of Woodinville, WA. Future enhancements to the program could include making it more user-friendly and any potential increase in accuracy based on observations or technology advances from Tom and Pete. Source code (uses MASM61) is available. Disclaimer: Although my schematic from 1990 references the U401 jumpering, I can't be sure whether such jumpering works for other clocks. I cannot be responsible for any damage that might occur if you try to change it, or for any other consequence caused by failure of this program (for example, you should verify the accuracy using other methods before switching to this program). No warranty is expressed or implied.