I was surprised to see that the GPS receiver I'm working with has a pin reserved for outputting a 1 PPS (Pulse Per Second) signal. What is the point of this? Can't the microcontroller easily generate its own 1 PPS signal?
The 1 PPS output has a much lower jitter than anything a MCU can do. In some more demanding applications you can use that pulse can be used to time things very accurately. With some scientific grade GPS's this 1 PPS output might be accurate to better than 1 nS.
Long term the 1 Hz signal is probably the most accurate time, and so also frequency, reference that you will ever encounter.
You are effectively obtaining something like a cesium clock time reference for the cost of a GPS module. A bargain. You can buy commercial "disciplined oscillator" units and designs for DIY ones are available. A DO is not frequency locked per se but is gently kicked into lock by error signals between a 1 H signal generated by local and GPS clocks.
Standard time anywhere They say -
Ovenized Quartz Crystal Oscillators When a single (OCXO) or double (DOCXO) temperature-controlling oven is wrapped around the crystal and its oscillating circuitry, the frequency stability may be improved two to four orders of magnitude relative to that of the TCXO. Such oscillators are used in laboratory and communications grade applications and often have the means to adjust their output frequency via electronic frequency control. In this way they may be "disciplined" to match the frequency of a GPS or Loran-C reference receiver.
GPS-disciplined DOCXOs are the Stratum I Primary Reference Sources (PRS) for many of the world's wired telecommunications systems. They are also widely deployed as GPS time and frequency references for the basestations operating under the IS-95 standard for the Code Division Multiple Access (CDMA) cellular mobile phone systems originated by Qualcomm. The sheer volume of these basestation applications has profoundly affected the OCXO market by driving prices down and consolidating vendors.
Commercial module - 0.1 parts per billion per day.
@DavidKessner's answer is in line with what I'm about to say, but I wanted to elaborate, and this is a bit more than a comment.
This output could be used to, say, wake the MCU (from a deep sleep mode) once per second (to within a couple nano-seconds) in an application where you cared about the MCU doing something on a particular second, within great accuracy.
An MCU could also use this signal to calculate it's own timing accuracy and compensate for it in software. So the MCU could "measure" the pulse duration, and assume that it is a "perfect" 1s interval. In doing so it could effectively determine the time stretching or squeezing it is experiencing, say due to temperature effects on its crystal or whatever, and apply that timing factor to any measurements it is taking.
Having designed ruggedized OCXO for harsh rocket environments and tracking floating weather stations before GPS .. actually after only 1st GPS (GOES 1) was launched, it brings back fond memories.
The importance of stability depends on outages and how much error you can tolerate during outage or LOS (loss of signal) as well as capture time. When you multiply f by N by PLL divider you also multiply phase error. So care to minimize drift and phase noise is essential.
In my OCXO I chose 10MHz for the OCXO, 100KHz for the rocket's FM sub-carrier telemetry and 10KHz for the mixer ground station to track the rocket's position. The range for vehicle travel is simply the phase difference using the difference frequency and phase of the telemetry sub-carrier and the ground station at the chosen f with Δλ=c/f with Δposition=Δλ + cycle counts. The frequency error represents velocity as in radar speed. So with 1 PPS (1Hz) clock you can support a large range and time interval without cycle skips or counts on precise phase difference. Note that a cycle skip in phase error could be N cycles which means ambiguity of accumulated error.. assuming LOS error is important.
Redundancy is key for reliability if you have choice and ranking of sources from Stratum 1,2,& 3 clocks in case of outage. Telecom synchronous high speed networks depend on precise clocks as do licensed radios. Networks use intelligent error logging for ranking references of Stratum clock sources.
Of course that takes uber diligence in the design of your DO. Volumes of books on standards define these rules.
I think you need to read up on the unit you have (as some are different) but I would guess that it is to be used as a time sync. Ie you get a message saying next Pulse will come at timeInUTC.
"The GPSClock 200 has an RS-232 output that provides NMEA time codes and a PPS output signal. About a half-second before, it outputs the time of the next PPS pulse in either GPRMC or GPZDA format. Within one microsecond of the beginning of the UTC second, it brings the PPS output high for about 500 ms."
While a GPS receiver can send a complete timestamp upstream (via NMEA etc), the amount of time it'd take for the timestamp to make it way over to the host would render the timestamp inaccurate. A 1PPS signal is the GPS receiver equivalent of "at the tone the time will be twelve thirty three and 35 seconds ... [beep]". The assumption here is that the host's clock can stay accurate for 1 sec, and every second it gets a correction via the 1PPS.
I like the response from "PV Subramanian" as being to the point. This is precisely the typical purpose of 1 PPS. Provide a precise 1-second edge, to augment a full "time of day" information block received by some less accurate means (async serial line, typically).
Speaking of oscillators, it seems that in the trade of "time standards" and GPS, 10 MHz is a very popular choice. And, local oscillators in GPS receivers can roughly be split into two categories: those that result in precisely 1:10000000 ratio between the 10MHz output and PPS (phase-synchronous) and those where the PPS output exhibits step-wise adjustments (skipping/inserting ticks of the 10 MHz timebase). The "synchronous" crystal oscillators are more precise and are required for some purposes. They also require "oven control" (OCXO), which consumes some extra power. No good for battery-powered devices, excellent for stationary timekeeping use. The "skipping" oscillators are good enough for basic positioning use, and are cheaper, so this is what you get in the cheapest GPS receiver modules. As they typically lack oven control, they generally fall into the TCXO category.
For PLL control of some external crystal oscillator, the edges of 1 PPS are perhaps spaced rather far apart, you would need a pretty long integration time in the PLL servo loop. A good quality 10 MHz signal source will allow you to achieve good lock much faster. But the catch is - "good quality". See above. Other than that, 1PPS is certainly plenty good enough to discipline the system timebase of some OS or NTPd running on PC hardware.
As others have said, the 1PPS output from a GPS receiver is derived from a local crystal oscillator, ticking inside the receiver. Typically this used to be a 10 MHz crystal. This local crystal oscillator is really a VCO, allowing for small adjustments in its actual clock rate. This VCO input is used for closed-loop control (negative feedback style), where the GPS signal from a handful of satellites (combined) serves as a reference. The function block in a GPS receiver, that does the decoding of the "scrambled spaghetti" of pseudo-random bitstreams on a shared carrier, with varied signal levels and doppler shifts, this block is called a "correlator". It uses some heavy number crunching to find an optimum "solution" to the position and time "problem", based on the radio signals received, comparing them to the local timebase - and continuously evaluates a small error / deviation between the radio reception and the local crystal, which it feeds back into the crystal's VCO input... hence closed-loop control. From timing perspective, the GPS receiver's correlator is just an extremely complex PLL comparator thing :-)
Others have mentioned Symmetricom and TimeTools... Meinberg Funkuhren have a nice table of the oscillators they offer, containing all thinkable precision parameters: https://www.meinbergglobal.com/english/specs/gpsopt.htm Note that the precisions quoted are probably still conservative/pessimistic estimates.
All of the existing answers talk about precision timing applications; I just want to point out that the 1 pps signal is important for navigation, too — particularly when the receiver is moving.
It takes some time for the receiver to compute each navigation solution, and additional time to format that solution into one or more messages and transmit them over some sort of communication link (usually serially). This means that by the time the rest of the system can make use of the information, it is already "out of date" by perhaps several hundred milliseconds.
Most low-precision hobbyist applications ignore this detail, but in a precision application that might be traveling at 30 to 100 meters/second, this introduces many meters of error, making it the dominant source of total error.
The purpose of the 1 pps output is to indicate exactly when the position indicated in the navigation message(s) was valid, which allows the application software to compensate for the communication delay. This is particularly important in hybrid GPS-inertial systems, in which MEMS sensors are used to provide interpolated navigation solutions at high sample rates (hundreds of Hertz).
We use the 1PPS output generated by GPS receivers to provide very accurate time for stratum 1 NTP Network Time Servers. The 1PPS is generated at the start of each second and in the case of many receivers is accurate to within a few nanoseconds of UTC time. Some GPS receivers are not so good at providing time, since the associated serial time output can 'wander' each side of it's intended pulse output. This effectively periodically generates a one second offset.
The 1PPS output can also be used to discipline OCXO or TCXO based oscillators to provide holdover in the event of loss of GPS signals. The link below provides some more information regarding the use of GPS in time references:
1 PPM signal is used for synchronization purposes. Suppose you have two devices located at far off distance and you want to generate clock pulses in both devices which starts at exactly the same time, what can you do? This is where this 1 PPM signal is used. GPS module gives pulses at an accuracy of 1ns worldwide.