基于AT91M55800A嵌入式控制器的设计与实现
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着计算机技术的发展,嵌入式系统己成为计算机领域的一个重要组成部分,并成为近年来研究的热点。同时随着网络技术的发展,为嵌入式系统添加网络功能已成为嵌入式系统新的发展方向。
     在此背景下本文提出了一种基于AT91M55800A的嵌入式控制器。AT91M55800A微控制器以ARM7TDMI为内核,具有高效能、低功耗、体积小特点,非常适用于那些对体积、成本有严格要求的控制领域。本文以AT91M55800A微控制器为核心,设计和制作了嵌入式控制器的硬件电路。硬件电路主要包括MCU、存储系统、JTAG调试接口、TCP/IP网络接口以及控制器电源等。为了测试控制器核心板工作的稳定性,本文对控制器硬件的各部分进行分别调试,主要包括AT91M55800A微处理器、FLASH存储器、铁电存储器等,确保了AT91M55800A控制器核心板控制器稳定地工作。
     为了满足实时多任务控制的要求,本文选择实时性强、源码公开的uC/OS-Ⅱ作为操作系统,通过分析其内核原理,将该操作系统成功地移植到了AT91M55800A微控制器上,实现了多任务的调度。为了扩展控制器网络功能,在uC/OS-Ⅱ操作系统中移植了LwIP协议。通过分析LwIP协议,特别分析了TCP和IP层,根据网络芯片RTL8019AS编写网络驱动,并通过TCP/IP协议实验测试表明,所设计的网络接口实现了与PC机的TCP/IP通信功能。
     最后,编写了PID控制算法、A/D和D/A模块的驱动程序以及MODBUS通信程序,实现了该控制器核心板对三容液位装置的单容液位控制,并利用“力控”组态软件对液位进行实时监控。结果表明控制系统工作运行稳定,控制效果良好。
With the development of computer, embedded system has become an important part of computer science and researching focus in recent years. At the same time,with the development of network,it is becoming current to append network function on the controller system.
     Hereby this paper presents an embedded control system based on AT91M55800A,which has ARM7TDMI core that is a high-performance,small size,low-power consumption core, and is specially suitable for the control filed ritical to the size and the cost.Firstly, the paper set up a hardware system besed on AT91M55800A, which includes MCU,system memery,JTAG debugging interface,TCP/IP network interface,power supply and so on. In order to ensure controller of AT91M55800A running stably, the paper debugging the controller board including AT91M55800A,FLASH memory etc.
     In order to meet the request of real-time and multi-task control,it anatomize uC/OS-II with fine real-time and open source code,and transplant this operation system to AT91M55800A successfully to realize the function of multi-task. To realize the function of network in uC/OS-II,this paper introduces LwIP(Light Wight IP), especially process of TCP and IP,and then implements driver for LwIP according to RTL8019AS and realizes the communications between the controller and computer based on TCP/IP stack. The test examples of network show that the network interface designed in this paper can communicate with PC susuccessfully based on TCP/IP stack.
     Finnally,Based on programme of PID and drives of A/D and D/A,the control board is successfully used in controlling the single-tank Liquid Level of the single-tank Liquid Level. Through protocol of MODBUS,the level of the single-tank is monitored by the ForceControl configuration software and the result shows that the controller runs stably.
引文
[1] Qing Li.嵌入式系统的实时概念.北京:北京航空航天大学,2004
    [2] 陈渝,李明.源码开放的嵌入式系统软件分析与实践.北京:北京航空航天大学出版社,2004
    [3] 胥静.嵌入式系统设计与开发实例详解—基于ARM的应用.北京:北京航空航天大学出版社,2005
    [4] Douglas E. Comer, David L. Stevens.用TCP/IP进行网际互连.北京:电子工业出版社,2000
    [5] 田泽.嵌入式系统开发与应用.北京:北京航空航天大学出版社,2005
    [6] 金西,黄汪.Linux操作系统是嵌入式系统新的选择,微计算机信息,2000(6)
    [7] http://www.esic.cn/XXLR1.ASP?ID=5495
    [8] 周立功.ARM微控制器基础与实践.北京:北京航空航天大学出版社,2003
    [9] 杜春雷.ARM体系结构与编程.北京:清华大学出版社,2003
    [10] Raj Kamal.嵌入式系统体系结构、编程与设计.北京:清华大学出版社,2005(1)
    [11] Reuven Katz, Byung-Kwon Min, Zbigniew Pasek. Open Architecture Control Technology Trends. ERC/RMS Report 35, September 2000
    [12] 李明,康静秋.嵌入式TCP/IP协议的研究和开发.计算机工程与应用,2002(16):1-2
    [13] ARM Limited. ARM7TDMI Technical Reference Manual. ARM DDI 0192A,2000
    [14] Atmel Corporation. AT91M55800A Datasheet
    [15] 马忠梅,徐英慧.AT91系列ARM核微控制器结构与开发.北京:北京航空航天大学出版社,2003
    [16] Ramtron International Corporation. FM20L08 Datasheet, 2005
    [17] Micrium, Inc. uC/OS-Ⅱ——源码公开的实时嵌入式操作系统.邵贝贝译.北京:中国电力出版社,2001
    [18] Jean J. Labrosse著,邵贝贝等译.嵌入式实时操作系统μC/OS-Ⅱ(第2版).北京:北京航空航天大学出版社,2003
    [19] 王涛,刘建辉.基于ARM微处理器的uC/OSⅡ的移植研究.微计算机信息,2005,21(7):1-2
    [20] 何轩,夏应清.基于μC/OS-Ⅱ的嵌入式系统以太网通信功能的实现.电子科技,2005,(12):1-2
    [21] 黄燕平.uC/OS-ⅡARM移植要点详解.北京:北京航空航天大学出版社,2005
    [22] Micrium, Inc. uC/OS-Ⅱ and The ARM7 Processor Application Note. AN— 1011A
    [23] 许海燕,付炎.嵌入式系统技术与应用.北京:机械工业出版社,2002
    [24] Stevens Richard. TCP/IP Illustrated. USA: Pearon Education Company, 1995
    [25] Adam Dunkels著. Design and Implementation of the lwlP TCP/IP. Stack. Swedish Institute
    [26] Adolfo Rodriguez, John Gatrell著,样铁勇,李增民译.TCP/IP权威教程.北京:清华大学出版社,2002
    [27] BehrouzA. Forouzan. TCP/IP协议族.北京:清华大学出版社,2004
    [28] Dam Dunkels. Full TCP/IP for 8-Bit Architectures. Swedish Institute of Computer Science, 2003
    [29] 李瑞峰.基于嵌入式实时操作系统的IP PACK的实现:[硕士学位论文].兰州:兰州理工大学,2005
    [30] 李琼.嵌入式TCP/IP协议在ARM上的实现及其应用.微机算计应用,2005,26(6):1-2
    [31] Richard Stevens.范建华译.TCP/IP详解.北京:机械工业出版社,2000
    [32] 陈庆章.TCP/IP网络原理与技术.北京:高等教育出版社,2006
    [33] 翟东海,李力.Mbuf的实现原理剖析及其在网络编程中的应用.计算机工程与应用,2004(8)
    [34] 彭义波.μC/OS-Ⅱ与TCP/IP协议栈的分析与移植:[硕士学位论文].武汉:华中师范大学,2003
    [35] 罗军宏,谢余强.LwIP在μC/OS-Ⅱ操作系统中的实现.微计算机信息,2005,21(10):1-2
    [36] REALTEK Semiconductor Corp. RTL8019AS Realtek Full-Duplex EthernetColler with Plug and Play Function(RealPNP) specification, 2001
    [37] 周立功.ARM嵌入式系统软件开发实例(一).北京:北京航空航天大学出版社,2004
    [38] 王明晖.基于ARM嵌入式的开发与应用.北京:人民邮电出版社,2004
    [39] RT9019AS datasheet. http://www.realtek.com.cn
    [40] 杨晔.数字化电器信息网关的设计和实现:[硕士学位论文].镇江:华东船舶工业学院,2003
    [41] Jeremy Bentham.嵌入式WEB服务器——TCP/IP Lean.陈向群等译.北京:机械工业出版社,2003
    [42] 上海齐鑫科教实业公司,三溶液位实验装置说明书,2002
    [43] 龚克.Modbus协议及其PC机实现.福建电脑,2004,(7):1-2
    [44] 马国华.监控组态软件及其应用.北京:清华大学出版社,2001.8
    [45] 李立强.VC下实现基于Modbus协议的DCS与远程I/O系统通信.北京:微计算机信息,2004(2):1-2