c# - 有没有办法以 2-3 mbps 的速度使用串行端口?

标签 c# serial-port

我需要以 2-3 mbps 的速度将串行数据传入和传出 C# Windows PC 应用程序。 C# winforms 似乎对此不太满意。

openFileDialog.Filter =
    @"Image Files(*.bmp;*.jpg;*.jpeg;*.gif)|*.bmp;*.jpg;*.jpeg;*.gif|All files (*.*)|*.*";
if (openFileDialog.ShowDialog() != DialogResult.OK) return;
var image = Image.FromFile(openFileDialog.FileName);
serialPort1.Open();
// Now send the image at 2-3 mbps
...

BaudRate = 115200 有效。 BaudRate = 230400 导致 System.IO.IOException。

enter image description here

最佳答案

打开设备管理器并展开“端口”。

enter image description here

双击 COM1 并转到“端口设置”​​选项卡

enter image description here

在“每秒位数”下列出了您可以在 com 端口的属性字段中输入的值。如果您想要高于硬件允许的水平,则需要其他硬件或使用串行端口以外的其他东西在两个设备之间进行传输。

如果您在评论中发布您正在连接的其他设备是什么,我们可能会建议更好的方法。

关于c# - 有没有办法以 2-3 mbps 的速度使用串行端口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6363504/

相关文章:

c# - 在 C# Web API 的 Controller 中隐藏模型类成员?

linux - 在 Linux 中启用串行端口 ttyS2 和 ttyS3

linux - Linux 中的串口

c# - Automapper 自定义解析器

c# - .Net 中的 LDAP 目录条目 - 不适用于 OU=Users

boost - 如何确定是否有字节可从 boost :asio:serial_port 读取

objective-c - 读取串口iOS

serial-port - 使用mozilla平台开发桌面应用

c# - 在 C# 中 int 和 char 之间的转换错误

c# - 你能启动一个应用程序 C# 所以它不需要 .NET