The DOS / Win / Win95 driver


The best way to handle this interface is to write a device driver but it's a hard job, so for the moment I wrote only an MS-DOS program (in Borland Pascal 7.0) that is not memory resident.
I used to launch it in an iconized DOS session under Windows 95 (works also under Windows 3.xx and, of course, MS-DOS) and once the correct time is received, the system clock is set and the program it exits. I added a link to it in the startup folder, so every time I boot my PC the clock is synchronized in a few minutes. Since only one bit per second is received the system is not overloaded. Unfortunately this solution only worked for the mentioned old operating systems and this program is not able to correctly run on modern operating systems that prevents direct hardwire access. I never found the time to re-write it for modern Windows environments.

Anyway, here are the command usage and the command line arguments:

Use:    DCF77 [ COMx | Pyyyy Izz ] [ -sync [ -ret ] ] [ -nochk ] [ -notmout ]

Where:  x         is the COM port number (1..4) of the receiver (default COM2)
        yyyy      is the I/O port number (hex) of the non-standard COM port
        zz        is the IRQ number (dec) of the non standard COM port
        -sync     sets the real time clock of the PC after having decoded
        -ret      returns to DOS after having synchronized the clock
        -nochk    skips IRQ busy checking (use carefully)
        -notmout  skips timeout checking (use when reception is difficult)
DCF77 can use a standard COM port (COM1..COM4) or a custom port by specifying the port address and the related IRQ number.
I recommend to connect the interface to a COM port that uses a free IRQ (because in most cases the IRQ is shared with the mouse or with the modem and the system may hang); modern ports allow to select any IRQ. The IRQ checking routine is not 100% sure and if it doesn't work on your system just disable it with the -nochk option.
The real time clock is usually not set. To synchronize your RTC add the -sync option.
I included the -ret parameter in order to allow the program to terminate (and free system resources) once the clock is synchronized and the -notmout option to prevent timeouts in case of poor signal reception.

Please read my disclaimer.


Home Electronics Index Previous page Next page