Introduction
The AIS system is a collision avoidance system that uses TDMA technology to exchange data in the maritime mobile VHF band. It is one of the equipment that every ship must be installed by the International Maritime Organization. Product development is based on the ITU-R M1371 protocol promulgated by the International Maritime Organization. ADSP2189M is used as its data processing platform during development to complete various data processing, conversion, time slot division, network login and maintenance and other algorithms to realize most of its main functions. The system model is shown in Figure 1.
The radio station receives the GMSK signal at the two frequencies of 161.975MHz and 162.025MHz. The GMSK modulation and demodulation chip converts the analog data into a digital signal. The data stream passes through the host computer to complete the determination of the correct data and delete the data segment. The start, fill and end bits are sent to the DSP through the parallel port. The DSP completes the processing and analysis of the received data, establishes the time slot table of the entire sea area, completes the network login and maintenance of TDMA, and then sends the relevant data to Different formats are sent to different serial port outputs. According to the ITU-R M.1371 protocol, they are connected to the network in ITDMA (Incremental Time Division Multiple Access) mode and run continuously in SOTDMA (Autonomous Time Division Multiple Access) mode to achieve TDMA of the entire network. Integrity. Therefore, the signal processing unit plays an important role in the system.
Figure 1 DSP and external device interface
ADSP2189M chip
The ADSP2189M chip is a fixed-point DSP with an instruction cycle of 13.3ns and an operating speed of up to 75MIPS. The processor includes an arithmetic/logic unit (ALU), a multiplier/accumulator (MAC), and a barrel shifter. The memory adopts Harvard structure, with 48K PRAM and 32K DRAM. Two SPORT synchronous serial ports, a timer and the host interface can be directly connected to the host processor. The DMA interface includes the internal DMA interface (IDMA) and the byte DMA interface (BDMA).
The hardware design of 2189M in the AIS system.
Part of the circuit is shown in Figure 2.
·The chip is connected to an external 33M crystal, and its internal frequency is automatically multiplied to 66M;
·A synchronous serial port SPORT is connected to the external MCU, and the pin must be connected to a pull-up resistor;
·Set SPORT1 to the second working mode, and use software to switch the I/O The O port simulates UART, connects to the MAX232 chip, and the data is sent to the simple display;
·Use IDMA mode to connect to the MCU, 16 parallel port lines are connected, the startup mode is set to IDMA mode, and its 4 MODEA~D settings are 1, 0, 1, 0;
·The steps to complete IDMA boot loading are as follows;
The four debugging pins PWD, EBR, BR, and ERSET must be connected to external pull-up resistors;
finally write the value of PM (0X0000), and the program will start to execute automatically.
Figure 2 Partial circuit diagram of the AIS system
Figure 3 Serial port receiving timing diagram
Figure 4 Time slot division diagram
The software design of the ADSP2189M interface and
the setting of Sport0
use the synchronous serial port to communicate with the MCU
DM (0X3FF6) - the serial port control register settings are shown in Table 1.
In Table 1, 0~3: receive and send word length, which we define as 16-bit word length, set to 1111. 6~7: frame synchronization signal level, 0, high level is valid. 8~9: Frame synchronization signal source, which is 1, and the frame synchronization signal is generated internally.
10~11: Framing mode, 1, second framing mode. 12~13: Frame synchronization, which is 0. A frame synchronization signal is required to initiate communication. The frame synchronization signal will no longer be considered in the future. 14: SCLK generation mode, which is 1 and the serial clock is generated internally.
DM(0X3FF5)—Serial port clock frequency division coefficient register dm(sclkdiv)
In the ADSP2189 chip, the relationship between the sampling rate and the frequency division number is as follows: F(sclk)=f(clkout)/(sclkdiv+1)/2
where , F(sclk) represents the running clock, F(clkout) represents the output clock of the external crystal oscillator, sclkdiv represents the frequency division number, that is, the value that the memory should be assigned.
After the control register is set, the serial port receiving timing is shown in Figure 3. The received data is placed in the receiving buffer area. After each set of data is received, the receiving flag bit is written once. The main program detects the flag bit regularly. When the flag is detected When the bit changes, the reception processing subroutine is called.
Settings of Sport1 and timer:
Since the DSP needs to output data to a simple display and connect through the UART port, Sport1 is set to the second working mode (as shown in Table 2).
DM(0X3FFF)—system control register (as shown in Table 3).
In Table 3, 12: SPORT0 enablement, set to 1. 11: SPORT1 enablement, set to 1. 10: SPOER1 function selection, set to 0.
Use the I/O port to simulate UART and sample at a baud rate of 9600. The internal timer interrupt generation rate is 3×9600. Three samples are generated during a level transition, and the middle sample value is valid.
DM (0X3FFD)—timing period register
DM (0X3FFC)—timing counting register
is connected to an external 33M crystal. The value stored in the register is:
period=frequence×2/(3×9600)-1=2314
The chip generates an interrupt at a baud rate of 28800. Each interrupt program detects the UART flag bit. When the flag bit changes, the I/O output is set every 3 interrupts until the end of sending data.
Part of the code settings are as follows:
ax0 = 2314; //Timer setting
dm(0x3ffc) = ax0;
dm(0x3ffd) = ax0;
ax0 = 0;
dm(0x3ffb) = ax0; //Control register setting
ax0 = b#0001100000000000 ;
ax0=b#0111111000001111;
dm(0x3ff6)=ax0; //sport0 setting
ax0=0x001f;
dm(0x3ff5)=ax0; //SCLKDIV0
mstat = 0x10; //Multiplier setting
ifc=b#0000000001100001; imask=b #0000100001; //Interrupt and enable
ena timer;
//Enable timing
The main software process
system adopts autonomous time division multiplexing, dividing time into periodic frames, and each frame is divided into a number of time slots (no matter the frames or time slots are non-overlapping), each time slot is a communication channel , assigned to a user. According to certain time slot allocation principles, the system allows each mobile station to transmit signals (burst signals) to each other only in designated time slots in each frame. Under the conditions of meeting timing and synchronization, the base station can transmit signals to each other in each time slot. Signals from each mobile station are received without interfering with each other.
Divide the space of the two channels in the register as the time slot table of the sea area, as shown in Figure 4.
Network login uses a probabilistic persistence algorithm (when a candidate time period is found, the station randomly selects a probability value LME.RTP1 between 0 and 100, and compares this value with a probability LME.RTP2 between 0 and 10. If LME.RTP1 If it is less than or equal to LME.RTP2, this time period is selected. Otherwise, LME.RTP2 plus a probability increment is compared with the next candidate time period). Randomly select an idle time slot as the access point of the network in 2250 time periods, and then access it in ITDMA mode. This method is a form of reporting first and occupying first. In the currently transmitted data, the next time slot number that needs to be sent is specified, so as to notify other stations in advance of the time slot number occupied by itself, which is determined within 60 seconds. The space required. In the subsequent continuous stages, the mobile station completes network maintenance and time slot re-division in SOTDMA mode. Since the data format stipulated in the protocol can only predict the occupancy situation for a maximum of 7 minutes, so every 7 minutes, a new idle time slot needs to be selected within a certain range for transmission, and so on, in this continuous state. Keep running.
When the speed changes, the system re-uses ITDMA to complete network login at the new speed.
Conclusion:
The design scheme proposed in this article makes full use of the high-performance data processing function of DSP and the real-time and stable characteristics of the embedded operating system, and uses a time-division multiplexing algorithm to perform network division and connection functions within a sea area. This model of combining DSP signal processing with embedded operating systems can be widely used in the field of communications and has broad application prospects.
References
1 Wu Minyuan. Principles of ADSP series digital signal processors. Electronic Industry Press
2 Su Tao. Wu Shunjun. Liao Xiaoqun. High-performance digital signal processors and high-speed real-time signal processing. Xi'an University of Electronic Science and Technology Press
Previous article:Application of ADSP2189M in the development of automatic ship identification system
Next article:Design of fingerprint identification system based on DSP
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
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
- 【AT32WB415 Review】RTC Electronic Clock
- Can anyone recommend a DCDC module with an isolation strength of more than 6000VAC?
- Design a circuit for corridor voice-controlled lights that includes a single-chip microcomputer.
- Getting Started with the ST SensorTile.box Sensor Kit (2) Getting Started Mode Experience
- FAQ_How to implement low power mode and low power wake-up function in 24G private protocol applications
- Please help. How to determine the absolute value of expert control PID adjustment?
- TI C2000 series microcontroller program stack usage
- The troubles of capacitor testers in traditional mode - Part 2
- 【GD32E231_DIY】-05: HMI program architecture
- Problem calling EPwm1Regs.TBCTR value