单片机和keil外文翻译资料

 2022-12-04 02:12

外文文献

The SCM and micro;Vision2

一、Principle of MCU

Single-chip is an integrated on a single chip a complete computer system. Even though most of his features in a small chip, but it has a need to complete the majority of computer components: CPU, memory, internal and external bus system, most will have the Core. At the same time, such as integrated communication interfaces, timers, real-time clock and other peripheral equipment. And now the most powerful single-chip microcomputer system can even voice, image, networking, input and output complex system integration on a single chip.

Also known as single-chip MCU (Microcontroller), because it was first used in the field of industrial control. Only by the single-chip CPU chip developed from the dedicated processor. The design concept is the first by a large number of peripherals and CPU in a single chip, the computer system so that smaller, more easily integrated into the complex and demanding on the volume control devices. INTEL the Z80 is one of the first design in accordance with the idea of the processor, From then on, the MCU and the development of a dedicated processor parted ways.

Early single-chip 8-bit or all of the four. One of the most successful is INTELs 8031, because the performance of a simple and reliable access to a lot of good praise. Since then in 8031 to develop a single-chip microcomputer system MCS51 series. Based on single-chip microcomputer system of the system is still widely used until now. As the field of industrial control requirements increase in the beginning of a 16-bit single-chip, but not ideal because the price has not been very widely used. After the 90s with the big consumer electronics product development, single-chip technology is a huge improvement. INTEL i960 Series with subsequent ARM in particular, a broad range of applications, quickly replaced by 32-bit single-chip 16-bit single-chip high-end status, and enter the mainstream market. Traditional 8-bit single-chip performance has been the rapid increase in processing power compared to the 80s to raise a few hundred times. At present, the high-end 32-bit single-chip frequency over 300MHz, the performance of the mid-90s close on the heels of a special processor, while the ordinary price of the model dropped to one U.S. dollars, the most high-end models, only 10 U.S. dollars. Contemporary single-chip microcomputer system is no longer only the bare-metal environment in the development and use of a large number of dedicated embedded operating system is widely used in the full range of single-chip microcomputer. In PDAs and cell phones as the core processing of high-end single-chip or even a dedicated direct access to Windows and Linux operating systems.

More than a dedicated single-chip processor suitable for embedded systems, so it was up to the application. In fact the number of single-chip is the worlds largest computer. Modern human life used in almost every piece of electronic and mechanical products will have a single-chip integration. Phone, telephone, calculator, home appliances, electronic toys, handheld computers and computer accessories such as a mouse in the Department are equipped with 1-2 single chip. And personal computers also have a large number of single-chip microcomputer in the workplace. Vehicles equipped with more than 40 Department of the general single-chip, complex industrial control systems and even single-chip may have hundreds of work at the same time! SCM is not only far exceeds the number of PC and other integrated computing, even more than the number of human beings.

Hardwave introduction

The 8051 family of micro controllers is based on an architecture which is highly optimized for embedded control systems. It is used in a wide variety of applications from military equipment to automobiles to the keyboard on your PC. Second only to the Motorola 68HC11 in eight bit processors sales, the 8051 family of microcontrollers is available in a wide array of variations from manufacturers such as Intel, Philips, and Siemens. These manufacturers have added numerous features and peripherals to the 8051 such as I2C interfaces, analog to digital converters, watchdog timers, and pulse width modulated outputs. Variations of the 8051 with clock speeds up to 40MHz and voltage requirements down to 1.5 volts are available. This wide range of parts based on one core makes the 8051 family an excellent choice as the base architecture for a companys entire line of products since it can perform many functions and developers will only have to learn this one platform.

The basic architecture consists of the following features:

· an eight bit ALU

· 32 descrete I/O pins (4 groups of 8) which can be individually accessed

· two 16 bit timer/counters

· full duplex UART

· 6 interrupt sources with 2 priority levels

· 128 bytes of on board RAM

· separate 64K byte address spaces for DATA and CODE memory

One 8051 processor cycle consists of twelve oscillator periods. Each of the twelve oscillator periods is used for a special function by the 8051 core such as op code fetches and samples of the interrupt daisy chain for pending interrupts. The time required for any 8051 instruction can be computed by dividing the clock frequency by 12, inverting that result and multiplying it by the number of processor cycles required by the instruction in question. Therefore, if you have a system which is using an 11.059MHz clock, you can compute the number of instructions per second by dividing this value by 12. This gives an instruction frequency of 921583 instructions per second. Inverting this will provide the amount of time taken by each instruction cycle (1.085 microseconds).

二、etting Started with micro;Vision2

The Keil Software 8051 development tools listed below are programs you use to compile your C code, assemble your assembly sou

剩余内容已隐藏,支付完成后下载完整资料


中文译文

单片机和keil

一、单片机原理

单片机是指一个集成在一块芯片上的完整计算机系统。尽管他的大部分功能集成在一块小芯片上,但是它具有一个完整计算机所需要的大部分部件:CPU、内存、内部和外部总线系统,目前大部分还会具有外存。同时集成诸如通讯接口、定时器,实时时钟等外围设备。而现在最强大的单片机系统甚至可以将声音、图像、网络、复杂的输入输出系统集成在一块芯片上。

单片机也被称为微控制器(Microcontroller),是因为它最早被用在工业控制领域。单片机由芯片内仅有CPU的专用处理器发展而来。最早的设计理念是通过将大量外围设备和CPU集成在一个芯片中,使计算机系统更小,更容易集成进复杂的而对体积要求严格的控制设备当中。INTEL的Z80是最早按照这种思想设计出的处理器,从此以后,单片机和专用处理器的发展便分道扬镳。

早期的单片机都是8位或4位的。其中最成功的是INTEL的8031,因为简单可靠而性能不错获得了很大的好评。此后在8031上发展出了MCS51系列单片机系统。基于这一系统的单片机系统直到现在还在广泛使用。随着工业控制领域要求的提高,开始出现了16位单片机,但因为性价比不理想并未得到很广泛的应用。90年代后随着消费电子产品大发展,单片机技术得到了巨大的提高。随着INTEL i960系列特别是后来的ARM系列的广泛应用,32位单片机迅速取代16位单片机的高端地位,并且进入主流市场。而传统的8位单片机的性能也得到了飞速提高,处理能力比起80年代提高了数百倍。目前,高端的32位单片机主频已经超过300MHz,性能直追90年代中期的专用处理器,而普通的型号出厂价格跌落至1美元,最高端的型号也只有10美元。当代单片机系统已经不再只在裸机环境下开发和使用,大量专用的嵌入式操作系统被广泛应用在全系列的单片机上。而在作为掌上电脑和手机核心处理的高端单片机甚至可以直接使用专用的Windows和Linux操作系统。

单片机比专用处理器更适合应用于嵌入式系统,因此它得到了最多的应用。事实上单片机是世界上数量最多的计算机。现代人类生活中所用的几乎每件电子和机械产品中都会集成有单片机。手机、电话、计算器、家用电器、电子玩具、掌上电脑以及鼠标等电脑配件中都配有1-2部单片机。而个人电脑中也会有为数不少的单片机在工作。汽车上一般配备40多部单片机,复杂的工业控制系统上甚至可能有数百台单片机在同时工作!单片机的数量不仅远超过PC机和其他计算的综合,甚至比人类的数量还要多。

单片机硬件介绍:

8051系列微控制器是建立在一个高度优化的嵌入式控制系统的结构上。它的运用范围比较广,从军事装备到汽车再到你的PC机的键盘。仅次于摩托罗拉68HC11在8位处理器销售,8051家庭的微控制器, 在制造商上有各种各样的变化,如因特尔公司、西门子、飞利浦。这些厂家已经增加了许多功能及外设,如总线接口,模拟到数字转换器,看门狗定时器、脉冲宽度调制的输出。8051的变化,达到40MHz时钟频率下降到150伏电压条件是可得到的。这种广泛的部分基于一个核心使8051系列的一个很好的选择作为基础架构的一个公司产品,因为它可以执行许多功能和开发者只会有这样的一个平台。

基本结构由以下特点:

一个8为的算术逻辑单元

32个离散输入输出端口(4组8位)可单独访问

二16位bull;定时器/计数器

全双工通用异步接收/发送装置

6个中断源与2个优先级别

128字节的随机存储器

64K分开字节地址空间的数据和代码的记忆

一个数字处理器周期共有十二振荡器的时期。他本是十二门徒里的每一个阶段是用于振荡器的特殊功能的核心,如凤凰社代码的数字和样品中的全部中断菊花链未决的中断。所需的时间任何8051指令可以除以12例,时钟频率通过反演结果和增殖它的数字处理器周期所指示的问题。因此,如果你有一个系统,使用一个11.059MHz时钟,可以计算出的指令数除以这个值每秒12分。这给出了921583指令每秒指令频率。反相这将提供每个指令周期(1.085微秒)采取的时间。

二、 Keil C 简介

Keil Software 的8051开发工具提供以下程序,你可以用它们来编译你的C源码,汇编你的汇编源程序,连接和重定位你的目标文件和库文件,创建HEX文件,调试你的目标程序。

Windows应用程序uVision2是一个集成开发环境,它把项目管理,源代码编辑,程序调试等集成到一个功能强大的环境中。

C51美国标准优化C交叉编译器从你的C源代码产生可重定位的目标文件。

A51宏汇编器从你的8051汇编源代码产生可重定位的目标文件。

BL51连接/重定位器组合你的由C51和A51产生的可重定位的目标文件,生成绝对目标文件。

LIB51库管理器组合你的目标文件,生成可以被连接器使用的库文件。

OH51目标文件到HEX格式的转换器从绝对目标文件创建Intel HEX 格式的文件。

RTX-51实时操作系统简化了复杂和对时间要求敏感的软件项目。

软件开发流程

当你使用Keil Software工具时,你的项目开发流程和其它软件开发项目的流程极其相似。

1. 创建一个项目,从器件库中选择目标器件,配置工具设置。

2. 用C语言或汇编语言创建源程序。

3. 用项目管理器实现你的应用。

4. 修改源程序中的错误。

5. 测试,连接应用。

uVision2 IDE

uVision2 集成开发环境集成了一个项目管理器,一个功能丰富、有错误提示的编辑器,以及设置选项,生成工具,在线帮助。利用uVision2创建你的源代码并把它们组织到一个能确定你的目标应用的项目中去。uVision2自动编译,汇编,连接你的嵌入式应用,并为你的开发提供一个单一的焦点。

C51编译器和A51汇编器

源代码由uVision2 IDE创建,并被C51编译或A51汇编。编译器和汇编器从源代码生成可重定位的目标文件。Keil C51编译器完全遵照ANSI C语言标准,支持C语言的所有标准特性。另外,直接支持8051结构的几个特性被添加到里面。Keil A51宏汇编器支持8051及其派生系列的全部指令集。

LIB51 库管理器

LIB51库管理器允许你从由编译器或汇编器生成的目标文件创建目标库。库是一种被特别地组织过并在以后可以被连接重用的对象模块。当连接器处理一个库时,仅仅那些被使用的目标模块才被真正使用。

BL51 连接器/定位器

BL51 连接器/定位器利用从库中提取的目标模块和由编译器或汇编器生成的目标模块创建一个绝对地址的目标模块。一个绝对地址目标模块或文件包含不可重定位的代码和数据。所有的代码和数据被安置在固定的存储器单元中。此绝对地址目标文件可以用来:

写入EPROM或其它存储器件。

由uVision2调试器使用来模拟和调试。

由仿真器用来测试程序。

uVision2 调试器

uVision2源代码级调试器是一个理想地快速,可靠的程序调试器。此调试器包含一个高速模拟器,能够让你模拟整个8051系统,包括片上外围器件和外部硬件。当你从器件库中选择器件时,这个器件的特性将自动配置。

uVision2调试器为你在实际目标板上测试你的程序提供了几种方法:

安装MON51目标监控器到你的目标系统并且通过Monitor-51接口下载你的程序。

利用高级的GDI(AGDI)接口,把uVision2调试器绑定到你的目标系统。

Monitor-51

uVision2调试器支持用Monitor-51进行目标板调试。此监控程序驻留在你的目标板的 存储器里,它利用串口和uVision2调试器进行通信。利用Monitor-51,uVision2调试器 可以对你的目标硬件实行源代码级的调试。

RTX51实时操作系统

RTX51实时操作系统是一个针对8051系列的多任务核。RTX51实时内核从本质上简化了对实时事件反应速度要求高的复杂应用系统的设计,编程和调试。RTX51实时内核是完全集成到C51编译器中的,从而方便使用。任务描述表和操作系统的连接由BL51连接器/定位器自动控制。

C51优化的C语言交叉编译器

Keil C51交叉编译器是一个基于ANSI C标准的针对8051系列MCU的C编译器,生成的可执行代码快速、紧凑,在运行效率和速度上可以和汇编程序得到的代码相媲美。

和汇编语言相比,用C语言这样的高级语言有很多优势,比如:

对处理器的指令集不必了解,8051 CPU的基本结构可以了解,但不是必须的。

寄存器的分配以及各种变量和数据的寻址都由编译器完成。

程序拥有了正式的结构(由C语言带来的),并且能被分成多个单独的子函数。这使整个应用系统的结构变得清晰,同时让源代码变得可重复使用。

选择特定的操作符来操作变量的能力提高了源代码的可读性。

可以运用和人的思维很接近的词汇和算法表达式。

编写程序和调试程序的时间得到很大程度的缩短。

C运行连接库包含一些标准的子程序,如:格式化输出,数字转换,浮点运算。

由于程序的模块结构技术,使得现有的程序段可以很容易的包含到新的程序中去。

ANSI 标准的C语言是一种丰常方便的,获得广泛应用的,在绝大部分系统中都能够很容易得到的语言。

因此,如果需要,现有的程序可以很快地移植到其他的处理器上,节省投资。

代码优化

C51是一个杰出的优化编译器,它通过很多步骤以确保产生的代码是最有效率的(最小和/或最快)。编译器通过分析初步的代码 产生最终的最有效率的代码序列,以此来保证你的C语言程序占用最少空间的同时运行的快而有效。

C51编译器提供9个优化级别。每个高一级的优化级别都包括比它低的所有优化级别的优化内容。以下列出的是目前C51编译器提供的所有优化级别的内容:

常量折叠:在表达式及寻址过程中出现的常量被综合为一个单个的常量。

跳转优化:采用反转跳转或直接指向最终目的的跳转,从而提升了程序的效率。

哑码消除:永远不可能执行到的代码将自动从程序中剔除。

寄存器变量:只要可能,局部变量和函数参数被放在CPU寄存器中,不需要为这些变量再分配存储器空间。

通过寄存器传递参数:最多三个参数通过寄存器传递。

消除全局公用的子表达式:只要可能,程序中多次出现的相同的子表达式或地址计算表达式将只计算一次。

合并相同代码:利用跳转指令,相同的代码块被合并。

重复使用入口代码:需要多次使用的共同代码被移到子程序的前面以缩减代码长度。

公共块子程序:需要重复使用的多条指令被提取组成子程序。指令被重新安排以最大化一个共用子程序的长度。

剩余内容已隐藏,支付完成后下载完整资料


资料编号:[28988],资料为PDF文档或Word文档,PDF文档可免费转换为Word

原文和译文剩余内容已隐藏,您需要先支付 30元 才能查看原文和译文全部内容!立即支付

以上是毕业论文外文翻译,课题毕业论文、任务书、文献综述、开题报告、程序设计、图纸设计等资料可联系客服协助查找。