Initial import from FreeBSD RELENG_4:
[games.git] / contrib / ntp / html / pps.htm
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
2 <html>
3 <head>
4 <meta name="generator" content="HTML Tidy, see www.w3.org">
5 <title>Pulse-per-second (PPS) Signal Interfacing</title>
6 </head>
7 <body>
8 <h3>Pulse-per-second (PPS) Signal Interfacing</h3>
9
10 <img align="left" src="pic/alice32.gif" alt="gif"><a href=
11 "http://www.eecis.udel.edu/~mills/pictures.htm">from <i>Alice's
12 Adventures in Wonderland</i>, Lewis Carroll</a> 
13
14 <p>Alice is trying to find the PPS signal connector.<br clear=
15 "left">
16 </p>
17
18 <hr>
19 <p>Some radio clocks and related timekeeping gear have a
20 pulse-per-second (PPS) signal that can be used to discipline the
21 local clock oscillator to a high degree of precision, typically to
22 the order less than 10 <font face="Symbol">m</font>s in time and
23 0.01 parts-per-million (PPM) in frequency. The PPS signal can be
24 connected in either of two ways: via the data carrier detector
25 (DCD) pin of a serial port or via the acknowledge (ACK) pin of a
26 parallel port, depending on the hardware and operating system.
27 Connection via a serial port may require signal conversion and
28 regeneration to RS232 levels, which can be done using a circuit
29 such as described in the <a href="gadget.htm">Gadget Box PPS Level
30 Converter and CHU Modem</a> page. Note that NTP no longer supports
31 connection via the data leads of a serial port.</p>
32
33 <p>Both the serial and parallel port connection require operating
34 system support, which is available in only a few operating systems,
35 including Linux, FreeBSD and latest Solaris beginning with 2.7.
36 Support on an experimental basis is available for several older
37 systems, including SunOS, Digital Ultrix and HP-UX, and in current
38 Digital Tru64 (Alpha). The PPS application program interface
39 defined in RFC-2783 (PPSAPI) is the only interface currently
40 supported. Older PPS interfaces based on the <tt>ppsclock</tt> and
41 <tt>tty_clk</tt> streams modules are no longer supported. As the
42 PPSAPI is expected to become an IETF cross-platform standard, it
43 should be used by new applications.</p>
44
45 <p>The PPSAPI inerface requires a <tt>
46 /usr/include/sys/ppstime.h</tt> header file. This file is included
47 in Linux and FreeBSD distributions, but not in other distributions
48 or standard workstation products at this time. Header files for
49 other systems, including Solaris, can be found in the <tt>
50 nanokernel.tar.gz</tt> distribution, which can be found via the
51 Collaboration Resources link at www.ntp.org. The top level
52 directory contains a number of subdirectories for each
53 architecture, including Solaris. The <tt>ppstime.h</tt> file for
54 each architecture can be found in the subdirectory of the same
55 name.</p>
56
57 <p>In the preferred mode of operation, PPS signals are processed by
58 the <a href="driver22.htm">PPS Clock Discipline</a> driver and
59 other clock drivers which might be involved need not know or care
60 about them. In some cases where there is no other driver, time
61 might be obtained from remote NTP servers via the network and local
62 PPS signals, for instance from a calibrated cesium oscillator, used
63 to stabilize the frequency and remove network jitter. Note that the
64 <tt>pps</tt> configuration command has been obsoleted by this
65 driver.</p>
66
67 <p>The PPS driver operates in conjunction with a preferred peer, as
68 described in the <a href="prefer.htm">Mitigation Rules and the <tt>
69 prefer</tt> Keyword</a> page. One of the drivers described in the
70 <a href="refclock.htm">Reference Clock Drivers</a> page or another
71 NTP server furnishes the coarse timing and disambiguates the
72 seconds numbering of the PPS signal itself. The NTP daemon
73 mitigates between the clock driver or NTP server and the PPS driver
74 as described in that page in order to provide the most accurate
75 time, while respecting the various types of equipment failures that
76 could happen.</p>
77
78 <p>Some Unix system kernels support a PPS signal directly, as
79 described in the <a href="kern.htm">A Kernel Model for Precision
80 Timekeeping</a> page. Specifically, the PPS driver can be used to
81 direct the PPS signal to the kernel for use as a discipline source
82 for both time and frequency. The presence of the kernel support is
83 automatically detected during the NTP build process and supporting
84 code automatically compiled. Note that the PPS driver does not
85 normally enable the PPS kernel code, since performance is generally
86 better without it. However, this code can be enabled by a driver
87 fudge flag if necessary.</p>
88
89 <p>Some configurations may include multiple radio clocks with
90 individual PPS outputs. In some PPSAPI designs multiple PPS signals
91 can be connected to multiple instances of the PPS driver. In such
92 cases the NTP mitigation and grooming algorithms operate with all
93 the radio timecodes and PPS signals to develop the highest degree
94 of redundancy and survivability.</p>
95
96 <hr>
97 <a href="index.htm"><img align="left" src="pic/home.gif" alt=
98 "gif"></a><br>
99 <br>
100  
101
102 <address><a href="mailto:mills@udel.edu">David L. Mills
103 &lt;mills@udel.edu&gt;</a></address>
104 </body>
105 </html>
106