RtsEnable 或 DtrEnable 属性是否发送信号?

Does RtsEnable or DtrEnable properties send a signal?(RtsEnable 或 DtrEnable 属性是否发送信号?)
本文介绍了RtsEnable 或 DtrEnable 属性是否发送信号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如果我把这些放在我的代码中,计算机是否会向设备发送任何类型的信号?

I want to know if I put these in my code, does computer send any kind of signal to the device?

SerialPort myport = new SerialPort("COM1");

myport.DtrEnable = true;
myport.RtsEnable = true;

我需要在特定引脚上向设备发送信号.我知道 Dtr 和 Rts 使用引脚 4 和 7.所以当我编写上面的代码时,我的计算机会在引脚 4 和 7 上发送信号吗?还是有一种简单的方法可以在特定引脚上发送信号?

I'm required to send a signal on specific pins to the device. As I know Dtr and Rts use pins 4 and 7. So when I write the code above, will my computer send a signal on pins 4 and 7? Or is there a simple way to send a signal on a specific pin?

推荐答案

理论上:是的.无论您连接到串行端口的什么,都会看到一些东西.它不会是数据,但如果它正在检查它的引脚状态,它就会知道你做了什么.

In theory: Yes. Whatever you have connected to your serial port will see something. It won't be data, but if it is checking its pin states, it will know that you have done something.

在实践中:也许.能否准确检测这些引脚状态在很大程度上取决于所使用的电缆.这是最近的帖子 讨论了与这些引脚状态相关的电缆问题.

In practice: Maybe. Being able to accurately detect these pin states is heavily dependent on the cable being used. Here is a recent post that goes over the cable related issues with these pin states.

这篇关于RtsEnable 或 DtrEnable 属性是否发送信号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)