At present, in many industries (such as public security, public transportation and banks, etc.), the GPS vehicle dispatch system has become quite popular, and the relevant research on the GPS vehicle dispatch system has also become a hot topic in the industry. This article uses a coding method for LCD Chinese display. This is the method used by the author when designing the GPS vehicle terminal communication system.
1 Problem statement
A GPS vehicle terminal mainly includes the following parts in hardware:
GPS receiving module, used to receive GPS positioning signals sent back by GPS satellites.
GSM communication module, used to realize wireless communication between the terminal module and the monitoring center.
Central control unit, which controls signal reception, short message communication and human-computer interaction.
Keyboard and display unit, used for human-computer interaction, display the commands of the monitoring center.
In the development process of the GPS vehicle terminal system, most designers will choose a cheap, low-end LCD display for comprehensive consideration of system functions and product costs. Since the GSM short message encoding method is incompatible with ordinary LCD displays, many GPS vehicle terminals do not support the display of Chinese information, which is a technical difficulty in the design.
GSM short messages are usually sent and received in PDU mode. In this mode, the module receives a string of Unicode characters. Unicode is a unified code. It is a character encoding method used on computers. It sets a unified and unique binary code for each character in different languages to meet the requirements of cross-language and cross-platform text conversion and processing. For example, when the monitoring center sends a dispatch message such as "Quickly return to the center" to the GPS vehicle terminal, the terminal will receive the Unicode string "0698 E698 1E18 06FE".
However, most LCD displays do not support this encoding. To display this information on the terminal, it must be converted to the GB code supported by the LCD, that is, the string "CBD9 BBD8 D6D0 DOC4".
To perform such a conversion, there are usually two methods:
① Find the operational relationship between the two encoding methods and convert them through formulas;
② Establish two code tables for Unicode and GB respectively, and convert them by looking up the table. However, since Unicode and GB are two independent encoding methods, there is no connection between them, and there is no operational relationship between them, so the first method is not feasible. As for the second method, it is completely feasible in theory, and it can be implemented on a PC through a high-level language function call; but for a single-chip microcomputer with extremely limited memory, it is obviously unimaginable to establish such two huge code tables. Even if a memory is added and there is enough storage space, the entry and correspondence of the code table is also a tedious task. Therefore, a practical design that can realize Chinese display is particularly important.
2 Design of the solution
In order to solve the above problems, the author has specially designed an encoding method based on the dispatch center sending GB code strings in the TEXT mode of the GSM module. The
TEXT mode (text mode) of the GSM short message is the same as the PDU mode, and it is also an interface protocol that uses AT commands to transmit data. The difference is that during the information transmission process, the network transmits ASCII internal codes such as English or numbers, so this mode is suitable for non-intelligent terminals, terminal emulators and some V. 25ter automatic calling/automatic answering application software. For example, send character A to the module, and read the SIM card content to the microcontroller memory through the AT command. The ASCII code shown in Figure 1 can be observed through the DTAE window of the Weifu simulator.
After translating the ASCII code in the memory, the following information can be obtained:
Since all GB codes are composed of uppercase English letters and numbers, both of which are ASCII internal codes, the GB code of the dispatch information can be sent to the vehicle terminal in the form of ASCII internal code characters. For example, still the short message "Quickly return to the center", the GB code of these four Chinese characters can be obtained by looking up the GB-2312 table as "CBD9 BBD8D6D0 DOC4". Send this string to the vehicle terminal, and the information received by the terminal is shown in Figure 2.
The memory unit 70H~7FH in Figure 2 stores this information. Since only a string of English and digital characters is received at this time, it must be restored to GB code to display it on the LCD (that is, the two characters are converted into a corresponding 2-bit hexadecimal number and stored in a memory unit). The above string is converted and merged, and the data stored in the memory unit starting with BOH is shown in Figure 3. [page]
In Figure 3, the GB code of the short message "Quickly return to the center" is stored in the BOH~BSH memory unit. The software implementation flow chart is shown in Figure 4. The
program for restoring to GB code is implemented as follows:
After the above process, the GB code of the four words "Quickly return to the center" is stored in the display buffer. After these GB codes are sent to the LCD display memory DDRAM through the program, they can be displayed.
Conclusion
This paper uses some of the composition characteristics of the GB code to propose and implement a coding method for sending GB code strings. This method successfully solves the problem that the GSM short message coding method is incompatible with ordinary LCD displays, eliminates the disadvantages of many GPS vehicle terminals that do not support information, and has strong practicality.
Previous article:MCU solutions for automotive instrumentation and CAN/LIN applications
Next article:Emulation Extension Chip (EEC) Simplifies Integration of High-Speed Automotive Embedded Processors
Recommended ReadingLatest update time:2024-11-16 19:31
- Popular Resources
- Popular amplifiers
- Multi-sensor fusion in autonomous driving: a survey
- Computer Vision Applications in Autonomous Vehicles: Methods, Challenges, and Future Directions
- Multi-sensor information fusion navigation technology (Shen Qiang, Yang Chengwei)
- Global Positioning System (GPS) - Theory and Practice (Compiled by Huang Dingfa)
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
- O-RAN development trends, reference architecture, and interoperability testing
- Qorvo PAC series highly integrated motor control chips and applications
- Five skills required for RF test engineers
- 【GD32L233C-START Review】Display driver for color OLED screen
- Would you choose the popular outdoor power supply?
- Solution to severe static heating of wireless network card
- China's latest classification catalogue of medical devices (No. 104, 2017)
- What is the function of the cross connection of the five tubes in the middle of this comparator?
- Understanding of TIMERA timing interrupt of MSP430F149
- What is the difference between pyb.delay and time.sleep?