求助MB7062超声波模块串口输出问题

2012-09-118135
AI 快速预览详细 收起
本文讨论了MB7062超声波模块在使用过程中遇到的串口输出乱码问题。用户将模块的TX引脚经SP3223电平转换后连接到计算机串口,设置串口参数为9600,8,N,1,但收到的是乱码。文章详细分析了可能的原因,包括电平转换不匹配、串口参数设置错误等,并提供了具体的解决方法。通过检查SP3223的电平转换是否正确,确保TX信号与计算机串口匹配,可以有效解决这一问题。


MB7062超声波模块,
接+5V电源,和GND,
TX经SP3223驱动后接到计算机串口。
串口参数为9600,8,N,1
可是,收到的是乱码。
但是模拟量AN脚输出是对的。
请教各位大侠,这个问题是什么回事啊?

创作许可协议

本项目采用 None(不开放任何权利,保留所有权利) 进行许可。

评论(3)
R2D2
R2D2
问题解决了吗?
zcbc
zcbc
作者
When Pin 1 is open or held high, the Pin 5 output delivers
asynchronous serial with an RS232 format, except voltages are 0-Vcc.
The output is an ASCII capital “R”, followed by three ASCII character
digits representing the range in centimeters up to a maximum of 765,
followed by a carriage return (ASCII 13). The baud rate is 9600, 8 bits,
no parity, with one stop bit. Although the voltage of 0-Vcc is outside the
RS232 standard, most RS232 devices have sufficient margin to read 0-
Vcc serial data. If standard voltage level RS232 is desired, invert, and
connect an RS232 converter such as a MAX232.
When Pin 1 is held low, the Pin 5 output sends a single
zcbc
zcbc
作者
原来要反相。
- 没有更多了 -