introduction
At present, there are three main ways of mobile wireless data transmission: GSM short message, GPRS and CDMA. Their characteristics are compared as follows: ① GSM short message method of mobile communication network. Short message is one of the telecommunications services of GSM network. The so-called short message refers to a text message with a length of no more than 160 characters. Since short message transmission uses signaling channel and adopts the storage and forwarding method, the short message service fee is low and the transmission delay is not fixed, which depends on the current short message service usage. The disadvantages of the short message method are low data transmission rate, delay and uncertain time.
② GPRS (General Packet Radio Service) is a new data bearer service developed on the existing GSM system. GPRS uses packet switching technology, charges based on traffic, and efficiently transmits high-speed or low-speed data and signaling. The theoretical transmission rate of GPRS can reach 171.2 kbps, and the actual transmission rate is about 40 kbps. China Mobile officially started commercial use of the GPRS network on May 18, 2002.
③ CDMA 1X originally refers to the first phase of CDMA 2000, which can support 308 kbps data transmission, introduce packet switching in the network part, and support mobile IP services; CDMA 1X is a new bearer service developed on the CDMA IS95 system, with the purpose of providing CDMA users with packet data services; CDMA 1X theoretical transmission rate can reach 300 kbps, and the current actual transmission rate is about 100 kbps, which can be used for Internet connection, data transmission and other applications. The characteristic of CDMA 1X wireless data communication system is that it charges according to traffic, that is, it is always online and charges according to the number of data packets received and sent. No charge is charged when there is no data traffic.
The first generation of mobile communication systems is analog and has been phased out. The second generation of mobile communication systems is digital cellular, such as TDMA's GSM and CDMA's IS95. GPRS and CDMA 1X are both 2.5 generation mobile communication systems. China Unicom already has a nationwide CDMA2000 1X network for providing 1X data packet services.
Although both CDMA 1X and GPRS are 2.5G mobile communication systems, the 1X network has a much higher communication speed than the GPRS network and is easy to smoothly transition to the 3G mobile communication system. Although there are several modes of the future 3G mobile communication system, they are all CDMA code division multiple access without exception.
CDMA wireless DDN (Digital Data Network) is particularly suitable for mobile data transmission and multi-point distributed data transmission in industry, commerce and many other fields, such as vehicle dispatch management in logistics systems, transmission of parking lot and traffic monitoring data, POS networking in financial systems, data collection in meteorological stations, distributed telemetry and remote control systems for electricity, hydrology, heating, gas supply and water supply, etc. This article discusses the example of using CDMA services to transmit GPS positioning information. Of course, GPS positioning information is only one application of the entire information transmission management system. By replacing different data source modules, different information transmission can be achieved, thus forming different information transmission management systems, such as remote meter reading systems, hydrological data collection systems, etc. [b]1 System composition[/b]
As shown in Figure 1, the entire information transmission management system consists of mobile terminals, CDMA network, Internet, and information management center server.
The mobile terminal groups the GPS data into CDMA data packets and uploads them to the information management center server through the CDMA network and the Internet. The server should have an IP address and an electronic map.
The information management center can also send various instructions to mobile terminals through the Internet and CDMA network.
Figure 1 Wireless mobile data transmission system based on CDMA 2 Mobile terminal hardware composition The hardware of the mobile terminal mainly includes four parts: CDMA Modem module, GPS module, MCU and power supply. The connection relationship is shown in Figure 2.
Figure 2 Mobile terminal hardware composition
The CDMA module is ME45 from Wavcom. This is a fully functional CDMA mobile communication module. The serial port can be used to control and transmit data, including text messages and wireless Internet access. In addition, the analog circuit can be added to realize voice communication function. ME45 is controlled by AT commands.
The GPS module is the GM82 OEM board from Taiwan Holux Company. It receives GPS signals through an external antenna, calculates the geographical information of the location, and transmits this information to the MCU through the serial port.
The MCU uses the C8051F020 eight-bit microcontroller represented by Xinhualong Company. This MCU was selected based on many considerations: first, it is powerful and includes almost all common functions in a single chip; second, it has the same core as the ordinary 8051, is easy to develop, and supports C language source program debugging.
In this mobile terminal, the following necessary functional components are used: First, its two hardware serial ports. The baud rate generation of these two serial ports is independent, and does not occupy the chip timer, which is quite flexible to use. These two serial ports communicate with the GPS module and the CDMA module respectively. The GPS module sends the location information from the serial port in a fixed format. The MCU receives the data sent by the GPS module, parses out the useful data, encapsulates it, and then sends it to the CDMA module through the second serial port in the specified format, and sends the data to the Internet.
Secondly, the 128-byte Flash can be used to store some configurable parameters, such as the identification number or IP address of the mobile terminal, the IP address of the information management center server, etc.
Again, 4 KB of SRAM is quite large compared to other 8-bit machines and can meet the requirements of framing and data buffering.
64 KB Flash can meet the requirements of larger program size.
The combination of 4 KB Flash and 4 KB RAM can complete the encryption and decryption of information data and can be used in certain specific occasions. Some I/O ports are led out and isolated by photoelectric couplers and then led to other monitoring points to expand the corresponding functions.
In addition, a bus expansion port is reserved to expand 64 KB of SRAM, which can be used to embed a real-time operating system on the one hand, and to remotely update the program using the online self-programming function of C8051F020 on the other hand.
Since it is used in mobile devices, low-power devices are required, and the C8051F020 operates at 3.3 V and consumes very little power.
During the design, the mobile terminal was mainly used as a vehicle-mounted application, so a power supply circuit that draws power from the cigarette lighter was designed in the actual circuit. The mobile terminal is implemented using the C8051F020 chip control, without the need to expand the serial port, ROM and RAM separately. This hardware structure is not limited to the positioning function, but can also meet the requirements of many data acquisition/control applications by simply changing the program structure. It is precisely because of the powerful functions of C8051F020 that the hardware composition and structure have become very simple. 3 Mobile terminal software design Since C8051F020 is used as the controller, the hardware work is relatively simple and universal, so the main work of the system implementation is concentrated on the software implementation.
The main problem of using GPRS to access the Internet is to initialize and control the link when the system is connected to the wireless Internet. If you are not familiar with the communication process and protocol, it will be very troublesome to do it; now many MCUs or GPRS Modems have embedded these functions into the operating system. For CDMA Internet access, it is relatively simple, just dial the specific number of the service provider.
The CDMA module can be used for data transmission, either through Internet transmission or through short messages. The following is an introduction to the software flow of data transmission using short messages.
For the data source, the GPS module continuously sends serial data in a fixed format, and the MCU uses a serial port to connect to it. Generally, the MCU has two ways to receive and process serial port data: query and interrupt. The method used here is neither query nor interrupt, but command. The MCU performs different functions according to the different commands received. The software flow of the mobile terminal is shown in Figure 3.
Figure 3 Mobile terminal software flow
(1) MCU initialization
The initialization of the microcontroller is very important, as it determines whether the program can run correctly. The main functions here are to allocate serial port pins, set the system clock, and determine the baud rate.
The key issue to be paid attention to here is the initialization of MCU. C8051 MCU has rich hardware resources, but some of them cannot be used at the same time and need to be set during initialization, so the correct use of its cross switch decoding table is very important. The priority cross switch allocation provided in the data is different, and the key is to look at the value of the EMIFLE bit in the XBR2 special function register. Only 4 pins are used for serial port allocation, and no external memory is used, so the functions of P0.7, P0.6, and P0.5 are determined by the cross switch or port latch, and the value of EMIFLE is "0", which can ensure that the serial port allocation is not misplaced.
(2) Delete short message subroutine
The function of the short message deletion subroutine is to clear all the read short messages stored in the SIM card, but the unread short messages will not be deleted, so that the number of each new short message is "0".
(3) Read short message subroutine
The function of the short message reading subroutine is to read new messages and store the content of the short message in the internal RAM, providing a basis for the program jump. For example, if the content of the short message is "###13520479697*", it means setting the short message sending number; if you need to inquire about the vehicle status, the MCU will send a positioning signal to the user with the card number "13520479697".
The command "AT+CMGR=0" means reading the SMS numbered 0 in the SIM card. First convert the command into ASCII code and then send it serially. The CDMA module will execute the corresponding command and pass the SMS content to the microcontroller through the serial port. The receiving flag RI of the microcontroller's serial port 0 is set, indicating that a complete character has been received and the content can be taken from the serial port register. This flag cannot be automatically cleared and needs to be reset by software before receiving the next byte.
The content of the SMS has a length. The receiving stop bit is determined by setting whether the last character of the SMS content is "*". When receiving, the serial port register is judged. If the received character is "*", it means stop receiving, and the subsequent received information is invalid, and the content of SBUF0 is stored in the RAM area.
(4) Execution of short message commands
By deleting old text messages, reading new text messages, and storing the content of new text messages, the MCU retrieves the stored content, determines what function command it is, and then jumps to the corresponding function program entry to realize the service required by the user.
Here are two command examples: such as “###13520479697*” and “PLACE*”.
When receiving the first command, first check "###". If it matches, it means that the following data is the card number to be stored in the Flash. The content that needs to be saved after power failure is stored in the 128B non-volatile storage sector. After power failure, the number will not be lost. If there is a voice command and a command to query positioning information, the number stored in the Flash will be called. The second command indicates receiving positioning information. It is based on the first command. Only after the first command is executed and the card number is stored, can the positioning information be sent out. When the microcontroller detects that the content of the new text message is "PLACE*", it starts timer 4 and receives the GPS positioning signal through serial port 1. At this time, the received signal is not sent to the information center. It needs to retrieve and extract the navigation message, and finally send the useful time, longitude and latitude information to the set number.
The execution of two different command SMS messages, the functional subroutines are separate, but the front-end judgment jump program is related, so the two programs are discussed together. This program includes simultaneous operation of two serial ports, first read the new message. If the content contains "PLACE*", enter the extraction of the positioning signal. Determine whether there is "###", if so, enter the function of storing the number.
When "PLACE*" is detected, timer 4 is started first to receive the positioning information of serial port 1. Since some of the positioning information of the GPS signal is not used, the received information must be judged. If the data header is "$GPRMC", the reception starts. The reception starts with A and ends with E. It is stored in the address space starting with 0800, and finally these contents are integrated into the address space starting with 0900 and sent serially to the CDMA module, thus completing the purpose of sending the positioning information as a short message.
If more powerful network function support is required, the RTOS kernel can be embedded. Now there are many operating systems that support C8051F MCU.
Conclusion
With the development of science and technology, the application of real-time information transmission in industry, commerce and military fields is becoming more and more extensive, and the demand is increasing day by day. The launch of CDMA business has further promoted the rapid development in this direction, and the application of wireless mobile data transmission technology has an increasingly broad prospect.
References 1 Qi Yusheng, Shao Shixiang. Modern Mobile Communications. Beijing: People's Posts and Telecommunications Press, 2000 2 Pan Zhuojin, et al. C8051FXXX High-speed SOC Single Chip and Principle and Application. Beijing: Beijing University of Aeronautics and Astronautics Press, 2002 3 GM82 GPS Receiver User Guide 4 ME45 User Guide 5 C8051FXXX User Manual Song Peng: Professor, research interests include mobile data transmission, software radio, radio frequency identification, and carrier communication. Yan Fengbin: Master's student, main research interest is optical fiber communication.
Previous article:Design and precautions of voice digital system based on AT89S52 and K9F6408U0A
Next article:A digital and speech transmission controller designed with AT89S52 and EPLD chips
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- Summarize the commonly used communication interfaces of microcontrollers
- Considerations for using PMOS tube as power switch
- "Circuit Garden" by artist Kelly Heaton
- Are car RFID remote control chip keys safe?
- Common problems in debugging the TMS320C3x series?
- U.S. Power Supply Market Forecast
- Regarding GaN devices, these issues should be paid attention to!
- 【GD32E231_DIY】-02: Development environment construction and creating a new project
- TI C64X DSP interrupt vector table configuration (hardware interrupt)
- How to create a hit product of 49 yuan NB-IOT locator?