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.
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
$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.
Figure 2 MCU peripheral circuit connection
Figure 3 Connection between MCU and GPS module
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
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Mobile phone hardware R&D and design
- Low voltage MOS replaces transistor to reduce leakage current
- Research on high-speed and high-precision frequency measurement based on FPGA.docx
- EEWORLD University ---- Live playback: How to develop AI camera applications faster, simpler and at a lower cost
- Power Factor Compensation and PFC Technology
- Shanghai Semiconductor Equipment Company Recruitment: FPGA Engineer (3 years, 25-35k)
- Mixer Spurious Analysis
- High-speed PCB signal routing rules TOP9 and 12 PCB wiring skills
- UWB Ranging TOA and TDOA Detailed Explanation
- Minimizing Radiated Emissions from uk Regulators