LPC2478远程温度监控

2019-03-03 18:38

桂林电子科技大学毕业设计(论文)报告用纸 第 1 页 共 56 页

摘 要

随着通讯技术、网络技术和半导体技术的飞速发展,嵌入式系统接入网络已成为其应用的一个重要方向。越来越多的嵌入式系统选择Web 服务器的方式与Internet 进行数据交换。而以太网是构筑现代Internet 网络的基础,因此选择基于以太网的嵌入式Web 服务器技术实现数据交换将具有较高的实用价值。温度是程控机房、档案室、图书馆、农业生产基地等众多场所需要实时监控的一个重要物理量。温度监控系统在实际生活中有着重要的作用。本文主要针对ARM7TDMI核的微处理器芯片,结合嵌入式Web 服务器技术,提出了基于以太网的远程温度监控系统的设计方案。该方案成功的实现了温度采集和控制的网络化。

本设计采用的是丰宝公司的LINPO-PS LPC_2478实验板,进行远程温度监控系统研究,该板采用了恩智浦公司基于ARM7TDMI-S内核、单电源供电、LQFP208封装的LPC2478,具有JTAG仿真调试,ISP编程等功能。

uClinux是应用于微控制领域的一种嵌入式Linux操作系统,它源码开放,移植性好,支持多种硬件平台和几乎所有常见网络通信协议,支持文件系统丰富,是一个功能完整的嵌入式操作系统。并且有大量优秀的开放源代码的应用软件和开发工具可用,因此,采用μClinux作为操作平台,使用Web技术进行远程在线监测系统的开发。

Boa是一个高性能的单任务型Web服务器,可以运行在几乎所有的类Unix的平台上,Boa支持认证,支持CGI,功能比较全,占用资源也少,非常适合于用在资源有限的嵌入式系统中,目前Boa已经以源码的形式包含在uClinux的发行包中。所以本设计采用uClinux和boa服务器可以较好的满足本次设计要求。

关键词:远程温度系统;AMR7;LPC2478;u-boot;uClinux;nand flash;nor flash;dp83848;ds18b20;cgi;boa;web;

1

桂林电子科技大学毕业设计(论文)报告用纸 第 2 页 共 56 页

Abstract

Along with communications technology, networking technology and the technology embedded systems developing rapidly and access network has become an important direction of its application. more and more options embedded systems and internet web server exchange data.. And ethernet is construct a modern internet network infrastructure and therefore opt for ethernet technology embedded web server for data interchange will be the practical value of the room. the temperature is controlled, and the archives, libraries, agricultural production base in many places such as real-time monitoring require a major physical quantities. the temperature control system in practical life is an important role. This article mainly aimed at the microprocessor chips arm7tdmi, the technology embedded web server, based on the temperature of the ethernet remote control system design scheme. This scheme successful to the collection and control of the network.

The design is based on the Fengbao Electronic Technology (Shanghai) Co., Ltd LINPO-PS LPC_2478 board to carry out the analysis on meter reading system, the board is integrated with NXP ARM7TDMI-S kernel, Single power supply, LQFP208 enclosed LPC2478, JTAG simulated debugging and ISP programming functions, etc.. This design adopts uclinux and the boa server can better meet the requirements.

uClinux is applied to a control an embedded linux operating system of its open source and transplant well, and support multiple hardware platforms and almost all common communication protocols network, supported file system, is a function of embedded system. and there is a good open source software application and development of tools available, and therefore, adopt μ clinux as operating platform, the use of remote web technology in the monitoring system development.

Boa is a performance of the task type of web server and run on almost all the kind of unix platforms, boa support and support, and the cgi be holding resources are few and are suitable for use in the limited resources of embedded systems, and the boa has been a source of the forms contained in the issue of uClinux package. So this design adopts uclinux and the boa server can better meet the requirements.

Key words: remote temperature measurement and control system;

ARM7;LPC2478;u-boot;uClinux;nand flash;norflash;dp83848;ds18b20;cgi;boa;web;

2

桂林电子科技大学毕业设计(论文)报告用纸 第 3 页 共 56 页

目 录

引言 ....................................................................................................................... 5 1 项目设计方案 ................................................................................................. 6 2 开发环境介绍 ................................................................................................. 7

2.1 LINPO-PS LPC_2478介绍 ............................................................................................ 7 2.2 NORFLASH介绍 ........................................................................................................... 7 2.2.1 AM29LV160DB简介 ............................................................................................. 8 2.2.2 AM29LV160DB的操作命令字 ............................................................................. 8 2.2.3 Nor flash的映射 ..................................................................................................... 8 2.3 NAND FLASH介绍 ......................................................................................................... 9 2.3.1 Nand flash芯片工作原理 ...................................................................................... 9 2.3.2 Nand flash主要内设命令详细介绍 .................................................................... 10 2.4 以太网接口介绍 ........................................................................................................ 11 2.4.1 以太网模块特点 ................................................................................................... 11 2.4.2 以太网模块初始化 ............................................................................................... 12 2.5 软件开发环境的介绍 ................................................................................................... 13

3 U-BOOT的移植 ........................................................................................... 14

3.1 U-BOOT简介 ................................................................................................................. 14 3.1.1 LPC2468OEM_Board中几个重要的文件 .......................................................... 16 3.1.2 U-Boot的启动流程 .............................................................................................. 17 3.2 U-BOOT的配置和编译 ................................................................................................... 19 3.3 U-BOOT的移植 ............................................................................................................... 19 3.4 U-BOOT NOR FLASH驱动的移植 .................................................................................. 21 3.5 NAND FLASH 驱动移植 .............................................................................................. 23 3.6 U-BOOT网卡驱动移植 ................................................................................................. 26

4 UCLINUX系统的移植 ................................................................................ 30

4.1 基本内核的移植 ........................................................................................................... 30 4.2 LINUX NOR FLASH驱动移植 ...................................................................................... 32 4.2.1 Linux mtd简介 ..................................................................................................... 32 4.2.2 Nor flash驱动移植 ............................................................................................... 33 4.2.3 JFFS2文件系统的制作 ........................................................................................ 37 4.3 LINUX网卡驱动移植 .................................................................................................. 38 4.3.1 网卡初始化 ........................................................................................................... 39 4.3.2 网卡打开 ............................................................................................................... 40 4.3.3 网卡发送 ............................................................................................................... 40

3

桂林电子科技大学毕业设计(论文)报告用纸 第 4 页 共 56 页

4.3.4 网卡接收 ............................................................................................................... 40 4.3.5 网卡关闭 ............................................................................................................... 41 4.3.6 网卡退出 ............................................................................................................... 41 4.3.7 LPC2468网卡驱动移植 ....................................................................................... 41 4.4 嵌入式WEB服务器BOA的移植 ............................................................................... 43 4.4.1 Boa简介 .............................................................................................................. 43 4.4.2 Boa编译配置 ..................................................................................................... 43 4.4.3 Boa目录的建立 ................................................................................................... 44 4.4.4 Boa的编译 ........................................................................................................... 44

5 软件开发过程 ............................................................................................... 45

5.1 DS18B20驱动程序设计 ............................................................................................... 45 5.1.2 DS18B20硬件连接 .............................................................................................. 47 5.1.3 DS18B20驱动介绍 ............................................................................................. 47 5.1.4 温度应用程序 ....................................................................................................... 49 5.2 LPC2478 DA驱动设计 ................................................................................................ 51 5.2.1 LPC2478 DA驱动测试 .................................................................................... 51 5.3 WEB程序设计 ................................................................................................................ 51 5.3.1 CGI简介 .............................................................................................................. 51 5.3.2 CGI程序工作原理 ............................................................................................ 52 5.3.3 WEB程序框图 ................................................................................................... 52 5.3.4 WEB程序介绍 .................................................................................................... 53

6 结论 ............................................................................................................... 54 谢 辞 ................................................................................................................. 55 参考文献 ............................................................................................................. 56

4

桂林电子科技大学毕业设计(论文)报告用纸 第 5 页 共 56 页

引言

我国是粮食生产大国,同时我国地域辽阔,气候差异大,粮食的安全存储是一项重要任务。环境的温度、湿度、压力等都是影响工农业生产的较重要的因素。如储存粮食的仓库中的温度、湿度的正常与否将直接影响到粮食可以储存的时间以及粮食的质量;在酿造业中,环境稍微有点变化就会有副产品制造出来,影响产品质量,因此酵池中的温度、压力更要进行精确的控制。温度是一个基本的物理量,它是农业生产过程中最普遍、最重要的工艺参数之一。随着农业的不断发展,对温度测量的要求越来越高,而且测量范围也越来越广,因此对温度检测技术的要求也越来越高。粮库多点温度监控系统也向着智能化方向发展,有效减少粮食在储存时的损失,成为了现代化粮食保存所必需的。

随着嵌入式技术的发展,嵌入式系统接入网络已成为其应用的一个重要方向。越来越多的嵌入式系统选择Web 服务器的方式与Internet 进行数据交换。而以太网是构筑现代Internet 网络的基础,因此选择基于以太网的嵌入式Web 服务器技术实现数据交换将具有较高的实用价值。本文主要针对ARM7TDMI核的微处理器芯片,结合嵌入式Web 服务器技术,提出了基于以太网的远程温度监控系统的设计方案。本方案采用LPC2478 uCliunx + WEB + CGI技术来实现对温度进行监控。

5


LPC2478远程温度监控.doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:国内外润滑油添加剂现状及发展趋势

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: