{"title":"固件设计和开发MCU与Matlab-Simulink接口,用于实时测量、分析和控制应用","authors":"S. Nuratch","doi":"10.1109/ECTICON.2016.7561476","DOIUrl":null,"url":null,"abstract":"This research describes the design and development of firmwares for microcontroller and computer (Matlab-Simulink) interfacing techniques. The firmwares are particularly designed and implemented for real-time measurement, analysis and control applications. They are developed with C language to archive better performance. A C-file of the microcontroller is compiled by the XC16 compiler to generate a HEX-file. While a C-file of the Matlab-Simulink is written as standard s-function of the Matlab and then compiled by Visual Studio 2013 using MEX command in Matlab workspace to generate a MEX-file. A Matlab-Simulink application uses the MEX-file as a core function for exchanging data with the microcontroller. Both of the firmwares are implemented based on Event-driven and Queue-driven techniques to maintain real-time ability and to guarantee that all data flowing over UART (RS-232) are transmitted, received and processed on time. To test and evaluate the firmwares, we develop 4-Channel Data Acquisition (DAQ) and 4-Channel PWM Signal Generator (PSG) running on the microcontroller. And in the Matlab-Simulink, an application for visualizing the signals of the DAQ and controlling the signals of the PSG is developed. The experimental results obviously show that the firmwares can be used for computer-based measurement, analysis and control applications properly.","PeriodicalId":200661,"journal":{"name":"2016 13th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (ECTI-CON)","volume":"97 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2016-09-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":"{\"title\":\"Firmware design and development of MCU and Matlab-Simulink interfacing for real-time measurement, analysis and control applications\",\"authors\":\"S. Nuratch\",\"doi\":\"10.1109/ECTICON.2016.7561476\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"This research describes the design and development of firmwares for microcontroller and computer (Matlab-Simulink) interfacing techniques. The firmwares are particularly designed and implemented for real-time measurement, analysis and control applications. They are developed with C language to archive better performance. A C-file of the microcontroller is compiled by the XC16 compiler to generate a HEX-file. While a C-file of the Matlab-Simulink is written as standard s-function of the Matlab and then compiled by Visual Studio 2013 using MEX command in Matlab workspace to generate a MEX-file. A Matlab-Simulink application uses the MEX-file as a core function for exchanging data with the microcontroller. Both of the firmwares are implemented based on Event-driven and Queue-driven techniques to maintain real-time ability and to guarantee that all data flowing over UART (RS-232) are transmitted, received and processed on time. To test and evaluate the firmwares, we develop 4-Channel Data Acquisition (DAQ) and 4-Channel PWM Signal Generator (PSG) running on the microcontroller. And in the Matlab-Simulink, an application for visualizing the signals of the DAQ and controlling the signals of the PSG is developed. The experimental results obviously show that the firmwares can be used for computer-based measurement, analysis and control applications properly.\",\"PeriodicalId\":200661,\"journal\":{\"name\":\"2016 13th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (ECTI-CON)\",\"volume\":\"97 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2016-09-08\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"2\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2016 13th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (ECTI-CON)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ECTICON.2016.7561476\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2016 13th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (ECTI-CON)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ECTICON.2016.7561476","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2
摘要
本研究描述了单片机和计算机(Matlab-Simulink)接口技术的固件的设计和开发。这些固件是专门为实时测量、分析和控制应用而设计和实现的。它们是用C语言开发的,以获得更好的性能。单片机的c文件由XC16编译器编译生成hex文件。而Matlab- simulink的c文件则是作为Matlab的标准s函数编写,然后在Matlab工作空间中使用MEX命令通过Visual Studio 2013进行编译,生成MEX文件。Matlab-Simulink应用程序使用mex文件作为与微控制器交换数据的核心功能。这两种固件都是基于事件驱动和队列驱动技术实现的,以保持实时能力,并保证通过UART (RS-232)传输的所有数据都能及时发送、接收和处理。为了测试和评估固件,我们开发了运行在微控制器上的4通道数据采集(DAQ)和4通道PWM信号发生器(PSG)。并在Matlab-Simulink中开发了一个用于显示DAQ信号和控制PSG信号的应用程序。实验结果表明,该软件可以很好地应用于基于计算机的测量、分析和控制。
Firmware design and development of MCU and Matlab-Simulink interfacing for real-time measurement, analysis and control applications
This research describes the design and development of firmwares for microcontroller and computer (Matlab-Simulink) interfacing techniques. The firmwares are particularly designed and implemented for real-time measurement, analysis and control applications. They are developed with C language to archive better performance. A C-file of the microcontroller is compiled by the XC16 compiler to generate a HEX-file. While a C-file of the Matlab-Simulink is written as standard s-function of the Matlab and then compiled by Visual Studio 2013 using MEX command in Matlab workspace to generate a MEX-file. A Matlab-Simulink application uses the MEX-file as a core function for exchanging data with the microcontroller. Both of the firmwares are implemented based on Event-driven and Queue-driven techniques to maintain real-time ability and to guarantee that all data flowing over UART (RS-232) are transmitted, received and processed on time. To test and evaluate the firmwares, we develop 4-Channel Data Acquisition (DAQ) and 4-Channel PWM Signal Generator (PSG) running on the microcontroller. And in the Matlab-Simulink, an application for visualizing the signals of the DAQ and controlling the signals of the PSG is developed. The experimental results obviously show that the firmwares can be used for computer-based measurement, analysis and control applications properly.