课程设计课程名嵌入式软件开发技术题目基于嵌入式Linux的温度监测系统的设计与实现专业计算机科学与技术(嵌入式系统方向)班级13计算机嵌入式系统班学号学生姓名2016年6月I摘要温度是个很普遍而又非常重要的参数,在日常生活、工农业生产以及科研领域都有着广泛的应用。因此,研制能够准确地测量和记录这个参数值的系统具有十分重要的意义。基于ARM的嵌入式温度监测系统是采用嵌入式Linux作为操作系统,针对以S5PV210为处理器的开发板设计的一个嵌入式温度监测系统。论文在分析了Linux设备驱动程序的基本工作原理基础上,讨论了开发中经常会碰到的中断处理、拥塞处理、I/O端口,并在此基础上实现了基于S5PV210嵌入式处理器的开、读、写、关外部RAM的字符设备驱动和网络驱动。结合高精度温度传感器DS18B20,实现温度的正确采集,并通过以太网络将数据上传给上位机客户端。论文首先介绍了通信网络中各种设备特性、总线结构及传输技术,然后根据单片机与PC机之间的串行通信原理,用ubantu完成温度监测系统的软件设计与实现,为用户提供一个友好的人机界面,对监测系统进行控制并显示采集后的数据。本系统还通过多线程实现了多个客户端与服务器的通信。关键词:S5PV210;嵌入式Linux操作系统;DS18B20;网络编程IIAbstractTemperatureisaverycommonandveryimportantparameter,indailylife,industrialandagriculturalproductionandscientificresearchfieldshaveawiderangeofapplications.Therefore,itisveryimportanttodevelopasystemthatcanaccuratelymeasureandrecordthevalueofthisparameter.ThetemperaturemonitoringsystemofbaseontheARMisuseofembeddedLinuxastheoperatingsystemfortheprocessortoS5PV210developmentboarddesignedforanembeddedtemperaturemonitoringsystem.BasedontheanalysisofthebasicworkingprinciplebasedontheLinuxdevicedriversdiscusseddevelopmentoftenencounterinterrupthandling,congestionhandling,I/Oports,andonthisbasistoachievetheembeddedprocessorbasedonopenS5PV210reading,writing,charactersofftheexternalRAMdevicedriverandnetworkdrives.CombinedwithprecisiontemperaturesensorDS18B20,toachievethecorrecttemperatureacquisition,anduploadthedataviaEthernettoaPCclient.Atfirst,thepaperintroducesthecharacteristicsofvariousdevicesinacommunicationnetwork,thebusstructureandtransmissiontechnology,andaccordingtotheprincipleofserialcommunicationbetweenSCMandPC,withubantucompletetemperaturemonitoringsystemsoftwaredesignandimplementation,toprovideuserswithafriendlyman-machineinterface,themonitoringsystemtocontrolanddisplaythedataaftercollection.Thesystemalsoenablescommunicationviaapluralityofmulti-threadedclientandtheserver.Keywords:S5PV210;embeddedLinuxoperatingsystem;DS18B20;Networkprogramming11.引言.......................................................................................................................................21.1设计背景及意义...............................................................................................................21.2设计的主要内容................................................................................................................22.相关技术...............................................................................................................................32.1嵌入式Linux......................................................................................................................32.2S5PV210.............................................................................................................................32.3socket网络编程..............................................................................................................43.具体实现功能.......................................................................................................................53.1总体框架图........................................................................................................................53.2客户端功能.......................................................................................................................53.3服务器功能........................................................................................................................53.4实验板输出信息...............................................................................................................64.具体实现过程.......................................................................................................................74.1交叉编译工具的安装.......................................................................................................74.2客户端模块的设计...........................................................................................................84.3服务器模块.......................................................................................................................94.4LED点亮模块..................................................................................................................114.5温度感应模块.................................................................................................................125.测试结果分析.....................................................................................................................155.1各模块运行的效果.........................................................................................................155.2可扩展功能......................................................................................................................166.总结与展望.......................................................................................................................172第一章引言1.1设计背景及意义温度作为工业、农业、国防和科研等部门最普遍的测量项目。它在工农业生产、现代科学研究以及高新技术开发过程中也是一个极其普遍而又非常重要的参数。因此,在这些领域中,对于这个参数的测量与控制就显得尤为重要,特别是在纺织工业、冶金、化工、食品、温室种植,汽车制造以及气象预报和科研实验室等许多地方,都具有举足轻重的作用。以往这些工作大多是由人工完成,不但工作量大,记录的数据少,对温度的调节缺乏实时性,而且电路复杂,标定和校准也比较麻烦,难以满足现代温度测量的要求[1]。自从传感器技术、微控制器技术和计算机技术日渐成熟之后,现代的温度测量