USB到UART通信 [英] USB to UART communication

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

问题描述

我们正在尝试使用 UFT230XA(FTDI模块)将USB连接到UART(串行)。我们成功地在PC(Windows XP-SP2)端进行了环回。我们还将通信PC连接到UART ,但问题是我们从UART端的PC获取相同的数据,而在PC上从UART获取数据。



例如,我们发送''A''(使用byte []或string)到UART我们得到十六进制值0x5F(ASCII char _)。我们再次得到相同的值没有垃圾。



任何帮助都是非常感谢!

提前谢谢。

As we are trying to communicate USB to UART(serial) using UFT230XA (FTDI module).We successfully did loopback at PC(Windows XP-SP2) side.We also did communication PC to UART,but the problem is we are getting same data from PC at UART side nor data from UART at PC.

For example, as we sent ''A''(using byte[] or string) to UART we are getting hex value 0x5F(ASCII char _).Also we are getting same value again no garbage.

Any help is much appreciated!
Thanks in advance.

推荐答案

没有你的代码,我们无法确定,但我会先看看您的通信设置 - 确保您的波特率匹配,每个字符的位数,奇偶校验和停止位也是正确的。我也会尝试从一台PC连接到另一台,以确认您使用的是正确的端口,并且您的基于PC的软件可以工作(假设您没有协议分析仪,您可以拍线,或者至少是示波器)

然后确认UART端的设置正是您的预期。如果其中任何一个出局,你就会得到垃圾。
Without your code, it is impossible to be sure, but I would start by looking at your communication setup - make sure that your baud rate matches, your bits per character, parity and stop bits are correct also. I would also try wiring from one pc to another to confirm you are using the right port and that your PC based software works (assuming you don''t have a protocol analyser you can slap on the wires, or at a minimum an oscilloscope)
Then confirm the setting at the UART end is exactly what you expected. If any of these are out, you will get garbage.


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

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