与串口通讯 [英] Communicating with serial port

查看:76
本文介绍了与串口通讯的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是使用C ++的中级程序员.我目前有一个通过并行端口控制步进电机的程序,但是我希望在上面执行代码的笔记本电脑只有一个串行端口.

我猜想您不能只是购买用于串行->并行的适配器并以这种方式运行代码?

我听说串行端口的握手线可能是一个不错的选择,但是还没有弄清楚如何在编码中访问它们.

非常感谢您的帮助,

I am an intermediate programmer using C++. I currently have a program to control a stepper motor through a parallel port, but the laptop that I wish to execute my code on only has a serial port.

I am guessing you cannot just buy an adapter for serial->parallel and run the code that way?

I have heard that the handshaking lines of the serial port could be a good option, but have not figured out how to access them in the coding.

Thank you very much for your help,

推荐答案

您也将错了:

如果您要使用的是V +,并且您正在使用Windows,请通过
if all you want is V+ and you''re using Windows, have a look at using the DTR line thru EscapeCommFunction[^]


这篇关于与串口通讯的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆