Design and implementation of GPS high precision clock

1 Overview

This article refers to the address: http://

GPS (Global Positioning System) is a navigation, positioning, and timing system established by using signals transmitted by 24 GPS satellites in the United States. The US government has promised that the GPS system will be free to the world for a long time to come. At present, GPS systems are widely used in navigation, geodetic survey, precise timing, vehicle positioning and anti-theft. Therefore, research and application of GPS systems will greatly increase productivity and generate huge economic benefits. This paper aims to design a high-precision clock system suitable for precise timing by using the precise timing function provided by GPS and using single-chip technology.

GSU-16 is a parallel 11-channel GPS OEM receiver board manufactured by KODEN. Due to its advanced semiconductor design, it has excellent features such as small size, low power consumption, stable performance and high cost performance. It can be used to develop various GPS application systems conveniently and quickly. Its main performance indicators are as follows:

Receive channel - 11 channels of parallel reception, can track 11 satellites simultaneously;
Timing accuracy - less than 400ns, no cumulative error;
Data update time - 1s;
Volume and weight - 65mm × 35mm, weighing about 40g (with lithium battery);
Data output format - NMEA-0183 v2.0; RTCM-sc104 v2.0;
Environmental working temperature - -30 ~ +75 ° C;
Normal operating parameters - voltage 5 (1 ± 0.05) V; current 100 mA; power consumption 100 mW.
2 GSU-16 hardware interface and software interface

(1) Hardware interface

The GSU-16 also provides a 12-pin interface (J3) and a 5-pin interface (J4). In this design, the 5-chain interface J4 is used, and the functions of each pin are listed in Table 1.

Table 1

Function of each pin

The RD1 pin of GSU-16 is the communication interface of RS232C, and its logic level is TTL level. This can be easily connected to various microcontrollers without level shifting. At the same time, the 12-pin interface also provides a high-precision second pulse output for measurement systems that require more precise timing services. Here, we only use its clock information, so we only need to extract it directly from the ASCII data it outputs.

(2) Software interface

The GSU-16 has a communication baud rate of 4800, 1 start bit, 8 data bits, 1 stop bit, and no parity. It is usually output in NMEA-0183 format, and the data code is ASCII characters.

NMEA-0183 is a standard format developed by the Ocean Electronics Association of the United States for marine electronic devices. V2.0 is widely used. Since the format is an ASCII code string, it is intuitive and easy to process. In many high-level languages, it can be directly discriminated and separated to extract the data required by the user.

Among the main statements of NMEA-0183, the most common formats are:

GPGGA GPS positioning data
GPGLL address location and latitude and longitude
GPZDA date and time
GPVTG azimuth to ground speed For example, GPZDA is a time and date output statement, the standard format is as follows:

standard format

In another example, $GP GGA is a positioning navigation data output statement, and its standard format is as follows:

standard format

In specific use, after receiving a message, the software can use the software to determine whether the message boot header is "$GPZDA" or "$GPGGA" to confirm whether the received message is correct or not, and then extract the world from the message. It should be noted that adding 8 hours to the extracted world is Beijing time, and the software must also process the world time from 16:00 to 24:00 to convert to the correct Beijing date and time.

3 application circuit and programming

When designing the clock system, the microcontroller we used was the general-purpose chip MC68HC908GP32 of the MC68HC08 from Motolola. The chip has been widely used for its high performance, low power consumption and low price. Its main features are:

132KB on-chip flash memory with online programmability and security;

2512B on-chip RAM;

3 enhanced serial communication port and serial peripheral interface;

4 supports C language.

The interface circuit can be designed as shown in Figure 1. The program flow is shown in Figure 2.

Interface Circuit

Procedure flow chart

The microcontroller initialization program is as follows:

4 Conclusion

The accuracy of the time signal is directly related to people's daily life, industrial production and social development. Due to the development and embarrassment of related technologies such as computer technology, network technology, communication technology, GPS positioning technology, and the reduction of the price of GPS OEM boards, it is possible to provide high-precision timing for each application field.

GPS precision clocks are mainly used in important public buildings in cities, such as stations, terminals, parks, traffic intersections, landmark buildings, and mobile and fixed-line telephones. It provides accurate public time, facilitates people's daily lives, and avoids the inconvenience caused by inaccurate clocks. At the same time, it has also developed a good use for the application of GPS systems, with a wide range of practical significance.

Curve LED Display

Curve Display,Kurve LED-Display,Curved LED Display,Outdoor Curve LED Display

Fixed LED Display Co., Ltd. , http://www.chaledlights.com