GPS (global positioning system) is a system that uses information transmitted by 24 GPS earth satellites in the United States to provide positioning, navigation, timing and other services. Since the GPS system was opened to the world for free in 1993, it has been widely used in various industries around the world. The GPS system is widely used in navigation, geodesy, precise timing, vehicle positioning and anti-theft. This article introduces the design method of using the GPS-OEM receiving board GN-77N and AT89C52 microcontroller of Japan's Furuno Company to realize the reception and display of clock information.
1 System Hardware Interface
GN-77N is a GPS-OEM receiver board launched by Furuno Corporation of Japan. This receiver board is a parallel 8-channel receiver that can track 8 satellites at the same time. It has powerful functions such as high-precision timing, fast positioning speed, ultra-low power consumption, ultra-small size, pin-type installation, and super anti-electromagnetic interference ability. It provides users with the best solution in various applications.
1.1 GN-77N Pin Function
The pin functions and descriptions of the receiving board are shown in Table 1.
Table 1 Pin functions and descriptions of the GN-77N receiver board
Interface number |
Signal name |
Function |
illustrate |
1 |
RD1 |
Serial Input 1 |
NMEA-0183 format |
2 |
TD1 |
Serial Output 1 |
NMEA-0183 format |
3 |
GND |
land |
|
4 |
VCC |
Main power supply input |
5V±5% |
5 |
VBAK |
Backup power input |
2.5~5.5V |
6 |
1PPS |
1 second pulse output |
|
7 |
VANT |
Antenna power supply |
5V±5% |
8 |
RD2 |
Serial Input 2 |
RTCM-104 |
9 |
TD2 |
Serial Output 2 |
RTCM-104 |
1.2 AT89C52 MCU and GPS clock information display system hardware circuit
The system uses AT89C52 single-chip microcomputer, 12MHZ crystal oscillator, serial port mode 1 to receive GPS information, P1 port and P2 port and 74LS138 as 6-bit seven-segment common anode LED display interface, which can display real-time time and other GPS information data in turn. The system hardware circuit connection diagram is shown in Figure 1.
Figure 1 System hardware circuit connection diagram
2 System software interface
2.1 GN-77N module data format
In this design, the communication baud rate of GN-77N is set to 4800, 1 start bit, 8 data bits, 1 stop bit, and no parity check. The NMEA-0183 format output of serial port 1 is used. NMEA-0183 is a standard format developed by the American Marine Electronics Association for marine electronic equipment. The data code is ASCII code characters, and the format transmitted in the GPGGA sentence is:
$GPGGA,<1>,<2>,<3>,<4>,<5>,<6>,<7>,<8>,<9>,M,<10>,M,<11>,<12>*hh
$GPGGA is the start character and statement format description (this sentence is GPS positioning data), <1> is UTC time, in the format of hours, minutes, seconds.
For example: $GPGGA,104530,3105.3535,N,12207.1258,E,1,03,13.8,46.5,M,12.3,M,,*4A means that the UTC time is 10 hours 45 minutes 30 seconds, the position is 31 degrees 5.3535 minutes north latitude, 122 degrees 7.1258 minutes east longitude, ordinary GPS positioning method, 3 satellites are received, the horizontal accuracy is 13.8 meters, the antenna height is 46.5 meters above sea level, the location height is 12.3 meters above ground level, and the checksum is 4AH.
2.2 Software design of clock information display system
The system program includes the main program, data receiving subprogram, time conversion subprogram and display subprogram. Assume that the received time information is placed in the display buffer. The address of the display buffer is 60H, 61H, ..., 65H, which stores the hours, minutes, and seconds in sequence. The program is as follows:
ORG 0000H
LJMP MAIN
ORG 0030H
MAIN: MOV PSW,#00H
MOV PCON,#80H; double the baud rate 2400×2=4800BPS
MOV SCON,#50H ; Set to serial port 1 mode
MOV TMOD,#20H; T1 works in mode 2
MOV TH1,#0F4H ; Set the initial value to 2400BPS
MOV TL1,#0F4H ; Set the initial value to 2400BPS
SETB TR1 ; Start timer T1
CLR ES
CLR TI
CLR RI
LOOP: JNB RI,$
LCALL INT
LJMP LOOP
INT: LCALL INT1
LCALL RECEIVE
LCALL SETDATA
LCALL DISP
RET
INT1: LCALL SS; judge $GPGGA
XRL A,#24H
JZ INT2
LJMP INT1
INT2: LCALL SS
XRL A,#47H
JZ INT3
LJMP INT1
INT3: LCALL SS
XRL A,#50H
JZ INT4
LJMP INT1
INT4: LCALL SS
XRL A,#47H
JZ INT5
LJMP INT1
INT5: LCALL SS
XRL A,#47H
JZ INT6
LJMP INT1
INT6: LCALL SS
XRL A,#41H
JZ INT7
LJMP INT1
INT7: LCALL SS
RET
RECEIVE: LCALL SS; Time received, hours, minutes, seconds
MOV 60H,A
LCALL SS
MOV 61H,A
LCALL SS
MOV 62H,A
LCALL SS
MOV 63H,A
LCALL SS
MOV 64H,A
LCALL SS
MOV 65H,A
RET
SS: JBC RI, SS1
LJMP SS
SS1: MOV A,SBUF
RET
SETDATA: MOV A,60H ; Time conversion subroutine
…
SETH: MOV A,60H
…
ADD A,#8 ;Convert UTC time to Beijing time
MOV B,A ; if the time is greater than 24, subtract 24
SUBB A,#24
JC SETH1
LJMP SETH2
SETH1: MOV A,B
SETH2: MOV B,#10
DIV AB
ADD A,#30H ;Convert the processed characters into ASCII code
…
RET
DISP: MOV R0, #60H; Display subroutine
…
RET
3 Conclusion
Due to the development of computer technology, network technology, communication technology, GPS positioning technology and other related technologies, as well as the characteristics of all-weather, high-precision and automatic measurement of GPS technology, as an advanced measurement method and new productivity, it has been integrated into various application fields of national economic construction, national defense construction and social development. Therefore, the research and application of GPS system will greatly improve productivity and generate huge economic benefits. The clock information display system based on single-chip microcomputer and GPS introduced in this article can obtain accurate time and positioning information, provide convenience for people's daily life, and avoid the inconvenience caused by inaccurate clock. At the same time, it also opens up a better use for the application of GPS system, which has broad practical significance.
The innovation of this paper is that the accuracy of the time signal is directly related to people's daily life, industrial production and social development. The clock information display system based on single-chip microcomputer and GPS introduced in this paper can not only obtain accurate time information from the GPS navigation system, but also has the characteristics of simple hardware circuit, low cost, convenient programming and stable performance, which has certain use value. In addition, the reception and processing of latitude, longitude and other GPS information data can be realized by simply adding corresponding subroutines in the software part.
References:
[1] Wang Huinan, GPS Navigation Principles and Applications. Beijing: Science Press, 2003
[2] He Limin, Single Chip Microcomputer Application System Design. Beijing: Beijing University of Aeronautics and Astronautics Press. 1993
[3] Li Guangfei, Single-chip microcomputer control and display system of GPS positioning information, Microcomputer Information (Measurement and Control Automation), Vol. 20, No. 11, 2004
[4] Li Duo, Development of high-precision system clock using GPS receiving board, Microcomputer Information, Vol. 15, No. 4, 1999
[5] Liu Xiao et al., Design of GPS data collection system based on single chip microcomputer, Journal of Qingdao University of Science and Technology, 2006.02
Previous article:Fast Algorithm for Binary-to-Decimal Conversion of 51 Single-Chip Microcomputer Integers
Next article:Intelligent control system of "table tennis" game machine based on single chip microcomputer
Recommended ReadingLatest update time:2024-11-16 19:44
- 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
- VS1053b cannot play music
- HyperLynx High-Speed Circuit Design and Simulation (VIII) High-Speed Board-Level Simulation
- I would like to ask, for NPN tube, does the leakage current ICEO refer to the flow from C to E or from E to C?
- EE Mobile Station Development Board Introduction: DA14580DEVKT-B Evaluation Board
- No doubt! Real-time measurement can also be done with low power consumption
- Read the good book "Electronic Engineer Self-study Handbook" + Advanced Edition
- See the circuit and eat the circuit to verify the circuit
- How to multithread?
- Software and hardware design of Mitsubishi PLC based on STM32
- Analysis of the Principle of Micro-control Circuit for Plasma Color TV