节点文献

单片机与Internet网络的通信应用研究

The Research of Communication between MCU and Internet

【作者】 刘建超

【导师】 卢洪武;

【作者基本信息】 山东师范大学 , 教育技术学, 2007, 硕士

【摘要】 随着计算机通信技术、电子信息技术和多媒体技术的飞速发展,Internet网络日益成为人们日常生活中必不可少的工具。信息家电、智能化仪表等需要与Internet网络连接的非PC设备越来越多。就目前来看,在非PC设备中,大约有50%左右的是8位的微处理器。若想实现这些设备与Internet网络的通信,必须扩展8位微处理器的网络功能。本文提出了单片机与Internet网络通信的一种具体实现方案。鉴于8位小型微型单片机系统的广泛应用,在深入学习了解了高性能的32位单片微处理器与Internet网络的通信应用之后,选择目前较为流行的八位单片机和以太网控制芯片构成单片机网络通信系统,并在此基础上成功的将经过裁剪的TCP/IP协议移植到系统中,在此基础上设计并实现了嵌入式webserver应用:客户端通过浏览器中的网页实时操纵单片机应用系统LED小灯的亮灭。由于8位单片机的内部资源有限,根据其自身特点和实际应用的需要,必须对TCP/IP协议进行适当的裁剪。本系统在设计过程中,选择了TCP/IP协议各层最具代表性的协议,并对其进行裁剪,将裁减后的协议移植到系统中后,经实验证明系统运行良好,达到了预期的目的。论文首先根据需要,设计以太网接口电路,编写以太网驱动程序;对TCP/IP协议进行适当裁减,以适应8位单片机内部资源,并进行移植;实现了webserver应用,通过对HTTP协议分析,在单片机内部实现了HTTP协议,并用HTML语言编写web页面,把网页保存到单片机内部的ROM中,通过Internet explorer浏览器可以远程访问网页,并实现对系统的实时监控、操纵。根据webserver应用在单片机中实现的具体需求,设计摒弃了嵌入式实施操作系统,直接实现了TCP/IP协议,大大缩短了开发的时间;本文最大的特点是在8位单片机中实现了webserver应用,对单片机系统的控制和监测变得简便、直观。使用HTML语言编写了网页,并将源代码以字符数组的形式存储在单片机的EEPROM中,读取时可以以访问数组的形式访问代码,巧妙地绕过了操作系统对文件读取的限制,并且提高了系统的运行效率。以单片机为核心的小型微型嵌入式系统必将在教育领域得到广泛应用。目前,高校信息资源建设正如火如荼,软件信息资源的共享,使得教育极大的便利化,教育投资的效益迅速提高。但是,硬件资源难以共享。有了嵌入式技术的支持,在精密仪器中植入小型的嵌入式芯片,就可以通过操作嵌入到单片机内部的web页面的按钮,远程实时操纵仪器,并通过单片机采集数据,传输到本地计算机,并且用浏览器将信息图文并茂的显示,可以方便的得到实验数据。实现校园硬件设备的共享,可以大大节省人力物力,具有极大的经济效益,对教育信息化发展具有积极的推动作用。

【Abstract】 With the rapid development of computer communication technology, electronics and information technology and multimedia technology, internet increasingly becoming an essential tool for people’s daily life. More and more non-PC equipment, such as intelligent instruments and information appliance, need to connect to the Internet.Judging from the present situation, about 50% of the non-PC equipment is the 8-bit microprocessor. If we wish to achieve these communications between equipment and the internet, we must expand the network functions of 8-bit microprocessor.This thesis point out a concrete realization program of the communication between the internet and the MCU. In view of the wide application of 8-bit MCU , by the in-depth study and understanding of high-performance 32-bit single-chip microprocessor and the communication to the Internet, choosing the best and most popular ethernet controller chip and the 8-bit MCU to make network communication system, successful transplant the tailored TCP/IP agreement to the system, and implement the embedded webserver applications on the basis of the design: through the browser, client could real-time manipulate the small LED lights based on the MCU application system.Due to the limited resource of 8-bit MCU, according to its own characteristics and application needs, we must tailor the TCP agreement properly. In the system design process, select the most representative protocol of each layer of TCP agreement and tailor it for need and transplant the agreement to the system, the experiment proves that the system operates well and achieves the desired results.Firstly, design the ethernet interface circuit and compile the ethernet driver program; tailor the TCP/IP agreement appropriately to meet the 8-bit MCU internal resources and transplant it to the system; achieve the web server application, realize the HTTP protocol based on the analysis of it and write the web page using HTML, save it to the internal ROM of the MCU. Then we can remote browse the homepage via Internet Explorer and realize the real-time monitoring and control. According to the specific needs of the achieve of web server application to microprocessor, abandon the Embedded operating system and direct realize the TCP/IP protocol what greatly shorten the development time; The greatest feature of this thesis is to achieve the web server application in 8-bit microcontroller. So the control and monitoring of the MCU system becomes simple and intuitive. Compile the web page using HTML language. store the source code in the form of array characters to the EEPROM, and can visit in the form of array cleverly circumvented the restrictions of reading the document of the retrieval system and enhance the operational efficiency of the system.Embedded microprocessor systems with the core of MCU will be widely applied in the field of education. At present, the University’s Information Resources Construction is in full swing, and the sharing of software information resources enables great facilitation and rapidly improves the efficiency of investment in education. However, the sharing of hardware resources is difficult. With embedded technology, implant the small embedded chips to the precision instruments ,through the operate of the buttons on the website planted in the MCU and remote operate the equipment, then get data by the MCU and transport it to the local computer and show the information on the browser via many methods. Experimental data can be got conveniently. Share the hardware equipment can greatly reduce the human and material resources and has great economic benefit, has a positive role in promoting the information technology in the field of education.

【关键词】 TCP/IP协议Internet网络单片机web server
【Key words】 TCP/IP protocolInternet networkMCUweb server
  • 【分类号】TP368.12;TP393.03
  • 【被引频次】11
  • 【下载频次】1516
节点文献中: 

本文链接的文献网络图示:

本文的引文网络