摘要
基于Matlab的串口通信机制,简要介绍了查询方式下的非实时通信,提出一种将事件中断写入GUI组件函数的方式,相对于改写instrcallback函数实现串口中断机制的实时通信方式,大大简化了中断方式实现实时通信的过程,并详述了三者的差异和实现过程。利用Matlab的GUI工具和内置的串口通信API,设计了一个可视化的串口通信界面,通过蓝牙串行接口,实现智能车系统采集数据的实时接收,并利用Matlab强大的科学计算功能,对数据进行实时处理,图形化显示数据处理结果。实验结果表明,该方法可行,具有一定的应用价值。
Based on Matlab's serial interface communication mechanism, this paper introduces non real-time communication on the inquiry mode and puts forward a kind of real-time communication method relative to rewrite instrcallback function in order to achieve the mecha- nism of the serial port interrupt, thus greatly simplifying the process of realizing the real-time communication through interruption. Mo- reover, it also discusses the difference and implementation process of the three in detail. Using Matlab's GUI tool and built-in serial in- terface communication API, it designs and exploits a visual interface of serial interface communication. Through Bluetooth serial ports, it receives data by intelligent vehicle system in time. Furthermore, it uses the strong scientific computing functions of Matlab to handle real-time data and graphically display the results. The experimental results show the feasibility and certain application value of the method.
出处
《单片机与嵌入式系统应用》
2012年第12期27-30,共4页
Microcontrollers & Embedded Systems