CN106453383B - UART-based master-slave multi-machine communication system and method - Google Patents

UART-based master-slave multi-machine communication system and method Download PDF

Info

Publication number
CN106453383B
CN106453383B CN201610977199.2A CN201610977199A CN106453383B CN 106453383 B CN106453383 B CN 106453383B CN 201610977199 A CN201610977199 A CN 201610977199A CN 106453383 B CN106453383 B CN 106453383B
Authority
CN
China
Prior art keywords
slave
port
communication bus
host
communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610977199.2A
Other languages
Chinese (zh)
Other versions
CN106453383A (en
Inventor
覃健峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Topband Co Ltd
Original Assignee
Shenzhen Topband Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Topband Co Ltd filed Critical Shenzhen Topband Co Ltd
Priority to CN201610977199.2A priority Critical patent/CN106453383B/en
Publication of CN106453383A publication Critical patent/CN106453383A/en
Application granted granted Critical
Publication of CN106453383B publication Critical patent/CN106453383B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/02Protocol performance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1046Joining mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1087Peer-to-peer [P2P] networks using cross-functional networking aspects
    • H04L67/1091Interfacing with client-server systems or between P2P systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a master-slave multi-computer communication system and a method based on UART, wherein the system comprises a host, n slave computers and a communication bus, n is a positive integer greater than or equal to 1, a TX port, an RX port and an IO port of the host are respectively connected to the communication bus through circuits, and the TX port, the RX port and the IO port of each slave computer are also respectively connected to the communication bus through circuits. The invention reduces the connection between the devices and the mutual interference of signals by connecting the RX port and the TX port of the host and the RX port and the TX port of the slave to the same communication bus. In addition, the invention does not need to add extra devices, has low cost and short design period, and can be widely applied to communication among a plurality of devices in short distance.

Description

UART-based master-slave multi-machine communication system and method
Technical Field
The invention belongs to the field of communication, and particularly relates to a master-slave multi-machine communication system and method based on a UART.
Background
Under the tide of the internet of things, information interaction between equipment is indispensable. The real-time interaction of data among the devices can improve the experience of users, and is more favorable for the safety and reliability of products. In the prior art, a Universal Asynchronous Receiver/Transmitter (UART) is commonly used for short-distance point-to-point communication in the industry, a main stream MCU (Microcontroller Unit) is generally provided with a UART port and CAN be connected with an RS232 line, the standard UART adopts a simple one-to-one communication mode and cannot meet the one-to-many communication requirements in the fields of the control industry of household appliances and the control of automation equipment at present, other communication modes such as RS485 and CAN buses CAN realize the one-to-many communication mode, but the main stream MCU is provided with an RS485 or CAN communication function, a user needs to be externally connected with a corresponding communication IC or a communication conversion IC, the cost is relatively high, and in addition, the RS485 or CAN is communicated by more than three lines, and the interfaces are more and the connection is complicated.
Disclosure of Invention
The invention provides a master-slave multi-machine communication system and method based on UART, aiming at solving the problems that the standard UART communication in the prior art cannot support master-slave multi-machine communication, and the master-slave multi-machine communication is realized by adopting other communication modes, so that the cost is high, the connection is complex, and signals are easy to interfere with each other.
The embodiment of the invention is realized in such a way that a master-slave multistage communication system based on UART comprises: the system comprises a host, n slaves and a communication bus, wherein n is a positive integer greater than or equal to 1, a TX port, an RX port and an IO port of the host are respectively connected to the communication bus through circuits, and the TX port, the RX port and the IO port of each slave are also respectively connected to the communication bus through circuits
The embodiment of the invention also provides a master-slave multistage communication method based on UART, wherein a TX port, an RX port and an IO port of a host are respectively connected to a communication bus through circuits, and a TX port, an RX port and an IO port of each slave are also respectively connected to the communication bus through circuits, and the method comprises the following steps:
after the slave is connected to the communication bus, sending a handshake signal to the communication bus through a self TX port, wherein the handshake signal comprises the equipment ID of the slave;
after receiving the handshake signals through a communication bus, an RX port of the host analyzes the handshake signals, and sends handshake success signals to the communication bus through a TX port of the host, wherein the handshake success signals comprise the analyzed ID of the slave equipment;
after the RX port of the slave receives the handshake success signal through a communication bus, analyzing the handshake success signal, and if the analyzed slave equipment ID is the same as the equipment ID of the slave, waiting for the host to send command data;
the host sends command data to a communication bus through a TX port of the host, wherein the command data comprises an ID (identity) of slave equipment to be called by the host;
and after receiving the command data through a communication bus, the RX port of the slave machine analyzes the command data, if the analyzed slave machine ID is the same as the self machine ID, the RX port of the slave machine processes the command data according to the analyzed command data and sends back a code to the communication bus through the TX port of the RX port of the slave machine, wherein the code comprises the machine ID of the slave machine.
The invention has the beneficial effects that: by connecting the RX port and the TX port of the host and the RX port and the TX port of the slave to the same communication bus, the connection between the devices and the mutual interference of signals are reduced. In order to ensure that the situation that two devices send data simultaneously does not occur, each device is additionally provided with an IO port to detect the communication bus, and the data can be sent only when the communication bus is idle. In addition, the invention does not need to add extra devices, has low cost and short design period, and can be widely applied to communication among a plurality of devices in short distance.
Drawings
Fig. 1 is a schematic block diagram of a communication system based on UART master-slave multi-machine according to an embodiment of the present invention;
fig. 2 is a schematic circuit diagram of a communication system based on UART master-slave multi-machine according to a second embodiment of the present invention;
fig. 3 is a flowchart of a communication method based on UART master-slave multi-machines according to a third embodiment of the present invention;
fig. 4 is a diagram illustrating a communication frame format according to an embodiment of the present invention;
fig. 5 is a timing diagram of a UART-based master-slave multi-machine communication according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Example one
UART communication is normally three wires, RX, TX, GND, and belongs to full-duplex communication, so that data transmission and reception are separated. In order to reduce the wiring between the devices and not influence the communication between the devices, the invention combines the RX and TX circuits to be connected to a communication bus. Fig. 1 is a schematic block diagram of a communication system based on UART master-slave multi-machine according to an embodiment of the present invention. The communication system based on the UART master-slave multi-machine comprises a host, n slave machines and a communication bus, wherein n is a positive integer greater than or equal to 1. The host and the slave are communicated with each other through the communication bus, specifically, a TX port, an RX port and an IO port of the host are respectively connected to the communication bus through circuits, and a TX port, an RX port and an IO port of each slave are also respectively connected to the communication bus through circuits.
According to the embodiment of the invention, the RX port and the TX port of the host and the RX port and the TX port of the slave are connected to the same communication bus, so that the connection between equipment and the mutual interference of signals are reduced. In addition, the invention does not need to add extra devices, has low cost and short design period, and can be widely applied to communication among a plurality of devices in short distance.
Example two
Fig. 2 is a circuit diagram of a communication system based on UART master-slave multi-machine according to a second embodiment of the present invention. The communication system comprises a host U1, a slave U2 and a slave U3 … …, wherein a TX port (pin 8) of the host U1 is externally connected with a first resistor R1 and is connected to a communication bus, an RX port (pin 7) of the host U1 is externally connected with a second resistor R2 and is connected to the communication bus, and an IO port (pin 9) of the host is externally connected with a third resistor R3 and is connected to the communication bus. A TX port (pin 8) of a host of the slave U2 is externally connected with a fourth resistor R4 and is connected to a communication bus, an RX port (pin 7) of the slave U1 is externally connected with a fifth resistor R5 and is connected to the communication bus, and an IO port (pin 9) of the slave is externally connected with a sixth resistor R6 and is connected to the communication bus. In addition, in order to keep the communication bus at a high level all the time when no communication data is present, a power supply is connected to the communication bus through the series connection of the seventh resistor R7, giving a pull-up to the communication bus.
It should be noted that the resistor in the present invention is used to isolate the electrical signal from the voltage division, and may be set according to actual needs, and is not an essential setting item. The TX port and the RX port of the MCU are connected to a communication bus through an external resistor, so that the single-bus transceiving function is realized. In order to ensure that the situation that two devices send data simultaneously does not occur, each device is additionally provided with an IO port to detect the communication bus, and the data can be sent only when the communication bus is idle. In the embodiment of the invention, the communication bus is detected by adopting the No. 9 IO port, and in practical application, the communication bus can be detected by adopting other IO ports. In the embodiment of the invention, the No. 6 pin of each MCU is used for grounding, and in practical application, the grounding can be carried out according to the arrangement of the grounding pin of the MCU.
According to the embodiment of the invention, the RX port and the TX port of the host and the RX port and the TX port of the slave are connected to the same communication bus, so that the connection between equipment and the mutual interference of signals are reduced. In addition, the invention does not need to add extra devices, has low cost and short design period, and can be widely applied to communication among a plurality of devices in short distance.
EXAMPLE III
Fig. 3 is a flowchart of a communication method based on UART master-slave multiple phones according to a third embodiment of the present invention, which includes the following steps:
s301, after the slave is connected to the communication bus, a handshake signal is sent to the communication bus through the TX port of the slave, wherein the handshake signal comprises the equipment ID of the slave.
When one slave is hung on the communication bus, the slave can be normally used after handshaking with the host. Because the TX port and the RX port of the equipment are combined and connected to the same communication bus, in order to ensure that the condition that two pieces of equipment send data simultaneously does not occur, each piece of equipment is additionally provided with an IO port to detect the communication bus, and the data can be sent only when the communication bus is idle. Therefore, before sending the handshake signals, the slave needs to detect whether the communication bus is idle through its own IO port, and if the communication bus is idle, the slave sends the handshake signals to the master. Specifically, when the IO port detects a continuous high level, it indicates that the communication bus is idle, and when a level change is detected, it indicates that the communication bus is not idle.
Further, after the slave is connected to the communication bus, the method further includes, after sending a handshake signal to the communication bus through its own TX port: and starting a timer, and if the slave does not receive the handshake success signal returned by the host within the preset time, sending the handshake signal to the host again by the slave.
And S302, after the RX port of the host receives the handshake signals through the communication bus, analyzing the handshake signals, and sending handshake success signals to the communication bus through the TX port of the RX port, wherein the handshake success signals comprise the analyzed slave equipment ID.
Since all the slaves and the master are hung on one communication bus, when one device sends data to the communication bus, all other devices hung on the communication bus can receive the data. And for the slave, after receiving the data, analyzing the data, and if the analyzed equipment ID is not the own equipment ID, discarding the data.
In this step, after receiving the handshake signal, the master analyzes the handshake signal, and can know which slave device is hooked to the communication bus, so that the master can send a corresponding handshake success signal to the slave.
And S303, after the RX port of the slave receives the handshake success signal through the communication bus, analyzing the handshake success signal, and if the analyzed slave equipment ID is the same as the self equipment ID, waiting for the host to send command data.
All the slave machines hung on the communication bus can receive the handshake success signal sent by the host machine, and if the slave machine ID is different from the self equipment ID after being analyzed, the frame data is not sent to the slave machines, and then the frame data is discarded; if the data is the same, the artificial frame data is sent to the artificial frame data, the handshake is successful, and the host computer is waited to send command data.
S304, the host sends command data to the communication bus through the TX port of the host, wherein the command data comprises the ID of the slave equipment to be received.
Furthermore, after the host sends the command data, a timer is started, if the recovery code of the slave is not received within the preset time, the command data is sent again, and if the recovery code is not received within the preset time or within the preset times, the slave is considered to be offline or abnormal, and error reporting processing is performed.
And S305, after receiving the command data through the communication bus by the RX port of the slave, analyzing the command data, if the analyzed slave equipment ID is the same as the own equipment ID, processing according to the analyzed command data, and sending back a code to the communication bus through the TX port of the slave, wherein the code comprises the equipment ID of the slave.
And after receiving the return code of the slave, the host sends the next frame data according to the return code.
In order to ensure the correct transmission of data, the embodiment of the present invention further defines a special communication data format, as shown in fig. 4. The communication frame format comprises a header command, a slave device ID, a frame length, data, a check code and an end code, wherein the communication frame format at least comprises the slave device ID, the data and the check code. The header command in the communication frame is used to identify whether data on the communication bus is master-issued or slave-issued, and only 1 byte may be set, e.g., the master-issued setting is a0 and the slave-issued setting is a 1. Therefore, for data sent by a certain slave machine, other slave machines can distinguish the data only by analyzing the head command without comparing the equipment ID, so that the program is simplified, and the efficiency is improved.
After the TX port and the RX port of each device are combined and connected to the same communication bus, the UART-based communication is changed from the original duplex communication to the half-duplex communication, so that it is necessary to reconfigure the transmission/reception timing of the definition data to each MCU in software design to prevent transmission/reception collisions. When the MCU is in a data receiving state, a receiving register of the MCU needs to be set as a receiving enable, and the TX port is set as an input port, namely the TX port is in a high-impedance state, so that the receiving of an RX port is not influenced; when the data is received and enters a data sending state, the sending enable of the sending register is started, the TX port is set to be output, the high and low levels are output, meanwhile, the receiving enable of the RX port is forbidden, and the RX port is prevented from receiving the data sent out by the RX port. And when the data transmission is completed, the receiving enable of the RX port is turned on and the transmitting enable of the register is turned off.
According to the embodiment of the invention, the RX port and the TX port of the host and the RX port and the TX port of the slave are connected to the same communication bus, so that the connection between equipment and the mutual interference of signals are reduced. In addition, the invention does not need to add extra devices, has low cost and short design period, and can be widely applied to communication among a plurality of devices in short distance.
Example four
Fig. 5 is a timing chart of UART master-slave multi-machine communication according to a fourth embodiment of the present invention, which includes a master and two slaves. Assuming that slave 001 has completed a handshake with the master, which can communicate with the master as normal, slave 002 is the device that has just been mounted on the communication bus.
It should be noted that, in the present embodiment, the handshake signal, handshake success signal, command data, and return code all adopt the communication frame format as shown in fig. 4. Whether the communication frame is a master or a slave, before the communication frame is sent, whether a communication bus is idle or not needs to be detected, if the communication bus is idle, the communication bus is sent, and if the communication bus is not idle, the communication frame indicates that other slaves or the master transmit data, the detection is continued after waiting for a period of time; after the communication frame is sent, a timer is started, and if the response of the other party is not received within the preset time, the communication frame is sent again; after receiving the communication frame, the data is checked according to the check code carried in the communication frame, and if the data check is wrong, the frame data is discarded and the code is sent back to require to be sent again. If the check code is erroneous for 5 consecutive times, the expected communication is stopped and an error is reported. The slave does not actively send data to the master except for sending the handshake signals, and the master needs to receive a correct code back to send data to another slave after sending the data to the slave.
The following describes the general working flow of the master-slave multi-computer communication system after the slave 002 is mounted on the communication bus:
in step S502, the slave 002 transmits a handshake signal to the master.
The handshake signal is sent to the communication bus via the TX port of the slave 002, with a header command of 1 (indicating that the signal is sent by the slave) and a slave device ID of 002.
The slave 001 receives the handshake signal through its RX port, and by analyzing the handshake signal header command, it can know that the signal is sent by the slave, and directly discards the communication frame.
The host receives the handshake signals through the RX port of the host, analyzes the handshake signals, and analyzes that the ID of the slave equipment waiting for handshake is 002.
In step S504, the host returns a handshake success signal.
The header command of the handshake success signal is 0 (indicating that the signal is issued by the master) and the slave ID is 002.
The slave 002 receives the handshake success signal sent by the master through its RX port, analyzes the handshake success signal, and if the header command is analyzed to be 0 first, then the slave ID is analyzed to be 002 continuously, and if the slave ID is the same as its own ID after matching, it is determined that the slave ID is the signal sent by the master to itself. Further, the data is analyzed according to the frame length, the host computer is confirmed to successfully receive the handshake signals sent by the host computer, and the handshake with the host computer is successful. Slave 002 then enters a wait state, waiting for the master to send command data.
After receiving the handshake success signal, the slave 001 analyzes the header command, and the signal is sent out by the slave to directly discard the communication frame.
In step S506, the master transmits command data to the slave 002. The head command of the command data is 0, and the slave ID is 002.
The slave 001 receives the command data, analyzes the command data to find that the command data is not addressed to the slave, and discards the communication frame.
In step S508, the slave 002 analyzes the command data, confirms that the command data is the command data transmitted by the master itself, and executes the processing based on the analyzed command.
In step S510, the slave 002 sends the code back to the master.
After the slave 002 executes the command, it sends back the code to the master according to the execution result. The header command of the return code is 1, and the slave ID is 002.
In step S512, the master sends the next piece of command data to the slave 001.
The master receives the reply code returned from the slave 002, and after confirming that the reply code is correct, the master sends the next piece of command data to the slave 001. It should be noted that, if the master does not receive the corresponding reply code within the predetermined time, the previous command data is sent to the corresponding slave again, and the next command data is not sent until the master receives the correct reply code of the corresponding slave.
In step S514, the slave 001 analyzes the command data, confirms that the command data is the command data transmitted from the master to itself, and executes processing based on the analyzed command.
The slave 002 receives the command data, and the command data is analyzed to find that the command data is not addressed to the slave, and the communication frame is discarded.
In step S516, the slave 001 sends back the code to the master.
According to the embodiment of the invention, the RX port and the TX port of the host and the RX port and the TX port of the slave are connected to the same communication bus, so that the connection between equipment and the mutual interference of signals are reduced. In addition, the invention does not need to add extra devices, has low cost and short design period, and can be widely applied to communication among a plurality of devices in short distance.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (9)

1. A master-slave multi-computer communication system based on UART is characterized by comprising a host, n slave computers and a communication bus, wherein the communication bus is a single line, n is a positive integer greater than or equal to 1, a TX port, an RX port and an IO port of the host are respectively connected to the communication bus through circuits, and the TX port, the RX port and the IO port of each slave computer are also respectively connected to the communication bus through circuits;
before sending data to the communication bus, the host or the slave detects whether the communication bus is idle through the IO port of the host or the slave, if the communication bus is idle, the host or the slave sends the data to the communication bus, and if the communication bus is not idle, the host or the slave waits for a period of time and then detects the communication bus.
2. The master-slave multi-machine communication system as claimed in claim 1, wherein a first resistor is externally connected to a TX port of the host computer and connected to the communication bus, and/or a second resistor is externally connected to an RX port of the host computer and connected to the communication bus, and/or a third resistor is externally connected to an IO port of the host computer and connected to the communication bus.
3. The master-slave multi-machine communication system as claimed in claim 1 or 2, wherein a fourth resistor is externally connected to the TX port of the slave and/or a fifth resistor is externally connected to the RX port of the slave and/or a sixth resistor is externally connected to the IO port of the slave and connected to the communication bus.
4. The master-slave multi-machine communication system as claimed in claim 1, wherein a power supply is connected to the communication bus through a seventh resistor connected in series.
5. A master-slave multi-computer communication method based on UART is characterized in that a TX port, an RX port and an IO port of a master computer are respectively connected to a communication bus through circuits, the communication bus is a single wire, and the TX port, the RX port and the IO port of each slave computer are also respectively connected to the communication bus through circuits, the method comprises the following steps:
after the slave is connected to the communication bus, sending a handshake signal to the communication bus through a self TX port, wherein the handshake signal comprises the equipment ID of the slave;
after receiving the handshake signals through a communication bus, an RX port of the host analyzes the handshake signals, and sends handshake success signals to the communication bus through a TX port of the host, wherein the handshake success signals comprise the analyzed ID of the slave equipment;
after the RX port of the slave receives the handshake success signal through a communication bus, analyzing the handshake success signal, and if the analyzed slave equipment ID is the same as the equipment ID of the slave, waiting for the host to send command data;
the host sends command data to a communication bus through a TX port of the host, wherein the command data comprises an ID (identity) of slave equipment to be called by the host;
after receiving the command data through a communication bus, an RX port of the slave machine analyzes the command data, if the analyzed ID of the slave machine is the same as the ID of the slave machine, the RX port of the slave machine processes the command data according to the analyzed ID of the slave machine and sends back a code to the communication bus through a TX port of the RX port of the slave machine, wherein the code comprises the ID of the slave machine;
before the host or the slave sends data to the communication bus, whether the communication bus is idle is detected through an IO port of the host or the slave, if the communication bus is idle, the data is sent to the communication bus, and if the communication bus is not idle, the communication bus is detected after waiting for a period of time;
when the host or the slave receives data, a TX port of the host or the slave is set as input; when the host or the slave sends data, the RX port of the host or the slave is set to be forbidden to receive.
6. The master-slave multi-machine communication method according to claim 5, wherein the detecting whether the communication bus is idle through the IO port thereof specifically comprises: when the MCU of the host or the slave detects a continuous high level through the IO port of the MCU, the communication bus is idle, otherwise, the communication bus is not idle.
7. The master-slave multi-machine communication method according to claim 5, wherein the communication frame format of the handshake signal, the handshake success signal, the command data and the return code includes at least a slave ID, data and a check code.
8. The master-slave multi-machine communication method according to claim 7, wherein the communication frame format of the handshake signal, the handshake success signal, the command data and the echo code further includes a header command for distinguishing a sender of a communication frame as a master or a slave.
9. The master-slave multi-machine communication method as claimed in claim 5, wherein after the slave is connected to the communication bus, the slave sends the handshake signals to the communication bus through its own TX port, and further comprising:
and starting a timer, and if the slave does not receive the handshake success signal returned by the host within the preset time, sending the handshake signal to the host again by the slave.
CN201610977199.2A 2016-11-07 2016-11-07 UART-based master-slave multi-machine communication system and method Active CN106453383B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610977199.2A CN106453383B (en) 2016-11-07 2016-11-07 UART-based master-slave multi-machine communication system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610977199.2A CN106453383B (en) 2016-11-07 2016-11-07 UART-based master-slave multi-machine communication system and method

Publications (2)

Publication Number Publication Date
CN106453383A CN106453383A (en) 2017-02-22
CN106453383B true CN106453383B (en) 2019-12-24

Family

ID=58179818

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610977199.2A Active CN106453383B (en) 2016-11-07 2016-11-07 UART-based master-slave multi-machine communication system and method

Country Status (1)

Country Link
CN (1) CN106453383B (en)

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108521854A (en) * 2017-05-17 2018-09-11 深圳市大疆创新科技有限公司 Communication control method, communication master device and communication system
CN107066412B (en) * 2017-05-27 2023-05-02 梦孚(上海)教育科技有限公司 Communication circuit and method thereof
CN108011692A (en) * 2017-06-30 2018-05-08 宁波方太厨具有限公司 A kind of data communications method for microcontroller
CN107463130A (en) * 2017-08-16 2017-12-12 深圳市联赢激光股份有限公司 A kind of cascade circuit with accurate wrong discrimination function
CN108650296A (en) * 2018-03-30 2018-10-12 深圳阿凡达智控有限公司 The means of communication, device and system
CN108600066B (en) * 2018-04-10 2021-07-02 武汉虹创联众科技有限公司 Single bus communication method
CN109062845A (en) * 2018-07-26 2018-12-21 北京无线电测量研究所 multi-terminal control method and system
CN109284248A (en) * 2018-08-23 2019-01-29 深圳柴火创客教育服务有限公司 UART bus communication method, equipment and its functional module using UART bus communication
CN109285249A (en) * 2018-09-05 2019-01-29 北京旷视科技有限公司 A kind of testimony of a witness verifying system and method
CN109614358A (en) * 2018-12-26 2019-04-12 苏州易美新思新能源科技有限公司 A kind of implementation method of PCB signal control circuit
CN109672600B (en) * 2018-12-27 2021-11-16 北京航天飞腾装备技术有限责任公司 On-missile single-machine interconnection system
CN110083089B (en) * 2019-04-03 2021-05-28 深圳市志奋领科技有限公司 Sensor circuit for digital communication, sensor digital communication circuit and method
CN110412952A (en) * 2019-07-02 2019-11-05 浙江捷昌线性驱动科技股份有限公司 A kind of beddo sync control device
CN110608502B (en) * 2019-09-10 2022-08-19 青岛海尔空调电子有限公司 Air conditioner communication method based on single-wire half-duplex communication and air conditioner
CN110580037B (en) * 2019-09-27 2020-07-31 华勤通讯技术有限公司 UART communication system and vehicle-mounted equipment
CN112134772B (en) * 2020-09-09 2021-07-09 中国科学院地质与地球物理研究所 Single-wire-based data transmission method and device
CN113064848A (en) * 2021-01-23 2021-07-02 河南锐利特计算机科技有限公司 Method for communication of 485 interface bus by adopting time-sharing time window method
CN113259055B (en) * 2021-05-19 2022-11-25 金华卓远实业有限公司 Single-wire UART (universal asynchronous receiver/transmitter) efficient communication method
CN113359014A (en) * 2021-08-11 2021-09-07 深圳英集芯科技股份有限公司 Fool-proof method and system for chip test
CN113792003A (en) * 2021-09-24 2021-12-14 展讯通信(深圳)有限公司 Single bus communication unit, system and method
CN114301732B (en) * 2022-03-08 2022-06-10 深圳市驰普科达科技有限公司 Circuit for realizing bus communication, bus communication system and power supply energy storage device
CN114928512B (en) * 2022-04-11 2022-12-13 中国科学院地质与地球物理研究所 Signal transmission method, device, equipment and medium based on drilling equipment
CN115499032A (en) * 2022-09-01 2022-12-20 上海盛本智能科技股份有限公司 One-to-many UART communication method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090028259A (en) * 2007-09-14 2009-03-18 엘에스산전 주식회사 Apparatus and method for analysing communication state
CN101834912A (en) * 2010-04-20 2010-09-15 南京航空航天大学 Device for dynamically allocating slave addresses in pair of multistandard serial communications and use method
CN203180949U (en) * 2013-03-27 2013-09-04 郑军 A bus communication system based on UARTs
CN104408000A (en) * 2014-12-05 2015-03-11 浪潮集团有限公司 Method for preventing conflict in health information read of BIOS (Basic Input Output System) and BMC (Baseboard Management Controller) on Feiteng server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090028259A (en) * 2007-09-14 2009-03-18 엘에스산전 주식회사 Apparatus and method for analysing communication state
CN101834912A (en) * 2010-04-20 2010-09-15 南京航空航天大学 Device for dynamically allocating slave addresses in pair of multistandard serial communications and use method
CN203180949U (en) * 2013-03-27 2013-09-04 郑军 A bus communication system based on UARTs
CN104408000A (en) * 2014-12-05 2015-03-11 浪潮集团有限公司 Method for preventing conflict in health information read of BIOS (Basic Input Output System) and BMC (Baseboard Management Controller) on Feiteng server

Also Published As

Publication number Publication date
CN106453383A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
CN106453383B (en) UART-based master-slave multi-machine communication system and method
CN102023953B (en) Control method of system having many inter-integrated circuit (I2C) buses
CN108111382B (en) Communication device based on I3C bus and communication method thereof
CN109558371B (en) Method for communicating with a microcontroller, and computing system
CN107832250B (en) Master-slave communication time sequence method based on SPI
CN113325768B (en) Communication control device and method of industrial control system and industrial control system
CN208477523U (en) A kind of arithmetic system and corresponding electronic equipment
CN108647180A (en) A kind of arithmetic system and corresponding electronic equipment
CN113626365A (en) Communication method based on SPI bus
CN102073611A (en) I2C bus control system and method
CN110069437B (en) RS-485 bus polarity self-adaption method based on response frame validity
CN113792003A (en) Single bus communication unit, system and method
CN112165422B (en) Automatic address matching method for one-master multi-slave temperature control system
CN111858459B (en) Processor and computer
KR101084060B1 (en) The data-transmittable non-polarity RS-485 communication device of BMS controller by automatic polarity discrimination
CN101882124B (en) RS422/485 double-use signal converter capable of automatically judging connector
CN216873219U (en) Communication circuit and multi-master communication system
CN107465487B (en) Bus data sending method, system and sub-equipment
CN209860929U (en) Communication bus structure
CN110096002A (en) A kind of automatization test system and test method based on CANFD bus
CN108494889B (en) Communication circuit based on I2C bus and debugging method
CN112148321B (en) Anti-interference upgrading system and method for automobile intelligent electronic equipment microcontroller
JP2015154260A (en) Information processing apparatus, and control method of information processing apparatus
CN113111021A (en) UART master-slave line communication control circuit and method
CN103412544A (en) Automation control method based on CAN buses

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant