Design of data communication module based on dual single chip microcomputer

Publisher:幸福旅程Latest update time:2014-06-30 Source: 互联网 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In the process of information data transmission, in order to ensure the working performance of the data communication system, people apply some new communication technologies to its special purpose, so as to realize the design of dual-MCU data communication module to ensure the effectiveness and stability of information data transmission. Among them, the application of SPI bus not only greatly improves the effect of data communication, but also simplifies the current structure of the entire communication system, so that the reliability of the dual-MCU data communication module design is effectively improved. Moreover, with the continuous development of society, people have also applied many advanced scientific and technological methods to it, which effectively promoted the development of my country's communication industry and further optimized its communication performance.

Design and Analysis of SPI Bus Data Communication between Dual MCUs

In the current process of industrial economic development in my country, in order to realize the information production of industry, people apply computer control system to it, so as to effectively improve its production efficiency and quality. However, due to the extremely harsh industrial production environment, there are certain problems with the stability and reliability of the computer system structure during operation, which leads to signal interruption when the communication information is transmitted. Therefore, in order to improve the data communication capability of the computer system, the data communication module of the dual single-chip microcomputer is designed to perform corresponding processing, so as to ensure the normal transmission of information data and ensure the normal operation of process production.

1 Dual MCU structure and working principle of data communication module

At present, in the process of processing data communication modules, we usually use RS485 bus technology to process them, so as to collect relevant information data to ensure the normal use of the entire communication system. However, with the continuous development of the times, the working performance of traditional single-chip microcomputers can no longer meet the relevant requirements of information communication. We will optimize the data communication module accordingly, so we use a dual single-chip microcomputer structure to effectively improve its working performance, and use software to simulate the SPI bus to process it, so that the stability and reliability of the entire communication system are effectively guaranteed.

In the process of designing the dual-MCU data communication module, its dual-MCU structure is mainly composed of two different CPU systems. It first uses a CPU system to collect relevant information data through RS485 bus technology, and then transfers the relevant information data to another CPU system based on software simulation of SPI bus technology. In the entire process of the dual-MCU structure, people mainly use the second CPU system module as the main core content to collect the received information data. This not only improves the effect of information communication, but also facilitates people to collect relevant information data, thereby effectively improving the efficiency and quality of the entire production work. Moreover, with the continuous progress of the times, people have also integrated many advanced scientific and technological technologies into it, which has greatly improved the performance of the entire data communication system, which has also made great contributions to the development of my country's communications industry.

2 Overview of SPI Bus Technology

SPI is a synchronous and efficient communication bus system, in which four lines are used on its chip pins to perform corresponding communication processing. This not only saves the space layout of the PCB system, brings great convenience to the transmission of data communication information, but also meets the relevant requirements of the current development of my country's communication industry. In fact, the communication principle of SPI bus technology is very simple. It is mainly composed of a master device and multiple slave devices. We use the relevant line structure to complete the transmission of device information, thereby effectively improving the communication capability of the entire computer system. However, in the process of processing the SCK signal, its signal line is mainly controlled by the master device, and the slave device can only play an auxiliary role in it. In this way, the master control device can effectively manage the information data used to ensure the normal transmission of information data.

3. Design of data communication module based on dual MCU

In order to improve the response speed and control ability of the measurement and control system to multiple events, multiple single-chip microcomputers are often needed to divide the work and coordinate the work. This requires each single-chip microcomputer to communicate with other single-chip microcomputers while completing its own tasks. In a dual-CPU system composed of single-chip microcomputers, data transmission between two single-chip microcomputers usually uses parallel ports for parallel communication or serial ports and serial buses (SPI, I2C, etc.) for serial communication, and also communicates through shared I/O interface chips, shared memory (RAM), etc. If serial communication is performed using the serial ports of two single-chip microcomputers, it is necessary to ensure that both serial ports are available. The 51 series single-chip microcomputer has only one serial port. If the system also needs to communicate data with other peripheral devices, the serial port will be occupied. At this time, other methods must be considered to achieve communication between the two single-chip microcomputers. If parallel communication is used, at least 8 parallel data lines and 2 control signal lines are required (for unidirectional parallel communication between two machines). If it is bidirectional parallel communication, more control signal lines will be required, which puts forward requirements on the available I/O port lines of the single-chip microcomputer. In addition, parallel communication requires the clock synchronization of the two CPUs, and the hardware design is relatively complex. If communication is performed using a shared I/O interface chip or shared memory, it is necessary to add peripheral interface chips, making the hardware structure more complex.

Among them, the serial port (RXD and TXD) of the single-chip computer 89C2051 (A) is connected to the RS485 bus interface to receive data from multiple data acquisition modules of this station; the serial port of 89C2051 (B) is connected to the modem chip interface to receive data from offline stations and send data to online stations.

In addition, 89C2051 (B) forms a watchdog circuit through the two lines (P1.7 and P1.6) of the P1 port and the chip CAT1161 of the I2C bus (SCL and SDA) interface. The reset terminals RST of the two CPUs are connected together so that they can be reset at the same time; each CPU is connected to an external light-emitting diode through a line of the P1 port to indicate whether the CPU is working normally. If it is working normally, the program will give this line high and low levels at intervals to make the light-emitting diode flashing for program debugging. Therefore, the serial port can no longer be used for data transmission between the two microcontrollers. Since the system does not require a high communication speed between the two, a simple and effective method is to achieve communication between the two microcontrollers through a simulated serial port. After experiments, it was found that simulating the SPI serial bus is an effective method to achieve data communication between dual CPUs. The SPI bus only needs four lines: chip select, serial clock, data input and data output to complete the data exchange between the two CPUs. Therefore, the use of the SPI bus interface can save I/O port lines and system resources, simplify circuit design, and improve system reliability. Since the AT89C2051 microcontroller does not have an SPI serial bus interface, software is required to simulate the SPI operation.

In actual applications, different SPI interface chips have different working timings. This module uses timing to simulate the operation of SPI in software, that is, input (receive) data on the rising edge of the clock signal and output (send) data on the falling edge. Among them, Din and Dout are used for serial data input and output respectively, the chip select line CS is used to control the start and end of data transmission, and the clock line CLK is used to synchronize data transmission between master and slave devices.

4 Conclusion

In the process of designing the dual-MCU data communication module, in order to effectively improve its data information transmission capability, people use software to simulate the SPI bus to process it. This not only further optimizes the system communication structure, but also meets the relevant requirements of the MCU operation, thereby greatly improving the communication capability of the communication system.

Reference address:Design of data communication module based on dual single chip microcomputer

Previous article:Design of Extended EEPROM Based on SM320F2812 SPI Bus
Next article:Design scheme for generating accurate clock source from oscillator

Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号