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:
① Mobile communication network GSM short message mode. 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 dispersed data transmission in industry, commerce and many other fields, such as vehicle dispatching management in logistics systems, transmission of parking lot and traffic monitoring data, POS networking in financial systems, data collection in weather stations, and distributed telemetry and remote control systems for electricity, hydrology, heating, gas supply and water supply.
This article discusses the use of 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.
1 System Configuration
The entire information transmission management system consists of mobile terminals, CDMA networks, Internet, and information management center servers.
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.
2 Mobile Terminal Hardware Composition
The hardware of the mobile terminal mainly consists of four parts: CDMA Modem module, GPS module, MCU and power supply.
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 essential functional components are adopted:
First of all, there are two hardware serial ports. The baud rates of these two serial ports are independent and do not occupy the chip timer, so they are 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 and 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 of Flash can meet the requirements of larger programs.
The combination of 64 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 brought out and isolated by optocouplers and then led to other monitoring points, so that the corresponding functions can be expanded.
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, it was considered that the mobile terminal is mainly used for vehicle-mounted applications, so a power supply circuit that draws power from the cigarette lighter was designed in the actual circuit.
The mobile terminal is controlled by the C8051F020 chip, without the need to expand the serial port, ROM and RAM. 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 become very simple.
3 Mobile Terminal Software Design
Since C8051F020 is used as the controller, the hardware operation 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, there are two ways for the MCU 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.
(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 the MCU. The C8051 MCU has quite 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".
Previous article:Summary of knowledge on communication between 51 MCU and PC
Next article:8051 MCU Tutorial Lesson 4: The First Small Program
Recommended ReadingLatest update time:2024-11-16 19:39
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
- 【Showing goods】The fourth wave
- TI CC2640R2F already supports AOA, do you want to try it out?
- Emergency help--Drive material preparation, manufacturing process, and operation process knowledge
- Summary of Verilog non-synthesizable statements...
- Initialization operations required for C51 microcontroller to output printf
- [Exploration of RTOS and Linux controller cycloneDDS communication and encryption protection] A preliminary study of AC6 development environment
- How to achieve low power consumption when porting a program from MSP430FR4133 to MSP430FR6972?
- The latest proteus 8.9sp2
- Bidirectional 400V-12V DC/DC Converter Reference Design
- 6G is on the way, what is the terahertz technology behind it?