【发布时间】:2019-01-25 05:22:14
【问题描述】:
谁能告诉我如何在使用 wish85 打开串行端口时停止 RTS 和 DTR 开启?
所附图片显示了轮流发生的情况。
当您在 C# 中使用 Visual Studio 打开串行端口时,这似乎不会发生。
在TCL,我用过
set com [open com7: w]
fconfigure $com -ttycontrol {DTR 0}
fconfigure $com -ttycontrol {RTS 0}
而在 C# 中它只是
SerialPort sp = new SerialPort("COM7", 300);
sp.Open(); // to open the port
【问题讨论】:
-
您是在 C# 中使用 RTS/CTS 流控制还是 XOn/XOff?能否展示一下如何在 C# 和 TCL 中打开串口。
-
Morning cup 我不知道如何正确地将代码放入 cmets 但在 tcl 中我使用过: set com [open com7: w] fconfigure $com -ttycontrol {DTR 0} fconfigure $com - ttycontrol {RTS 0} 在 C# 中它只是 SerialPort sp = new SerialPort("COM7", 300);然后你用 sp.Open(); 打开端口
-
我已经为您修改了您的问题。请检查那是你想要写的。
标签: serial-port tcl