Implementation of GPS Precision Clock Based on PIC18F8520

Publisher:勾剑寒Latest update time:2012-04-10 Source: 今日电子 Keywords:PIC18F8520 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

GPS (Global Positioning System) is the most complete satellite navigation system in the world. It not only has the real-time, continuous and high-precision three-dimensional positioning capability covering the whole world, but also has the precise timing function. Using highly stable and precise satellite-borne atomic clocks as signal sources for time transmission and comparison has become an important means of obtaining time in many fields. Based on this, this paper uses the precise timing function provided by GPS and adopts single-chip microcomputer technology to realize a GPS clock, and displays the time information through LCD.

System composition and hardware implementation

1 System Configuration

The GPS clock system mainly consists of three parts: GPS receiver, single chip microcomputer and LCD display, as shown in Figure 1.

Implementation of GPS Precision Clock Based on PIC18F8520

Figure 1 GPS clock system block diagram

GPS Receiver

In this system, the GPS receiver uses Garmin's GPS15XL, which is a 12-channel GPS receiver with small size, light weight, low power consumption, short first positioning and re-capture time, strong anti-blocking and anti-interference capabilities, extremely stable and reliable performance, simple operation and easy development. It can work in the voltage range of 3.3~5.4V, and this system uses +3.3V power supply; the precision of the precision timing type can reach ±50ns (typical value); it has a serial port, the output is RS232, the input can be RS232 or TTL level with RS232 polarity, the baud rate is optional from 300 to 38 400, the default is 4800, no parity check, 8 data bits, 1 start bit, and 1 stop bit. The data output by GPS15XL is based on the NMEA0183 ASCII code interface protocol of the National Marine Electronics Association of the United States, and can output multiple sentences, including longitude, latitude, speed, azimuth, altitude, world time, ephemeris and other information. It can also output Garmin binary format information. It is very suitable for vehicle navigation, maritime navigation, power system time calibration, etc.

The configuration of GPS15XL can be implemented in the program using the microcontroller through NMEA 0183 statements, or it can be done using the SNSRCFG software. The configuration parameters will be saved in the permanent memory and will automatically take effect the next time the power is turned on. To simplify the design, this article adopts the second method, that is, to initialize the configuration of GPS15XL through the SNSRCFG software.

GPS15XL can output two time signals: one is the absolute time (year, month, day, hour, minute, second) of UTC (Coordinated Universal Time) contained in the serial port output information; the other is the synchronization pulse signal 1PPS with an interval of 1s, and the synchronization error between the pulse leading edge and UTC does not exceed 1μs. This system mainly uses the NMEA 0183 sentence output by the serial port to obtain UTC time information.

NMEA 0183 sentences start with "[an error occurred while processing the directive] rdquo; and end with , which are the ASCII characters "carriage return" (hexadecimal 0D) and "line feed" (hexadecimal 0A). The following uses the GPRMC sentence used in this article as an example to illustrate its format:

$GPRMC,<1>,<2>,<3>,<4>,<5>,<6>,<7>,<8>,<9>,<10>,<11>,<12> *hh

$GPRMC: Sentence start flag (Recommended Minimum Specific GPS/TRANSIT Data recommended positioning information)

<1> UTC time, hhmmss (hours, minutes, seconds) format

<2> Positioning status, A = valid positioning, V = invalid positioning

<9>UTC date, ddmmyy (day month year) format

The final check code *hh is used for parity check, which is usually not necessary, but is recommended when there is strong electromagnetic interference in the surrounding environment. hh represents the bitwise XOR value of all characters between " [an error occurred while processing the directive] rdquo; and "*" (excluding these two characters).

PIC18F8520

The system uses the high-performance RISC CPU PIC18F8520 produced by Microchip as the controller. It has 32KB of FLASH program memory, 2KB of SRAM data memory, and 1KB of EEPROM data memory. The operating speed can reach 10MIPS. It can work within the clock frequency range of DC to 40MHz. It has a USART interface, supports RS-485 and RS-232, and can be connected to a GPS module to obtain time information. It supports ICSP online serial programming to facilitate software upgrades and maintenance. It supports ICD, which allows online debugging and shortens the development cycle.

LCD Display

The system uses LCD1602 as the display device. LCD1602 liquid crystal display module has the advantages of small size, low power consumption, rich display content, ultra-thin and light, and is widely used in pocket instruments and low-power application systems. It can display two lines, 16 characters per line, and is powered by a single +5V power supply. The peripheral circuit configuration is simple, the price is cheap, and it has a high cost performance.

2 Hardware Circuit

The hardware circuit of the system is shown in Figure 2 and Figure 3.

Implementation of GPS Precision Clock Based on PIC18F8520

Figure 2 MCU peripheral circuit connection

Implementation of GPS Precision Clock Based on PIC18F8520

Figure 3 Connection between MCU and GPS module

Keywords:PIC18F8520 Reference address:Implementation of GPS Precision Clock Based on PIC18F8520

Previous article:Application of ICL7135 and PIC microcontroller in temperature transmitter
Next article:Advantages of PIC microcontrollers

Recommended ReadingLatest update time:2024-11-16 21:47

High Gain GPS LNA Amplifier
High Gain GPS LNA Amplifier Avago Technologies (Avago Technologies) announced the launch of the latest product in the Low Noise Amplifier (LNA) series, a high-gain low noise amplifier with variable current and shutdown functions suitable for GPS, unlicensed industrial, scientific and medical (ISM, Industrial, Scient
[Analog Electronics]
Amazon patent: Using images to determine vehicle position and direction to reduce the dependence of self-driving cars on GPS
Clearly, the future is electric and self-driving, so it’s no surprise that more and more companies are trying to capitalize on transformative ideas to secure their position in this new frontier of the auto industry. Amazon has unveiled a technology that could be useful for nearly all self-driving cars. Amazon paten
[Automotive Electronics]
Amazon patent: Using images to determine vehicle position and direction to reduce the dependence of self-driving cars on GPS
Japanese media: Beidou eclipses GPS in 165 countries
With the completion of the Beidou-3 global satellite navigation system, Beidou is catching up with the US GPS at a very fast pace and is increasingly recognized around the world. On November 25, Japan's Nikkei Asian Review published an article stating that in 165 countries around the world, China's Beidou system has
[Mobile phone portable]
Detailed analysis of receiving and decoding GPS data signals based on ARM processor
GPS, or Global Positioning System, was developed by the United States in the 1970s. It took 20 years and cost $20 billion to complete in 1994. It has the ability to conduct all-round real-time three-dimensional navigation and positioning at sea, land and air. In recent years, with the continuous improvement of GPS and
[Microcontroller]
Detailed analysis of receiving and decoding GPS data signals based on ARM processor
Design of embedded vehicle monitor based on GPS positioning
With the improvement of people's living standards, cars have gradually entered ordinary families, and the number of cars in major cities in China has increased year by year. At the same time, car theft and robbery have also become a more serious social problem. Although the application of various types of car anti-thef
[Microcontroller]
Design of embedded vehicle monitor based on GPS positioning
GPS and electronic compass combination, use C8051 to design a high-precision navigation and positioning system
  introduction   At present, satellite navigation has become the main direction of the development of navigation technology, self-service navigation continues to develop, and integrated navigation systems have become the main navigation method. In view of the problems that the electronic compass takes a long time to s
[Microcontroller]
GPS and electronic compass combination, use C8051 to design a high-precision navigation and positioning system
Design of GPS signal source based on FPGA and frequency synthesizer
The frequency synthesizer is the core component in the transmitting and receiving systems. It adopts phase negative feedback frequency control technology, has good narrowband carrier tracking performance and bandwidth modulation tracking performance, provides local oscillator signals for the system up and down conve
[Embedded]
Broadcom Launches GPS Receiver
Broadcom Corporation announced the launch of the next generation of single-chip global positioning system (GPS) solutions for mobile devices. This latest GPS receiver has the highest sensitivity and navigation performance, setting new standards in performance and low power consumption. Compared with similar solution
[Analog Electronics]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号