半双工串行连接有什么含义?

时间:2022-08-26 19:54:03

What are the implications of using a half-duplex serial connection versus a full-duplex one? What happens if both sides try sending data at the same time? Do you end up with corrupt data arriving on both ends? Does flow-control help you with this?

使用半双工串行连接与全双工串行连接有什么影响?如果双方同时尝试发送数据会怎样?你最终到达两端的腐败数据吗?流量控制可以帮助您吗?

2 个解决方案

#1


On the line the data will be garbled, which may or may not lead to devices receiving the garbled data. Sometimes this will be used to detect that the transmission failed due to a collision.

在线上数据将是乱码,这可能会或可能不会导致设备接收乱码数据。有时,这将用于检测传输因碰撞而失败。

Normally you wouldn't use half-duplex in the same way as full-duplex to send single characters in asynchronous mode. Rather you'd use some packet protocol which determines who has the right to send at which times, and which includes some checksum (usually a CRC) to detect corruption.

通常,您不会以与全双工相同的方式使用半双工来在异步模式下发送单个字符。相反,你会使用一些数据包协议来确定谁有权在哪些时间发送,并且包括一些校验和(通常是CRC)以检测损坏。

Flow control doesn't help much for this. It's purpose is to ensure that the receiver is not overrun by to much data. There is software flow control which uses the ASCII characters XON and XOFF to start and stop transmission, and hardware flow control which uses the RTS (Request To Send) and CTS (Clear To Send) control lines. XON/XOFF-style software flow control won't work with half duplex.

流量控制对此没有多大帮助。它的目的是确保接收器不会被大量数据占用。软件流控制使用ASCII字符XON和XOFF来启动和停止传输,硬件流控制使用RTS(请求发送)和CTS(清除发送)控制线。 XON / XOFF型软件流控制不适用于半双工。

These days you don't see half duplex with ordinary RS-232 and modems (I used it with acoustic couplers in the eighties, it was rare even then). But it is common for RS-485, which is used in industrial control with various protocols. There are also many other data transmission standards which operate in a half-duplex way, mostly when there are more than two devices attached to the same line (ancient 10base2 Ethernet, CAN, LIN, FlexRay, I2C, ...).

这些天你没有看到普通RS-232和调制解调器的半双工(我在八十年代使用它与声学耦合器,它甚至很少见)。但它通常用于RS-485,它用于各种协议的工业控制。还有许多其他数据传输标准以半双工方式运行,主要是当同一线路上连接两个以上的设备时(古老的10base2以太网,CAN,LIN,FlexRay,I2C ......)。

#2


My God, where did you find a half-duplex line in this day and age?

我的上帝,你在哪里找到了这个时代的半双工线?

Anyway, the answer is that if both ends drive the line, it gets all confused. For this reason, there are specified ASCII characters lie Clear to Send and Data Terminal Ready (CTS and DTR) that are used to make a handshake. See this tutorial for more.

无论如何,答案是,如果两端都驱动线路,那么它就会变得混乱。因此,指定的ASCII字符为清除发送和数据终端就绪(CTS和DTR),用于进行握手。有关更多信息,请参阅本教

Augh, I should have gone to bed. Tutorial right, me stoopid.

啊,我应该去睡觉了。教程对,我是stoopid。

#1


On the line the data will be garbled, which may or may not lead to devices receiving the garbled data. Sometimes this will be used to detect that the transmission failed due to a collision.

在线上数据将是乱码,这可能会或可能不会导致设备接收乱码数据。有时,这将用于检测传输因碰撞而失败。

Normally you wouldn't use half-duplex in the same way as full-duplex to send single characters in asynchronous mode. Rather you'd use some packet protocol which determines who has the right to send at which times, and which includes some checksum (usually a CRC) to detect corruption.

通常,您不会以与全双工相同的方式使用半双工来在异步模式下发送单个字符。相反,你会使用一些数据包协议来确定谁有权在哪些时间发送,并且包括一些校验和(通常是CRC)以检测损坏。

Flow control doesn't help much for this. It's purpose is to ensure that the receiver is not overrun by to much data. There is software flow control which uses the ASCII characters XON and XOFF to start and stop transmission, and hardware flow control which uses the RTS (Request To Send) and CTS (Clear To Send) control lines. XON/XOFF-style software flow control won't work with half duplex.

流量控制对此没有多大帮助。它的目的是确保接收器不会被大量数据占用。软件流控制使用ASCII字符XON和XOFF来启动和停止传输,硬件流控制使用RTS(请求发送)和CTS(清除发送)控制线。 XON / XOFF型软件流控制不适用于半双工。

These days you don't see half duplex with ordinary RS-232 and modems (I used it with acoustic couplers in the eighties, it was rare even then). But it is common for RS-485, which is used in industrial control with various protocols. There are also many other data transmission standards which operate in a half-duplex way, mostly when there are more than two devices attached to the same line (ancient 10base2 Ethernet, CAN, LIN, FlexRay, I2C, ...).

这些天你没有看到普通RS-232和调制解调器的半双工(我在八十年代使用它与声学耦合器,它甚至很少见)。但它通常用于RS-485,它用于各种协议的工业控制。还有许多其他数据传输标准以半双工方式运行,主要是当同一线路上连接两个以上的设备时(古老的10base2以太网,CAN,LIN,FlexRay,I2C ......)。

#2


My God, where did you find a half-duplex line in this day and age?

我的上帝,你在哪里找到了这个时代的半双工线?

Anyway, the answer is that if both ends drive the line, it gets all confused. For this reason, there are specified ASCII characters lie Clear to Send and Data Terminal Ready (CTS and DTR) that are used to make a handshake. See this tutorial for more.

无论如何,答案是,如果两端都驱动线路,那么它就会变得混乱。因此,指定的ASCII字符为清除发送和数据终端就绪(CTS和DTR),用于进行握手。有关更多信息,请参阅本教

Augh, I should have gone to bed. Tutorial right, me stoopid.

啊,我应该去睡觉了。教程对,我是stoopid。