Clock information display system based on single chip microcomputer and GPS

Publisher:cwm6269310Latest update time:2012-01-17 Keywords:GPS Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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 where

$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

Keywords:GPS Reference address:Clock information display system based on single chip microcomputer and GPS

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

The experts give an in-depth analysis of driverless cars. What is the future of driverless cars?
Driverless cars are naturally one of the focuses of people's attention. my country has made certain achievements in driverless cars. In previous articles, the editor introduced the working principle of driverless cars and the advantages and disadvantages of driverless cars. In order to enhance everyone's understanding
[Automotive Electronics]
The experts give an in-depth analysis of driverless cars. What is the future of driverless cars?
Domestic OEM battery strategies
I want to make a series of products that will bring together the major domestic OEMs. The selection of battery strategies is reviewed in a 2.5-year cycle. First, we start with the strategies of domestic automakers (BAIC, GAC, Geely, Great Wall, Chery and three central enterprises) and new car companies, including joi
[Automotive Electronics]
Domestic OEM battery strategies
Design and implementation of GPS positioning and navigation system based on mobile GIS
Abstract: This paper analyzes the key technologies of GPS positioning and navigation system based on mobile GIS, designs a system development architecture based on Smart Client, and realizes GPS positioning and navigation on PDA electronic maps through GPS Intermediate Driver technology and embedded development met
[Security Electronics]
Design and implementation of GPS positioning and navigation system based on mobile GIS
Difficulties and solutions of GPS design technology
Causes and countermeasures of vehicle-mounted GPS signal drift problem   When the current GPS voice navigation products are tested on the road, the signal reception will more or less "drift" when the speed exceeds 40 kilometers. Zhou Yang believes this is normal, because the positioning accuracy of the existing GPS
[Analog Electronics]
Design of intelligent bus terminal based on GPS and 3G
Abstract: Aiming at the common problems of driving safety and passengers' difficulty in boarding in urban buses, a design scheme of remote monitoring system for buses based on GPS/3G technology is proposed. This scheme adopts ARM microprocessor and embedded Linux operating system, and uses digital image processing and
[Microcontroller]
Design of intelligent bus terminal based on GPS and 3G
ODM/OEM manufacturers rush into the electric vehicle market
The electric vehicle industry is seen as a new blue ocean for the ICT industry. In recent years, many ODM/OEM manufacturers have begun to actively enter electric vehicle-related businesses. In recent years, Wingtech Technology, a leading mobile phone ODM company, has expanded from ODM mobile phones, laptops to TWS h
[Automotive Electronics]
Research on the application of power angle measurement and synchronized phasor in power system based on GPS
0 Introduction The United States began to conduct aerial positioning research in the 1960s. In 1974, the global positioning system based on the GPS concept began to be officially developed. It entered the civilian field in 1985 and was officially built in 1993. Since the 1990s, high-precision timing technology b
[Test Measurement]
Research on the application of power angle measurement and synchronized phasor in power system based on GPS
Amap updates lane-level navigation, allowing users to experience the power of China's Beidou without using GPS
Recently, AutoNavi Map officially launched the HD version of lane-level navigation, which is committed to upgrading the traditional map navigation experience to a new level. Since last year, AutoNavi Map's lane-level navigation service has been launched on dozens of models such as Huawei, Xiaomi, and Honor, as well as
[Automotive Electronics]
Amap updates lane-level navigation, allowing users to experience the power of China's Beidou without using GPS
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号