RS232 serial data interceptor design

Many devices and their control computers use the RS 232 standard serial interface for communication. This paper designs and implements the RS 232 serial communication data interceptor, which can effectively intercept the communication data between the device and its control computer.

1 interceptor hardware part design

1.1 Overall block diagram and principle

The system block diagram is shown in Figure 1.

Principle analysis: The communication line between the specific device and its control computer is divided into two by level conversion. All the way is directly connected, ensuring that the interceptor does not affect the normal communication between them. The other serialized serial ports 1 and 2 are connected to the single-chip microcomputer to ensure that the communication data between them can be captured by the single-chip microcomputer. After the data is processed by the single-chip microcomputer, the data is transmitted to the upper computer through another extended serial port to realize the interception of the communication data.

1.2 Device Selection

The system uses the commonly used AT89C51 single-chip microcomputer as the processing core, and selects the GM8123 chip produced by Chengdu Guoteng Company to expand a full-duplex asynchronous serial communication interface of AT89C51 single-chip microcomputer into three full-duplex asynchronous serial communication interfaces, which is realized by MAX232 chip. Conversion between RS 232 level and TTL level.

1.3 hardware circuit

The complete circuit schematic of the system is shown in Figure 2. The system circuit consists of three parts: the minimum system of the MCU, the serial port expansion circuit and the level conversion circuit.

The minimum system of the MCU, including the power supply circuit, the clock circuit and the reset circuit, S1, S2 do the baud rate control switch, respectively control P0.0, P0.1 value from 00 to 11, corresponding baud rate is 1 200 ~ 9 600 b/s.

The serial port expansion circuit is composed of GM8123, and its clock circuit uses a 12 MHz quartz crystal oscillator to form an internal clock mode. The female serial port receiving pin RXD0 and the transmitting pin TXD0 of the GM8123 are respectively connected to the transmitting pin TXD and the receiving pin RXD of the single chip serial port. The reset pin of GM8123 is connected with the P3.6 pin of the MCU, and the GM8123 system is reset by P3.6. Its mode control pin MS is connected with P3.7, and the mode is selected by P3.7. GM8123's transmit address line pins STADD0, STADD1, receive address pins SRADD0, SRADD1 are connected to P1.0~P1.3 of the P1 port of the MCU, and the P1 port of the MCU determines which sub-serial port receives data and selects a sub-serial port. send data.

The level shifting circuit is implemented by two MAX232 chips, which realize the mutual conversion between the RS 232 level and the TTL level of J1, J2, and J3.

2 software design

The system software has two working modes. The software design of the mode 1 is to realize the real-time transmission of the intercepted data, and the interceptor can not be separated from the upper computer when working. The software design of mode 2 is to realize the storage and forwarding of intercepted data, and the interceptor can work away from the upper computer.

2.1 main program flow design

The main programs of mode 1 and mode 2 are basically the same. The main functions are: configuration of serial interrupt register of single chip microcomputer, baud rate setting of serial port transceiver data and configuration of related timer, reset operation and work of GM8123 chip Related configuration of the mode. The main program flow chart is shown in Figure 3.

The program flow chart for controlling the baud rate setting by S1, S2 is shown in Fig. 4.

Circuit Breaker is a switching device that can close, carry and break current under normal circuit conditions and can close and carry current under the abnormal loop conditions within a specified time.

The circuit breaker is generally composed of a contact system,an arc extinguishing system, an operating mechanism,a trip unit,a casing,and so on.Our company's Circuit Breakers had been divided into 11 series(as follow),every series product have it's own special function,had exported into global market for many years,always with good feedback.

Mini Circuit Breaker
Eearth Leakage Circuit Breaker
High Breaking Capacitor MCB
ID Residual Current Circiut Breaker 
F360 Residual Current Circuit Breaker  
Motor Protection Circuit Breaker
CM1 Moulded Case Circuit Breaker
NS Moulded Case Circuit Breaker
S Moulded Case Circuit Breaker
PX Moulded Case Circuit Breaker
Air Circuit Breaker 


Circuit Breakers

Circuit Breakers,Air Circuit Breaker,Earth Leakage Circuit Breaker,Moulded Case Circuit Breaker

Ningbo Bond Industrial Electric Co., Ltd. , https://www.bondelectro.com