An embedded system is a combination of computer software and hardware with a specific function or purpose, or refers to a special computer system that is loaded into another device and controls the device. The biggest feature of an embedded system is its purpose and pertinence, that is, each The development of a set of embedded systems has its special applications and specific functions. The embedded system consists of hardware and software.

Author: Long Guangli

An embedded system is a combination of computer software and hardware with a specific function or purpose, or refers to a special computer system that is loaded into another device and controls the device. The biggest feature of an embedded system is its purpose and pertinence, that is, each The development of a set of embedded systems has its special applications and specific functions. The embedded system consists of hardware and software. The hardware architecture is centered on the embedded processor, and configures memory, I/O devices, communication modules, etc.; the software part takes the software development platform as the core, provides application programming interface API upward, and shields the board-level support package BSP of specific hardware characteristics downward. . In an embedded system, software and hardware work closely together, work in coordination, and work together to complete the predetermined functions of the system.

Spread spectrum communication is one of the high-tech hotspots in the world today, and its theoretical basis is Shannon’s (C.E.Shannon) channel capacity formula. This formula shows that in a Gaussian channel, when the signal-to-noise power ratio SNR of the transmission system decreases, the channel capacity C can be kept constant by increasing the transmission bandwidth W of the system; for any given signal-to-noise power ratio, the increase Large transmission bandwidth to obtain lower information error rate. Spread spectrum technology utilizes this principle to achieve the purpose of expanding the bandwidth of digital information to be transmitted by using high-speed spreading codes. The bandwidth of the spread spectrum communication system is several hundred times to several thousand times larger than that of the conventional communication system, so under the condition of the same signal-to-noise ratio, it has strong anti-noise interference ability.

1 Hardware design of digital spread spectrum transceiver based on embedded system

The block diagram of the designed digital spread spectrum transceiver based on the embedded system is shown in Figure 1.

Design of Spread Spectrum Communication System Based on S3C2410X Microprocessor

The digital spread spectrum transceiver is dual channel (only a single channel is shown in the figure). The channel is composed of voice codec circuit, embedded microprocessor, level conversion circuit, voice data spread spectrum despread modulation and demodulation circuit, latch and control signal generation circuit, external memory and radio frequency unit circuit.

The speech codec circuit adopts the low-power stereo audio codec chip UDAl344TS produced by PHLIPS semiconductor. 3. The chip. OV power supply, can work in L3 microcontroller mode, can also work in static pin operation mode, through the mode control pins MCl (8 feet), MC2 (21 feet) set to static pin operation mode (both high level), in this mode, the controllable features are system clock selection, data input/output format setting, subwoofer and mute control and ADC control, these features are controlled by pins MP1 (9 pins), MP2 (13 pins) pin), MP3 (14 pins), MP4 (15 pins), MP5 (20 pins) control.

The embedded microprocessor selects the microprocessor S3C2410X based on ARlM920T core with low power consumption and high integration designed by SAMSUNG Company for the handheld device. The processor integrates 16 KB instruction and 16 KB data cache, MMU, external memory controller, LCD controller, NAND FLASH controller, 4 DMA channels, 3 UART channels, 1 I2C bus controller, 1 I2S Bus controller, 4 PWM timers and an internal timer, general I/O port, real-time clock, 8-channel 10-bit ADC and touch screen interface, USB master/slave interface, SD/MMC card interface, etc.

The voice data spread spectrum despread modulation and demodulation circuit selects the programmable monolithic direct sequence spread spectrum transceiver chip Z87200 developed by Zilog Company. The chip includes a sending part, a receiving part and a control part, and integrates each part of the main circuit of the spread spectrum communication transceiver into a chip with 100 pins. The sending part includes whitening processing, serial-to-parallel conversion, differential coding, PN code generation, spectrum spreading, QPSK/BPSK modulation and timing control of sending data, and completes spectrum spreading and modulation processing from data input to modulated IF signal output. The receiving part includes digital down-conversion from intermediate frequency to baseband, PN code generation, digital matched filtering, despreading, correlation peak detection, differential demodulation, parallel-serial conversion, de-whitening processing, numerical control oscillator and bit timing processing, etc. The whole process of demodulation, demodulation and spread processing from intermediate frequency signal input to data output. In addition, Z87200 also sets 86 B on-chip registers, which are used to program the function of the chip, which makes the setting of the spread spectrum system flexible. Programming control of internal registers.

The level conversion circuit adopts the bidirectional 8-channel level conversion chip MAX3001E of MAXIM Company. Because the working voltage of the embedded microprocessor S3C2410X is usually 3.3 V, and the working voltage of the direct-sequence spread spectrum transceiver Z87200 is usually 5 V, multiple MAX3001Es can be used to connect these two chips to realize between them. Logic level translation.

The latch and control signal generation circuit adopts 74LV373 latch and complex programmable logic device EPM7128SLC84-15. When reading and writing data to the direct sequence spread spectrum transceiver Z87200 through the interface control unit, in order to ensure the stability of the data, the 74LV373 latch is used to latch the data to be read and written, and then the data read and write is completed. EPM7128SLC84-15 is a MAX7000S series CPLD device produced by ALTERA Company. It uses VHDL programming to design an 8-bit synchronous shift register and a 9-bit synchronous counter. Compile and simulate on the Max +PlusⅡ development platform and download it on the CPLD device EPM7128SLC84-15. Since the direct-sequence spread spectrum transceiver Z87200 is set to the burst mode, in order to facilitate data processing, the length of the burst block can be set to 8 symbols/frame, and a 9-bit counter and an 8-bit shift register are used together. The 8-bit voice data that is really needed can be obtained at this time.

The radio frequency unit adopts the PTR8000 (with nRF905 as the data wireless transmission chip) high-performance embedded wireless module of Beijing Xuntong Technology Company. 868/915 MHz, operating voltage between 1.9 and 3.6 V, maximum transmit power +10 dBM, high anti-jamming GFSK modulation, frequency hopping, data rate 50 Kb/s, unique carrier monitoring output, address Match output, address ready output. Since the high-speed signal processing part related to the RF protocol has been embedded in the module, PTR8000 can be used with various microcontrollers, and can also be used with high-speed processors such as DSP; PTR8000 provides an SPI interface, and the speed is set by the microcontroller itself In RX (receive) mode, the address match (AM) and data ready (DR) signals inform the MCU that a valid address and data packets have been completed respectively, and the microcontroller can read the received data through SPI. data. In TX (transmit) mode, PTRR8000 automatically generates the preamble and CRC check code, and the data ready (DR) signal informs the MCu that the data transmission is completed.

The external memory consists of an 8 MB SDRAM (using HY57V641620) and a 2 MB FLASH (using HY29LVl60), which are mainly used to store programs and data.

2 Software Design

The software development of the embedded system adopts the ADT IDE integrated development environment of Wuhan Skyworth Information Technology Co., Ltd., which provides an efficient, clear and visualized embedded software development platform, including a complete set of development and debugging tools for embedded systems: Editor, compiler, linker, project manager and debugger, etc., it runs on WindowsNT/95/98/2000/XP, adopts the interface style similar to Visual Studio, and supports Chinese and English versions.

Before the user’s application program, the initialization of the system needs to be completed by a special piece of code, that is, the system boot loader. When the ARM microprocessor is powered on or reset, the processor takes the value from 0x0, and the program arranged at this address is the system boot loader. Since this type of code directly faces the processor core and hardware controller for programming, assembly language is used, and its tasks include building the exception vector table, reconstructing the exception vector table, initializing the memory system, initializing the stack, initializing the application execution environment, masking All interrupts and calls to the main application.

The main program of the transceiver system mainly completes the initialization of the chip, the configuration of the interface, the control of the voice data flow and the interrupt processing, so that the transceiver system can effectively complete the voice recording, sending and receiving under the control of the embedded microprocessor. And the whole process of playing, the program flow chart of digital spread spectrum transceiver based on embedded system is shown in Figure 2.

Design of Spread Spectrum Communication System Based on S3C2410X Microprocessor

3 Experimental results

Write the system startup loader in assembly language, write the digital spread spectrum transceiver program of the embedded microprocessor in C language, add the source code in the ADTIDE integrated development environment, save it and add it to the project for setting and compiling. JTAG simple debugger, burn the application program to FLASH and download it to SDRAM. Correctly solder the voice codec circuit, embedded microprocessor S3C2410X, level conversion circuit, voice data spread spectrum and despread modulation and demodulation circuit, latch and control signal generation circuit, external memory and radio frequency unit circuit on the PCB board. power, run the program.

At the sending end, the voice is sent to the voice codec chip UDAl344TS through the microphone. After the voice coding process, the serial voice data in the I2-bus format is generated and transmitted to the embedded microprocessor S3C2410X through the standard I2S voice interface. S3C2410X stores the obtained 8-bit voice data in the pre-allocated data area, and then sends the data to the voice data spread spectrum, despreading and demodulation chip Z87200 one by one through the synchronous serial interface SIO for on-chip spread spectrum After a series of processing such as , BPSK modulation, an 8-bit digital intermediate frequency voice signal is obtained; finally, it is sent out wirelessly through the radio frequency unit PTR8000.

At the receiving end, the 8-bit digital intermediate frequency voice signal is wirelessly received through the radio frequency unit PTR8000, and sent to the z87200 chip for a series of processing such as despreading and demodulation to obtain a serial voice data signal; the signal is sent to the CPLD device EPM7128SLC84- 15 8-bit synchronous shift register; every time the CPLD gets an 8-bit voice data, it will latch the data and generate an external interrupt to notify the embedded microprocessor S3C2410X to read the 8-bit voice data; finally, under the control of S3C2410X The voice data is transmitted to the voice codec chip UDAl344TS through the I2S interface, and played out through the speaker after decoding.

The sending channel realizes voice recording, spread spectrum and BPSK modulation, and wireless transmission; the receiving channel realizes wireless reception, BPSK demodulation, despreading and playback. Two channels can be carried out at the same time; in wireless transmission, PTR8000 high-performance embedded wireless module is used, the maximum transmission rate can reach 20 Kb/s, and the longest transmission distance can reach about 1 km.

4 Conclusion

The meaning of embedded system and spread spectrum communication is expounded. Taking embedded microprocessor S3C2410X as the core, a digital spread spectrum transceiver is designed with Z87200, UDAl344TS, PTR8000 and other modules. The innovation of this paper is to integrate embedded technology and spread spectrum technology, and use ADT IDE integrated development environment to debug embedded system software, and use embedded microprocessor to program and control other chips in the system, so it has good flexibility. and versatility; according to the proposed design ideas, other wireless communication systems can be easily designed, with broad application prospects and good economic benefits.

The Links:   LQ104S1DG35 PM400DHA060