将 AUBTM-23 蓝牙模块连接到 8051 微控制器
我正在做最后一年的项目,面临着通过移动设备(android)将数据发送到 AUBTM-23 蓝牙模块的问题,该模块有一个类似于 这个,串口连接到8051控制器。
当我尝试将模块连接到 PC 并从移动设备发送数据时,数据会在超级终端中正确读取,并显示以下信息:
OK
+CON1:1
data received from mobile device
+DCON:1
OK
+CON1:1--> 当移动应用程序尝试与模块连接时收到。
然后串行数据被传输,然后当应用程序断开连接时我得到 DCON。
但是当我将它与8051一起使用时,没有数据传输。
我搜索并发现模块被编程为发送这些标签(CON,DCON,OK),并且它被设计为嵌入到主机系统(我认为8051不是)需要电缆更换功能。
请问,模块可以连接到8051控制器吗?
串口真的需要主机吗?
我可以对额外标签(CON、DCON、OK)进行任何安排吗?
要串行连接 rs232 端口,我只使用 3 个引脚,其余 6 个引脚未连接,这会是一个问题吗?
I am doing my final year project and am facing a problem to send data through a mobile device (android) to a AUBTM-23 bluetooth module, which has a RS232 port something similar to this one, which is conected to a 8051 controller serially.
When I try connecting the module to PC and send data from mobile, the data is properly read in hyperterminal with following information:
OK
+CON1:1
data received from mobile device
+DCON:1
OK
+CON1:1-->received when mobile app tries connection with module.
Then the serial data gets transferred, then when the app disconnects I get DCON.
But when I use it with 8051, there is no data transfer.
I searched and found that module is programmed to send these tags(CON, DCON, OK) and also it is designed to be embedded in a host system (which i think 8051 is not) which requires cable replacement function.
SO, is it possible to connect the module to 8051 controller?
does a serial port really requires a host?
Can I make any arrangement for the extra tags (CON, DCON, OK)?
And to connect rs232 port serially, i am making use of only 3 pins and leaving the remaining 6 pins unconnected, could that be a problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用8051,UART,只需编写发送AT命令的代码,检查超级终端上的命令是否工作..然后将8051的TX RX连接到模块的RX Tx。请小心在模块的 Rx 线之间添加一个带有 10k 和 15k 电阻的分压器,因为它应该只接收 3.3 v,而 max232 将输出 5v。
它会起作用...
You can use 8051, UART , just write code for sending AT commands check those on hyperterminal whether they woring or not .. then connect TX RX of 8051 to RX Tx of ur module. Be careful to add a voltage divider with 10kand 15k resistors between Rx line of Module,as it should receive only 3.3 v and max232 will output 5v.
It will work...
8051 可用作 AUBTM-23 的主机
有多种情况可能会导致问题,并且需要附加信息才能正确诊断和排除故障。话虽这么说,以下信息可能会有所帮助。
您可能需要在 8051 之间使用 MAX232(或其他 TTL 到 RS232 电平转换器) AUBTM-23 设备上的 UART 引脚和 RS232 端口。否则,您可能†能够绕过RS232端口并将适当的8051 UART引脚直接连接到AUBTM-23上的UART引脚芯片。
†请注意,此选项取决于两个芯片使用的电压,并且可能需要额外的电路(例如电平转换器)
AUBTM-23数据表说该流量控制可以是RTS/CTS或无,并在工厂校准期间配置。当您将 AUBTM-23 连接到超级终端时,使用了哪种类型的流量控制?
如果您的 AUBTM-23 设备使用 RTS/CTS(硬件)流控制,您应该将 RTS 和 CTS 线连接到 8051 上的可用端口引脚,并添加适当的代码来处理握手。
如果您的 AUBTM-23 设备不使用流量控制,您应该能够使用最少的 3 线(TX、RX、GND)RS232 连接。
8051 can be used as a host for the AUBTM-23
There are several conditions that could be causing problems and additional information is necessary to correctly diagnose and troubleshoot them. That being said, the following information might be of some assistance.
You might need a MAX232 (or other TTL to RS232 level converter) between the 8051 UART pins and the RS232 port on the AUBTM-23 device. Otherwise, you may† be able to bypass the RS232 port and connect the appropriate 8051 UART pins directly to the UART pins on the AUBTM-23 chip.
† note that this option depends on the voltages used by both chips and additional circuitry (e.g. level shifter) may be required
The AUBTM-23 datasheet says that flow control can be either RTS/CTS or None and is configured during factory calibration. When you connected the AUBTM-23 to HyperTerminal, what type of flow control was used?
If your AUBTM-23 device uses RTS/CTS (hardware) flow control, you should connect the the RTS and CTS lines to available port pins on the 8051 and add the appropriate code to handle the handshaking.
If your AUBTM-23 device does not use flow control, you should be able to use a minimal 3-wire (TX, RX, GND) RS232 connection.