RS232 Arduino的问题 [英] Rs232 arduino issue

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

问题描述

我对的Arduino UNO有点混乱。我用Serial.print(HI),则喜出现code将其串行监视器上。我也用它连接引脚1和0的Arduino的正确RS232 / TTL转换器。
然后,我意识到,当serial.print(HI)第一次工作中的数据要通过USB电缆。但我想要的数据要经过TX RX引脚这是1和0。
 但是,当我从串口监听输入一些数据,RS232 / TTL将工作和一些数据将被sended?
我不明白的情况?

I have a little confusing about arduino uno. I use Serial.print("hi") code then it "hi" appears on the serial monitor. I also use rs232/ttl converter which are connected pin 1 and 0 on the arduino properly. Then I realize that when serial.print("hi") working the data first is going through usb cable. But I want the data has to go through tx rx pins which are 1 and 0. But when I enter some data from serial monitor , rs232/ttl will work and some data will be sended ? I do not understand the situation?

为什么发生这种情况?我只是想通过RS232 / TTL转换器从引脚1和0发送的数据。
我该怎么办呢?我不使用USB电缆发送DATAS。

Why this is happening ? I just want to sent a data from pin 1 and 0 using rs232/ttl converter. How can I do that ? I do not use usb cable to sent datas.

推荐答案

如果你看到的数据,并到您的PC来默认USB端口,那么你正在使用引脚0和1。
如果你正确地连接一个extenal converster,你应该能够准确地读取同样的事情,如果不是,连接错了。经典的错误是切换TX和RX,因为他们必须交叉。

If you see the data coming from and to your PC by default USB port, then you ARE using pin 0 and 1. If you correctly connect an extenal converster, you should be able to read exactly the same thing, if not, connection are wrong. Classic error is to switch TX and RX, as they have to be crossed.

此外remeber的RS232不支持多个主机,但一般不提供任何问题,如果其他主机只是读书,因为他们会简单地嗅出连接。

Also remeber that RS232 does not support multiple host, but normally give no problem if the "others host" are just reading, as they will simply sniff the connection.

这篇关于RS232 Arduino的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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