Keil C51使用详解Keil C51 是美国Keil Software 公司出品的51 系列兼容单片机C 语言软件开发系统,与汇编相比,C 语言在功能上、结构性、可读性、可维护性上有明显的优势,因而易学易用。用过汇编语言后再使用C 来开发,体会更加深刻。Keil C51 软件提供丰富的库函数和功能强大的集成开发调试工具,全Windows界面。另外重要的一点,只要看一下编译后生成的汇编代码,就能体会到Keil C51生成的目标代码效率非常之高,多数语句生成的汇编代码很紧凑,容易理解。在开发大型软件时更能体现高级语言的优势。下面详细介绍 Keil C51 开发系统各部分功能和使用。第二节 Keil C51 单片机软件开发系统的整体结构C51 工具包的整体结构,如图(1)所示,其中uVision 与Ishell 分别是C51 forWindows 和for Dos 的集成开发环境(IDE),可以完成编辑、编译、连接、调试、仿真等整个开发流程。开发人员可用IDE 本身或其它编辑器编辑C 或汇编源文件。然后分别由C51 及A51 编译器编译生成目标文件(.OBJ)。目标文件可由LIB51 创建生成库文件,也可以与库文件一起经L51 连接定位生成绝对目标文件(.ABS)。ABS 文件由OH51 转换成标准的Hex 文件,以供调试器dScope51 或tScope51 使用进行源代码级调试,也可由仿真器使用直接对目标板进行调试,也可以直接写入程序存贮器如EPROM 中。图(1) C51 工具包整体结构图第三节 Keil C51 工具包的安装81. C51 for Dos在 Windows 下直接运行软件包中DOS\C51DOS.exe 然后选择安装目录即可。完毕后欲使系统正常工作须进行以下操作(设C:\C51 为安装目录):修改 Autoexec.bat,加入path=C:\C51\BinSet C51LIB=C:\C51\LIBSet C51INC=C:\C51\INC然后运行Autoexec.bat2. C51 for Windows 的安装及注意事项:在 Windows 下运行软件包中WIN\Setup.exe,最好选择安装目录与C51 for Dos相同,这样设置最简单(设安装于C:\C51 目录下)。然后将软件包中crack 目录中的文件拷入C:\C51\Bin 目录下。第四节 Keil C51 工具包各部分功能及使用简介1. C51 与A51(1) C51C51 是C 语言编译器,其使用方法为:C51 sourcefile[编译控制指令]或者 C51 @ commandfile其中 sourcefile 为C 源文件(.C)。大量的编译控制指令完成C51 编译器的全部功能。包控C51 输出文件C.LST,.OBJ,.I 和.SRC 文件的控制。源文件(.C)的控制等,详见第五部分的具体介绍。而 Commandfile 为一个连接控制文件其内容包括:.C 源文件及各编译控制指令,它没有固定的名字,开发人员可根据自己的习惯指定,它适于用控制指令较多的场合。(2) A51A51 是汇编语言编译器,使用方法为:9A51 sourcefile[编译控制指令]或 A51 @ commandfile其中sourcefile 为汇编源文件(.asm或.a51),而编译控制指令的使用与其它汇编如ASM语言类似,可参考其他汇编语言材料。Commandfile 同C51 中的Commandfile 类似,它使A51 使用和修改方便。2. L51 和BL51(1) L51L51 是Keil C51 软件包提供的连接/定位器,其功能是将编译生成的OBJ 文件与库文件连接定位生成绝对目标文件(.ABS),其使用方法为:L51 目标文件列表[库文件列表] [to outputfile] [连接控制指令]或 L51 @Commandfile源程序的多个模块分别经 C51 与A51 编译后生成多个OBJ 文件,连接时,这些文件全列于目标文件列表中,作为输入文件,如果还需与库文件(.LiB)相连接,则库文件也必须列在其后。outputfile 为输文件名,缺少时为第一模块名,后缀为.ABS。连接控制指令提供了连接定位时的所有控制功能。Commandfile 为连接控制文件,其具体内容是包括了目标文件列表,库文件列表及输出文件、连接控制命令,以取代第一种繁琐的格式,由于目标模块库文件大多不止1 个,因而第2 种方法较多见,这个文件名字也可由使用者随意指定。(2) Bl51BL51 也是C51 软件包的连接/定位器,其具有L51 的所有功能,此外它还具有以下3 点特别之处:a. 可以连接定位大于64kBytes 的程序。b. 具有代码域及域切换功能(CodeBanking & Bank Switching)c. 可用于RTX51 操作系统RTX51 是一个实时多任务操作系统,它改变了传统的编程模式,甚至不必用main( )函数,单片机系统软件向RTOS 发展是一种趋势,这种趋势对于186 和38610及68K 系列CPU 更为明显和必须,对8051 因CPU 较为简单,程序结构等都不太复杂,RTX51 作用显得不太突出,其专业版软件PK51 软件包甚至不包括RTX51Full,而只有一个RTX51TINY 版本的RTOS。RTX51 TINY 适用于无外部RAM 的单片机系统,因而可用面很窄,在本文中不作介绍。Bank switching 技术因使用很少也不作介绍。3. DScope51,Tscope51 及Monitor51(1) dScope51dScope51 是一个源级调试器和模拟器,它可以调试由C51 编译器、A51 汇编器、PL/M-51 编译器及ASM-51 汇编器产生的程序。它不需目标板(for windows 也可通过mon51 接目标板),只能进行软件模拟,但其功能强大,可模拟CPU 及其外围器件,如内部串口,外部I/O 及定时器等,能对嵌入式软件功能进行有效测试。
上传时间: 2013-11-01
上传用户:zhouxuepeng1
The PCA9549 provides eight bits of high speed TTL-compatible bus switching controlledby the I2C-bus. The low ON-state resistance of the switch allows connections to be madewith minimal propagation delay. Any individual A to B channel or combination of channelscan be selected via the I2C-bus, determined by the contents of the programmable Controlregister. When the I2C-bus bit is HIGH (logic 1), the switch is on and data can flow fromPort A to Port B, or vice versa. When the I2C-bus bit is LOW (logic 0), the switch is open,creating a high-impedance state between the two ports, which stops the data flow.An active LOW reset input (RESET) allows the PCA9549 to recover from a situationwhere the I2C-bus is stuck in a LOW state. Pulling the RESET pin LOW resets the I2C-busstate machine and causes all the bits to be open, as does the internal power-on resetfunction.
上传时间: 2014-11-22
上传用户:xcy122677
Internal Interrupts are used to respond to asynchronous requests from a certain part of themicrocontroller that needs to be serviced. Each peripheral in the TriCore as well as theBus Control Unit, the Debug Unit, the Peripheral Control Processor (PCP) and the CPUitself can generate an Interrupt Request.So what is an external Interrupt?An external Interrupt is something alike as the internal Interrupt. The difference is that anexternal Interrupt request is caused by an external event. Normally this would be a pulseon Port0 or Port1, but it can be even a signal from the input buffer of the SSC, indicatingthat a service is requested.The User’s Manual does not explain this aspect in detail so this ApNote will explain themost common form of an external Interrupt request. This ApNote will show that there is aneasy way to react on a pulse on Port0 or Port1 and to create with this impulse an InterruptService Request. Later in the second part of the document, you can find hints on how todebounce impulses to enable the use of a simple switch as the input device.Note: You will find additional information on how to setup the Interrupt System in theApNote “First steps through the TriCore Interrupt System” (AP3222xx)1. It would gobeyond the scope of this document to explain this here, but you will find selfexplanatoryexamples later on.
上传时间: 2013-10-27
上传用户:zhangyigenius
All inputs of the C16x family have Schmitt-Trigger input characteristics. These Schmitt-Triggers are intended to always provide proper internal low and high levels, even if anundefined voltage level (between TTL-VIL and TTL-VIH) is externally applied to the pin.The hysteresis of these inputs, however, is very small, and can not be properly used in anapplication to suppress signal noise, and to shape slow rising/falling input transitions.Thus, it must be taken care that rising/falling input signals pass the undefined area of theTTL-specification between VIL and VIH with a sufficient rise/fall time, as generally usualand specified for TTL components (e.g. 74LS series: gates 1V/us, clock inputs 20V/us).The effect of the implemented Schmitt-Trigger is that even if the input signal remains inthe undefined area, well defined low/high levels are generated internally. Note that allinput signals are evaluated at specific sample points (depending on the input and theperipheral function connected to it), at that signal transitions are detected if twoconsecutive samples show different levels. Thus, only the current level of an input signalat these sample points is relevant, that means, the necessary rise/fall times of the inputsignal is only dependant on the sample rate, that is the distance in time between twoconsecutive evaluation time points. If an input signal, for instance, is sampled throughsoftware every 10us, it is irrelevant, which input level would be seen between thesamples. Thus, it would be allowable for the signal to take 10us to pass through theundefined area. Due to the sample rate of 10us, it is assured that only one sample canoccur while the signal is within the undefined area, and no incorrect transition will bedetected. For inputs which are connected to a peripheral function, e.g. capture inputs, thesample rate is determined by the clock cycle of the peripheral unit. In the case of theCAPCOM unit this means a sample rate of 400ns @ 20MHz CPU clock. This requiresinput signals to pass through the undefined area within these 400ns in order to avoidmultiple capture events.
上传时间: 2014-04-02
上传用户:han_zh
This document describes part number speciÞc changes to recommended operating conditions and revised electrical speciÞcations,as applicable, from those described in the generalMPC7400 Hardware SpeciÞcations.SpeciÞcations provided in this Part Number SpeciÞcation supersede those in theMPC7400 Hardware SpeciÞcationsdated 9/99(order #: MPC7400EC/D) for these part numbers only; speciÞcations not addressed herein are unchanged. This document isfrequently updated, refer to the website at http://www.mot.com/SPS/PowerPC/ for the latest version.Note that headings and table numbers in this data sheet are not consecutively numbered. They are intended to correspond to theheading or table affected in the general hardware speciÞcation.Part numbers addressed in this document are listed in Table A. For more detailed ordering information see Table B.
上传时间: 2013-11-19
上传用户:qiaoyue
load initial_track s; % y:initial data,s:data with noiseT=0.1; % yp denotes the sample value of position% yv denotes the sample value of velocity% Y=[yp(n);yv(n)];% error deviation caused by the random acceleration % known dataY=zeros(2,200);Y0=[0;1];Y(:,1)=Y0;A=[1 T 0 1]; B=[1/2*(T)^2 T]';H=[1 0]; C0=[0 0 0 1];C=[C0 zeros(2,2*199)];Q=(0.25)^2; R=(0.25)^2;
上传时间: 2014-12-28
上传用户:asaqq
The RT9018A/B is a high performance positive voltage regulator designed for use in applications requining very low Input voltage and very low dropout voltage at up to 3A(peak).
上传时间: 2013-10-10
上传用户:geshaowei
最新的支持向量机工具箱,有了它会很方便 1. Find time to write a proper list of things to do! 2. Documentation. 3. Support Vector Regression. 4. Automated model selection. REFERENCES ========== [1] V.N. Vapnik, "The Nature of Statistical Learning Theory", Springer-Verlag, New York, ISBN 0-387-94559-8, 1995. [2] J. C. Platt, "Fast training of support vector machines using sequential minimal optimization", in Advances in Kernel Methods - Support Vector Learning, (Eds) B. Scholkopf, C. Burges, and A. J. Smola, MIT Press, Cambridge, Massachusetts, chapter 12, pp 185-208, 1999. [3] T. Joachims, "Estimating the Generalization Performance of a SVM Efficiently", LS-8 Report 25, Universitat Dortmund, Fachbereich Informatik, 1999.
上传时间: 2013-12-16
上传用户:亚亚娟娟123
The Kannel Open Source WAP and SMS gateway works as both an SMS gateway, for implementing keyword based services via GSM text messages, and a WAP gateway, via UDP. The SMS part is fairly mature, the WAP part is early in its development. In this release, the GET request for WML pages and WMLScript files via HTTP works, including compilation for WML and WMLScript to binary forms. Only the data call bearer (UDP) is supported, not SMS.
标签: gateway implementing SMS keyword
上传时间: 2014-01-11
上传用户:2525775
USB Manager(usbmgr) 0.4.8 Shuu Yamaguchi <shuu@wondernetworkresources.com> Special Helper: Philipp Thomas When USB devices connect to or disconnect from a USB hub, the usbmgr works as the following according to configuration. a) It loads and unloads files Linux kernel modules. b) It execute file to setup USB devices.
标签: wondernetworkresources Yamaguchi Manager Special
上传时间: 2014-01-27
上传用户:zhaiyanzhong