Design of Navigation Timing System Based on Low-cost STC Single-Chip Microcomputer

Publisher:码字探险Latest update time:2011-11-16 Keywords:STC12C5A Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Introduction
The embedded system has once again encountered new opportunities as it has transitioned from the isolated single-chip microcomputer era in the 20th century to the era of single-chip microcomputer and multi-science integration, and then to the current era of embedded Internet of Things. The GPS (Global Position System) time and space parameters are the national notarized engineering construction in the Internet of Things era. It provides accurate navigation, command, monitoring, timing and other services for aviation and navigation, scientific exploration, geographic measurement, transportation industry, and communication industry. This paper fully combines the STC single-chip microcomputer and Trimble's receiver to design a navigation and timing system. The system can provide real-time information such as the position and speed of the moving carrier, and can synchronously receive satellite time.
The system mainly has two functions: navigation and timing. The biggest advantage of the system is that it can display navigation information and time information through the LCD screen outdoors, and display satellite time and navigation information such as longitude, latitude, and altitude of the moving object through the upper computer human-computer interaction interface indoors. The system overcomes the shortcomings of the commonly used navigators, such as the cumbersome design, single function, and high cost utilization. On this basis, a simple, cost-effective, widely used, and easy-to-expand navigation system is designed. This provides great help for commonly used navigation and timing services.

1 System Hardware Design
1.1 Design Ideas
First, the GPS module sends GPS navigation data and satellite time to the STC microcontroller at regular intervals, and then the STC microcontroller processes the GPS navigation data and sends the data to the LCD display or PC. The structural block diagram of the navigation timing system is shown in Figure 1.

a.jpg


The core of the system is the GPS navigation module, and the processor is the STC12C5A microcontroller launched by Hongjing Technology. The GPS navigation module uses Trimble's Sierra GPS chip to receive satellite navigation information and timing services. The Sierra chip uses Trimble's unique GPS algorithm to ensure the accuracy of navigation data and the rapid locking of satellite signals. It can also effectively solve the problems of signal shielding, multipath and radio frequency interference that often occur in urban applications. STC12C5A is an enhanced 8051 core with ultra-low power consumption and super strong anti-interference characteristics, which provides great convenience for GPS navigation systems in outdoor surveys and field monitoring. The control device of this system is not complicated, nor does it require a large storage space. STC12C5A can control the entire system to save costs. In addition, STC12C5A has 2 serial ports that just meet the system requirements. The LCD display is the LMB102DDC display. The display is small, easy to control, clear, and low-cost, making it the best choice for the system.
1.2 Hardware Principle
Figure 2 is the GPS navigation circuit. The GPS navigation module provides real-time three-dimensional position and UTC time information, and sends data to the STC microcontroller through the GPS serial communication port B. The input/output levels of the GPS navigation module and the STC microcontroller are both TTL levels, so the serial ports can communicate directly. The baud rate of GPS data transmission can be 9600bps, 4800bps, or 2400bps, which can be selected at will.

b.jpg [page]

Figure 3 is the interface circuit between STC12C5A and LMB102DDC. The LMB102DDC core module has an instruction register and a data register. Its instructions are divided into basic instructions and extended instructions. The instructions are mainly used to initialize the LCD screen and realize basic control. Among them, they include screen clearing settings, display position, cursor status, display status, function settings, etc. LMB102DDC can write data to RAM and read data from RAM. Here, it mainly writes data to RAM.

c.jpg


When the navigation system works outdoors, the STC microcontroller processes the received navigation data and time information, and then outputs the navigation longitude, latitude, altitude, and satellite time through the P0 port and displays them on the LMB102DDC LCD screen. When the navigation system works indoors, the STC microcontroller sends the received navigation information to the PC through the serial port. The PC views the relevant GPS navigation data and time information through the system's host software. Since the input/output level of the PC is different from the input/output level of the STC microcontroller, a MAX232 level conversion circuit must be added when the two communicate with each other. The main reason for not choosing LCD to display navigation information for indoor work is to save costs and maintain the integrity of the system. This is also the feature that distinguishes this navigation system from other navigation systems.
Another advantage of the navigation timing system is that it can calibrate the relevant information of the navigation system through the host software. A set of the latest time data (year, month, day, hour, minute, second) and the working mode of the software system are sent to the STC microcontroller through the serial communication interface in a certain format. The STC microcontroller uses this set of data to calibrate the erroneous information and change the working mode according to the sent settings. The host computer sending settings are shown in Figure 4.

d.jpg

[page]

2 System software design
2.1 Design process
The software is the control center of the system. The system uses C language to write STC microcontroller programs in Keil uVision4 compiler. The program mainly includes receiving GPS data, processing GPS data, display control, etc. The main program flow is shown in Figure 5.

e.jpg


2.2 Control Program
After STC12C5A receives a complete set of GPS data through the serial port, the control program processes the GPS information accordingly. After processing, it is sent to the host computer through the serial port. During the whole process, two serial ports must be opened at the same time. The two serial ports of STC12C5A just meet the system requirements, and different baud rates can be set for them. The STC12C5A series of microcontrollers has expanded the RAM space by 1 KB, which is enough for this system as a temporary buffer. The system does not need to save a large amount of data. Although serial port 2 has been receiving GPS navigation data and timing data, serial port 1 is also sending data to the host computer at a higher baud rate. Finally, all data will be saved in the PC in .txt format through the host computer software. When setting the serial port interrupt priority, the control program will set the serial port interrupt for sending data to the highest priority, giving priority to serial port sending. When receiving GPS data, navigation information is received every 1 s, which will not affect the accuracy of navigation. The baud rate of the serial port for sending data is set to 115 200 bps, and the baud rate of the serial port for receiving GPS data is set to 9 600 bps. The initialization program code of the two serial ports is as follows:
f.jpg
The data processing part mainly determines whether the data sent by GPS to the STC microcontroller is valid. When the data is valid, the longitude, latitude, altitude, satellite date, and time information are extracted and saved in the character array. After the data is saved, it is determined whether the data is sent to the LCD display for display or sent to the host computer software for display through the serial port. The display modes include LCD display and host computer software display, and the default mode is LCD display. If the host computer interface needs to be in display mode, first set the "Display Mode" to 1 through the "Send Settings" dialog box in the host computer software, and then send it to the STC microcontroller.

[page]

3 Upper computer software design
The entire upper computer adopts a structured and modular design method. The upper computer software is designed based on the MFC application of the dialog box, which mainly includes the serial communication module, the navigation data and time display module, the working mode setting module, and the timing module. The function of the timing module is to synchronize the PC time with the satellite to ensure the accuracy of the PC time. The PC connected to the system can be used as a timing host to send time to other units.
The serial communication module is written using the serial communication MSComm control provided by Microsoft. After adding the MSComm control, the control must be initialized first, and then the serial port is opened to prepare to receive characters bit by bit. The main program code of the serial communication module is as follows:
g.jpg
The display module is to separate the received characters after the serial port receives the characters and display them on the software interface accordingly. The display effect of the upper computer software is shown in Figure 6.

h.jpg



4 Test results
After debugging, the system finally sends the navigation information to the host computer software, and the display result is shown in Figure 6. The time on the software interface is the Beijing time obtained by adding 8 to the UTC time obtained from the satellite. The longitude, latitude and altitude of the GPS data are the information of the navigation point. The number of satellites is the number of satellites currently searched, and the working modes are GPS mode and Beidou mode. The storage setting of the software is to store the complete data sent by the device end; the host computer sending setting interface is shown in Figure 4. It is mainly to set the display mode and calibrate the current data information of the device. Through testing, the whole system runs well and achieves the expected effect.

Conclusion
This paper designs a low-power, low-cost, multi-functional navigation and timing system based on STC single-chip microcomputer design. It mainly expounds the hardware design principle, main module circuit and software design process of the whole system, and gives a detailed introduction to the host computer software supporting the system. The system can be operated outdoors and indoors through testing, which provides great help for industries and timing systems that require navigation services.

Keywords:STC12C5A Reference address:Design of Navigation Timing System Based on Low-cost STC Single-Chip Microcomputer

Previous article:Industrial frequency meter based on Sunplus 16-bit microcontroller
Next article:Design of intelligent vehicle control system based on single chip microcomputer

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号