Method, device and system capable of achieving serial port communication

A technology for serial communication and equipment, applied in the field of communication, can solve the problems of low data transmission efficiency, high production and processing costs and management costs, identification errors of slave devices, etc., and achieve the effect of improving processing efficiency.

Inactive Publication Date: 2013-06-19
SHENZHEN HUAWEI AGISSON ELECTRIC CO LTD
View PDF3 Cites 26 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] 1. When setting the device ID of the slave device through the dial switch, due to the poor reliability of the dial switch, it is easy to cause the device ID to be set incorrectly, so that there is a recognition error when identifying the slave device
[0005] 2. When the device ID of the slave device is set by selecting welding resistors, the same type of slave device needs to be managed and distinguished using different lists, which will result in higher production and processing costs and management costs
[0006] 3. When the device ID setting of the slave device is realized through software configuration, the software configuration is prone to errors, resulting in incorrect device ID settings, resulting in recognition errors when identifying the slave device
[0007] 4. When the device ID setting of the slave device is wrong, it is difficult to troubleshoot
[0008] 5. When the master device communicates with the slave device, the communication data needs to contain the device ID information, which will cause a large overhead of the communication protocol inside the device, resulting in low efficiency of data transmission
[0012] 1. Each slave device uses a set of serial buses to communicate with the master device, resulting in too complicated wiring between the master device and the slave device, which is not suitable for communication between long-distance devices
[0013] 2. Since the master device needs to design the serial bus interface according to the number of slave devices connected to it, the number of slave devices managed by the master device is limited to the serial bus interface of the master device
[0014] 3. The master device designs the number of serial buses according to the number of slave devices, and the shared bus cannot be used. In this way, the master device will expand more serial bus interfaces, and the hardware cost is higher

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method, device and system capable of achieving serial port communication
  • Method, device and system capable of achieving serial port communication
  • Method, device and system capable of achieving serial port communication

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0043] see figure 1 , a method for realizing serial port communication, the method specifically includes the following operations:

[0044] Step 101: Determine the slave devices in each position through the control bus and the serial bus;

[0045] Step 102: receiving the interrupt request sent by each existing slave device through the control bus;

[0046] Step 103: if currently only an interrupt request sent by an on-position slave device is received, the serial bus is allocated to the on-position slave device currently sending the interrupt request;

[0047] Step 104: If the interrupt requests sent by multiple slave devices in position are currently received, determine the interrupt priorities corresponding to the slave devices in position, and serialize the serial number according to the interrupt priorities corresponding to the slave devices in position The bus is assigned to one of the multiple present slave devices;

[0048] Step 105: Perform data communication with t...

Embodiment 2

[0051] see figure 2, is a system for implementing serial port communication provided by the embodiment of the present invention. The system includes: a master device 101, a slave device 201, a slave device 202, ..., a slave device 20N, and a total of N slave devices, where N is greater than An integer equal to 2; in the embodiment of the present invention, the above N slave devices can be connected to the master device 101 through the same serial bus and the same control bus respectively.

[0052] In the embodiment of the present invention, the serial bus can specifically be RS232, RS485 or RS422. Usually, the serial bus is used to transmit data between the master device and the slave device, and can include a receiving channel RXD and a sending channel TXD. Among them, RS232, RS485 or RS422 is a serial physical interface formulated by EIA (Electronic Industry Association, American Electronics Industry Association), RS refers to the abbreviation of English Recommendation Crit...

Embodiment 3

[0094] Referring to 5, a master device, the master device includes: a determination module 401, a receiving module 402, a first distribution module 403, a second distribution module 404 and a data communication module 405;

[0095] Determining module 401, is used for determining each in-position slave equipment by control bus and serial bus;

[0096] The receiving module 402 is used to receive the interrupt request sent by each slave device in place through the control bus;

[0097] The first allocation module 403 is used to assign the serial bus to the slave device currently sending the interrupt request if only one interrupt request sent by the slave device in position is currently received;

[0098] The second allocation module 404 is used to determine the interrupt priority levels corresponding to multiple slave devices in position if the interrupt requests sent by multiple slave devices in position are currently received, and according to the interrupt corresponding to th...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method, a device and a system capable of achieving serial port communication and belongs to the communication technical field. The method comprises the following steps: each slave device in place is ascertained through a control bus and a serial bus; each interrupt request sent by each slave device in place is received through the control bus; when the interrupt request of only one slave device in place is received at present, the serial bus is assigned to the slave device, in place, which sends the interrupt request at present; when the interrupt requests of a plurality of slave devices in place are received at present, a corresponding interrupt priority level of each of slave devices in place is ascertained and the serial bus is assigned to one of the slave devices in place according to the interrupt priority levels of the plurality of slave devices in place; and data communication is conducted through the serial bus and the slave device, in place, which the serial bus is assigned to. According to the technical scheme, device identification (ID) is not brought in, so that a series of problems which are caused by setting of the device ID in the prior art can be solved, processing efficiency of a primary device is improved and shared serial bus conflicts can not be caused.

Description

technical field [0001] The invention relates to the technical field of communication, in particular to a method, device and system for realizing serial port communication. Background technique [0002] At present, the master device mainly manages the slave devices connected to it through the serial bus, and identifies different slave devices according to the device ID of the slave device. The serial bus is shared by all slave devices connected to it, and the device of the slave device ID is determined by dial switch, welding resistance or software configuration. When the master device communicates with the slave device connected to it, the master device sends a data message containing the device ID of the slave device to the slave device connected to it; then, after the slave device receives the data message sent by the master device, if If the device ID in the received data message is different from its own device ID, the data message is discarded; otherwise, the data mess...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): H04L12/40
Inventor 吴诗全李阳贤秦立真王晓义田君孟海强周幸崔海利邓伦挺黄丰凡方飞栋黄克铖夏伟乐蔡聪林蔡嘉林鹏程周义求丽军
Owner SHENZHEN HUAWEI AGISSON ELECTRIC CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products