1 Introduction
Embedded systems are application-centric, computer technology-based, customizable hardware and software, and special computer systems that have strict requirements on functionality, reliability, cost, size, power consumption, etc. The use of embedded systems not only greatly improves stability, but also modularizes applications, greatly improving program readability, scalability, and portability [1].
The Global Positioning System (GPS) is a new generation of satellite navigation and positioning system that can provide all-round real-time three-dimensional navigation and positioning at sea, on land and in the air. It has the characteristics of all-weather, high precision and high efficiency. GPS has been widely used in various fields[2].
This paper uses the embedded operating system μC/OS-II to control the OEM board to receive navigation information, and proposes a detailed design plan for the hardware and software of the GPS data acquisition system, and gives an algorithm for extracting GPS feature data. These are practical for studying embedded system applications, GPS positioning and its application in integrated navigation, and secondary development of OEM boards.
2 Overall system design
The embedded GPS data acquisition system consists of a receiving part (OEM board), a level conversion part (MAX232), a control part, and a display part. The hardware structure is shown in Figure 1.
The OEM board receives navigation data from the GPS through the antenna and sends it to the EP7312 after level conversion. The EP7312 receives the navigation data from the OEM board.
The data is stored and displayed. EP7312 and OEM board use asynchronous serial communication, the frame format is 1 start bit, 8 data bits, 1 stop bit, no check bit, and the baud rate is 9600 bit.s-1. EP7312 is controlled by software to process GPS signals in real time to obtain the current longitude, latitude and other required information, and display it on the LCD.
3 System Hardware Configuration
3.1 Receiver Module
The GPS-OEM board is mainly composed of a frequency converter, a frequency standard, a signal channel, a microprocessor and a storage unit. After the initial self-test is completed after power-on, it will automatically receive the GPS radio frequency signal from the antenna, and after a series of processing such as frequency conversion, amplification, correlation, and mixing, it will complete the continuous tracking of several satellites with the best geometric position within its field of view through the parallel channel, and measure the propagation time of the signal from the satellite to the receiving antenna, interpret the navigation message sent by the GPS satellite, and finally output serial data through the I/O port. These data mainly provide positioning information to users, including latitude, longitude, speed, time, etc.
The Jupiter TU30-D410-031 used in the receiving part of the system is a parallel 12-channel OEM board produced by Rockwell, USA. This OEM board has the characteristics of small size, short timing time, no static drift, etc. It can provide position, speed, time, positioning and navigation information, with carrier phase output, 1PPS time scale and 10kHz square wave output, suitable for various navigation and positioning applications.
3.2 Control Module
The system uses Cirrus Logic's 32-bit embedded processor EP7312. This ARM processor has an 8K cache and supports Thumb instructions. EP7312 is resource-rich and powerful, with 27 general-purpose I/Os, 2 UARTs, 2 timers, and an LCD controller that can directly connect to monochrome and color LCDs. EP7312 has very low power consumption, with a maximum of no more than 90mW.
The GPS application system composed of EP7312 has the characteristics of low power consumption, small size and flexible use. The structure and functions of the system can be personalized according to different needs, and the system peripherals can be easily expanded.
3.3 Display Module
The liquid crystal display used in this system is a color LCD from SHARP, with an effective display dot matrix of 320×240, low power consumption, strong anti-interference ability and small size. Since EP7312 has an internal LCD controller, when the system receives the navigation data information output by the OEM board, it can control the LCD by setting the register of its internal controller, and then output the received and processed navigation information to the Frame Buffer, and then the display screen can display the precise longitude, latitude and local time of the positioning point.
4 System Software Design and Implementation
4.1 Introduction to μC/OS-II
μC/OS-II is an open source real-time embedded operating system. Most of the code is written in C. It is highly portable and can be widely used on various hardware platforms [3]. μC/OS-II is a preemptive real-time system. When a high-priority task is ready, the original task will be interrupted and transferred to a higher-priority task. This is also an important guarantee of real-time performance. For specific porting of μC/OS-II, please refer to other materials.
4.2 Application Design
According to the design requirements, the system divides the application into two tasks: collection and storage and display, with priorities of 10 and 11 respectively. The main function of the collection and storage task is to collect navigation data and store it as a historical record every 30 seconds for comparison with the current navigation information. First of all, the communication protocol of the system must be mastered. The GPS-OEM board adopts the NMEA-0183 communication standard format and can output a variety of sentence patterns, all starting with "$". The output statement is in accordance with the serial communication protocol, with a baud rate of 9600bit.s-1, 1 start bit, 8 data bits, 1 stop bit, and no parity check. The output data uses ASCⅡ code characters, and the content includes information such as latitude, longitude, speed, date, heading and satellite status. There are more than ten kinds of statements, and the statements used in this system are limited to $GPRMC positioning data statements. Its structure is:
$GPRMC,<1>,<2>,<3>,<4>,<5>,
<6>,<7>,<8>,<9>,<10>,<11>*hh
Among them, "GP" is the conversation identifier; "RMC" is the statement identifier; "*" is the checksum identifier; "hh" is the checksum, which represents the bitwise XOR value of all characters between "$" and "*" (excluding these two characters).
The contents of the $GPRMC statement data area are:
<1> The coordinated universal time (UTC) of the positioning point, in hhmmss (hour, minute, second) format;
<2> Positioning status, A = valid positioning, V = invalid positioning;
<3> Latitude of positioning point, in ddmm.mmmm (degrees and minutes) format;
<4> Latitude hemisphere, N (Northern Hemisphere) or S (Southern Hemisphere);
<5> Longitude of the positioning point, in dddmm.mmmmm (degrees and minutes) format;
<6> Longitude hemisphere, E (east longitude) or W (west longitude);
<7> Ground speed, 000.0 knots ~ 999.9 knots;
<8> Ground heading, 000.0 degrees ~ 359.9 degrees;
<9>UTC date, ddmmyy (day month year) format;
<
10> Magnetic declination, 000.0 degrees ~ 180 degrees;
<11> Magnetic declination direction, E (east) or W (west).
Since the baud rate of TU30-D410-031 is set to 9600bit.s-1, when the task is running, the baud rate of the serial port should be set to this value first, and EP7312 will receive the positioning data of the OEM board. After the serial port receives the information, it first determines whether it is the statement guide header "$GPRMC". If not, it abandons this reception; if yes, it receives the data content. After receiving the $GPRMC frame header, receiving 11 data packets will complete the reception of the entire frame of data. After storage, the system will call the waiting delay function.
The function of the display task is to display the collected data on the LCD, refreshing it every second. The $GPRMC statement outputs basic positioning information, which can meet the requirements of general users. The received data is stored in the memory. When extracting, the positioning status is first read from the data to determine whether it is valid. If it is valid, the corresponding time and longitude and latitude information are extracted. It should be noted that when processing Beijing time, 8 hours should be added to UTC time to obtain the accurate Beijing time. When it exceeds 24 hours, 24 hours should be subtracted. When the system is running, the GPS positioning information is displayed on the LCD as shown in Figure 2.
5 Conclusion
This paper discusses the embedded system's method of reading, processing and displaying GPS data, analyzes the information format of the GPS module and compiles communication software, successfully realizing the reception and display of GPS positioning information. The system program is simple and reliable, and can be used in the vehicle's navigation system. In addition, its method and ideas also have a good reference value for embedded system and OEM board development.
references
[1] Wang Tianmiao. Embedded System Design and Case Development[M]. Beijing: Tsinghua University Press, 2003.
[2] Wang Huinan. GPS Navigation Principles and Applications[M]. Beijing: Science Press, 2003.
[3] Jean J. Labrosse. μC/OS-II—Real-time embedded operating system with open source code[M]. Translated by Shao Beibei. Beijing: China Electric Power Press.
Previous article:Research on the design of new embedded machine vision system
Next article:A method for managing kernel threads of multi-core CPUs in Windows operating system
- 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
- Questions and answers about CCS project COFF and ELF output formats
- Request a free ZVS buck regulator evaluation sample!
- Is there anyone familiar with Trinamic TMC5160/5130/2160?
- [Shanghai Hangxin ACM32F070 development board + touch function evaluation board evaluation] MDK development environment test LCD Demo
- [Environmental Expert's Smart Watch] Part 13: Storing various data in EEPROM
- Why does Unico prompt that STEVAL-MKI197V1 is not supported? --- Solved
- Is the digital-to-analog configuration of a certain pin of STM32 related to the output? Do I need to set the output register of this pin when outputting?
- EEWORLD University ---- Microprocessor and Embedded System Design University of Electronic Science and Technology of China
- MSP430G2553 Study Notes
- [Silicon Labs BG22-EK4108A Bluetooth Development Review] Unboxing