轮机模拟器I/O单元远程升级设计
2016-10-12王德龙王冬捷姜瑞政
王德龙, 王冬捷, 姜瑞政
(大连海事大学 轮机工程学院, 辽宁 大连 116026)
轮机模拟器I/O单元远程升级设计
王德龙, 王冬捷, 姜瑞政
(大连海事大学 轮机工程学院, 辽宁 大连 116026)
P89V51RD2单片机通过驱动网络芯片W5100实现与以太网的联系。借助在应用中编程(In-Application Programming, IAP)的功能,实现在运行中对轮机模拟器I/O单元程序的读取、擦除和烧写。在计算机上用MATLAB的图形用户界面(Graphical User Interface, GUI)设计远程主机升级界面,创建网络端口;通过以太网发送HEX可执行文件,实现对轮机模拟器I/O单元运行程序的远程升级。
船舶工程; 轮机模拟器; 单片机; 以太网; 在应用中编程(IAP); 图形用户界面(GUI)
Abstract: The microcontroller P89V51RD2 drives the network chip W5100 to achieve the Ethernet connection, which makes it possible that one read, erase and program the code when the microcontroller program is running by means of the In-Application Programming (IAP). The remote host update interface is developed with MATLAB Graphical User Interface (GUI) on a PC. A network port to send HEX records via the Ethernet network is created. This design allows the input and output unit microcontroller programs of the marine engine room simulator to be updated remotely.
Keywords: ship engineering; marine engine room simulator; microcontroller; Ethernet; IAP; GUI
随着大连海事大学轮机自动化实验室开发的全任务轮机模拟器逐渐在各个实训基地推广和改进,为方便后续升级维护,对其使用的板卡(轮机模拟器I/O单元)进行远程升级成为亟待解决的问题。
传统的单片机编程方式是在焊接到印刷电路板之前使用并行烧写器将代码烧写到Flash中;现在单片机已实现在线编程技术(In System Programming, ISP),即单片机焊接到印刷电路板之后,通过串口线,配合计算机中专用的烧写软件将程序烧写到单片机的Flash中。但是,若要随时对分布在各地的轮机模拟器I/O单元的程序进行升级维护,上述2种方式都无法实现。轮机模拟器I/O单元远程程序升级设计就是在该需求下提出的,通过在单片机的外围电路中加入集成有硬件TCP/IP协议栈的网络芯片W5100,使单片机与以太网建立连接;利用在应用中编程(In-Application Programming, IAP)功能将从远程主机发送来的新程序数据烧写到单片机的Flash中重新编程,即可实现单片机的远程升级操作。……
