节点文献

μC/OS-II在C8051F单片机系统上的移植与应用研究

The Research of Transplant and Application of μC/OS-II on C8051F Mcs

【作者】 张泉

【导师】 陈大跃;

【作者基本信息】 上海交通大学 , 精密仪器及机械, 2009, 硕士

【摘要】 嵌入式系统已经广泛应用于国防、工业、交通、能源、信息技术以及日常生活等领域。随着嵌入式应用系统的智能化要求及其功能的增多,嵌入式软件变得越来越复杂,借助于EOS(Embedded Operating System,嵌入式操作系统)能有效缩短产品开发周期,降低开发成本。嵌入式RTOS(Real-Time Operating System,实时操作系统)支持高实时性嵌入式应用系统的开发,将是嵌入式软件系统发展的必然趋势。μC/OS-II是一款源代码完全开放的基于优先级的抢占式嵌入式实时操作系统,结构小巧、性能稳定,已成功应用于许多中小型商品化系统。Cygnal C8051F系列混合信号ISP FLASH微控制器是混合信号系统级的高性能、低价位8位MCU(Micro Controller,微控制器),在电机控制、电源控制、远程仪表、自动化等领域得到广泛应用。因此,移植μC/OS-II到C8051F系列MCU具有一定的工程价值。本文以Cygnal C8051F020硬件平台为基础,对μC/OS-II实时内核进行了深入分析,研究了μC/OS-II在C8051F020上的移植过程以及基于C8051F020和μC/OS-II的农作物种子加工处理机的硬件平台、软件平台设计,完成μC/OS-II的移植与测试,并实现了种子成套处理设备中蔬菜种子烘干机的控制系统。论文的组织结构如下:第一章给出了嵌入式实时系统和实时操作系统(RTOS)的定义,说明了RTOS的功能,论述了RTOS的发展现状和发展趋势,并且介绍了国内种子加工事业的情况,最后提出本文的研究内容及意义。第二章首先对μC/OS-II内核进行分析,详细解释任务状态及转换、任务管理及调度、时间管理、任务间通信与同步以及中断与时钟节拍等原理,分析了μC/OS-II实时内核的优缺点,其次对C8051F020的内核结构进行了分析,并介绍其指令系统和片上资源。最后进行了μC/OS-II移植的可行性分析,实现了μC/OS-II到C8051F020的移植。第三章分析了包括种子抛光机、包衣机、烘干机、风力选种机、重力选种机在内的五台种子处理设备的功能特点,并归纳出各设备的系统硬件构建所必需的模块单元:I/O控制、A/D、D/A、数据通讯、数据掉电存储、键盘输入、液晶输出。阐述了包括基于C8051F020核心的主控制电路和基于ATmega16的外围电路的系统硬件设计方案。第四章详细分析了蔬菜种子烘干机的机械结构和电气系统,介绍了其工作原理和控制要求。在移植了μC/OS-II的基础上完成了烘干机的应用程序的规划、设计和实现,并根据该控制系统的工作需要提出了一种简单可行的基于RS-485的多机通讯协议,实现了对该设备各控制部件的协调控制。第五章对研究工作进行总结,并提出了进一步研究开发的设想。

【Abstract】 Embedded systems have been widely applied to the national defense, industry, transportation as well as our daily life. Embedded software is getting much more complex than ever thanks to the implementation of more intelligent and powerful functions. With the Embedded Operating System (EOS), the development of embedded systems can greatly quicken the time-to-market and lower the development cost. The embedded Real-Time Operating System (RTOS) supports the development of real-time embedded software,and is expected to be the top choice for the embedded software development.μC/OS-II, with a task-priority-based preemptive embedded real-time operating system kernel, has been successfully applied to many commercial embedded systems in small and medium scales.Cygnal C8051F-series ISP FLASH SoC (System on Chip) is a high-performance, low-cost 8-bit Micro Controller (MCU). C8051F-series SoC has been involved in many industrial applications such as motor control, powersupply control, long-distance metering, and automation, etc. Hence, transplanting theμC/OS-II to C8051F-series SoC is of obvious engineering value.As an application, by using the Cygnal C8051F020, this paper presents how to transform theμC/OS-II to C8051F020 based on the analysis of the real-time kernel of theμC/OS-II. After introducing the general hardware platform of a set of seed processing machinery, the hardware and software of one of the seed machinery, the drying machine, is discussed in detail. The structure of the paper is as follows:Chapter 1 starts with the definitions of embedded real-time system and RTOS, following with the introduction of RTOS functions. The state-of-art and development trend of RTOS are also presented. This chapter is concluded with the introduction of the major contents and the research objectives of this paper.In chapter 2, some key concepts related to theμC/OS-II kernel is introduced in detail, such as the task states and state-transition, task management and schedule, time management, inter-task communication and synchronization, interrupt and clock tick. The cons and pros ofμC/OS-II are also listed. Then the kernel structure of C8051F020 is analyzed and its instruction system and interrupt mechanism are also introduced. Finally, this chapter analyses the porting ofμC/OS-II to C8051F020-series MCU, and introduces how to design and implement the transplanting.Chapter 3 analyses the features of the seeds processing equipment in detail, designs a hardware platform including main controlling board based on C8051F020 and peripheral circuit based on ATmega16.Chapter 4 detailed analyses the mechanical structure and electrical systems of the seeds drying machine, introduces its working principle and controlling demand. Then designs and realizes the application software based onμC/OS-II. A multi-machine communication protocol based on RS-485 is also proposed.Chapter 5 summarizes the paper and suggests some proposals on further effort.

【关键词】 嵌入式系统RTOSμC/OS-IIC8051F020种子机
【Key words】 Embedded SystemsRTOSμC/OS-IIC8051F020Seed processing machinery
  • 【分类号】TP316.84;TP368.12
  • 【被引频次】25
  • 【下载频次】457
  • 攻读期成果
节点文献中: 

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

本文的引文网络