虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

Sales<b>m</b>an

  • Keil C51使用详解

    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 及定时器等,能对嵌入式软件功能进行有效测试。

    标签: Keil C51 使用详解

    上传时间: 2013-11-01

    上传用户:zhouxuepeng1

  • PCA9549 Octal bus switch with

    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.

    标签: switch Octal 9549 with

    上传时间: 2014-11-22

    上传用户:xcy122677

  • Input Signal Rise and Fall Tim

    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.For input signals, which do not provide the required rise/fall times, external circuitry mustbe used to shape the signal transitions.In the attached diagram, the effect of the sample rate is shown. The numbers 1 to 5 in thediagram represent possible sample points. Waveform a) shows the result if the inputsignal transition time through the undefined TTL-level area is less than the time distancebetween the sample points (sampling at 1, 2, 3, and 4). Waveform b) can be the result ifthe sampling is performed more than once within the undefined area (sampling at 1, 2, 5,3, and 4).Sample points:1. Evaluation of the signal clearly results in a low level2. Either a low or a high level can be sampled here. If low is sampled, no transition willbe detected. If the sample results in a high level, a transition is detected, and anappropriate action (e.g. capture) might take place.3. Evaluation here clearly results in a high level. If the previous sample 2) had alreadydetected a high, there is no change. If the previous sample 2) showed a low, atransition from low to high is detected now.

    标签: Signal Input Fall Rise

    上传时间: 2013-10-23

    上传用户:copu

  • —图数据类型的实现——问题描述:图是一种较线性表和树更为复杂的数据结构。在图形结构中

    —图数据类型的实现——问题描述:图是一种较线性表和树更为复杂的数据结构。在图形结构中,结点之间的关系是任意的,任意两个数据元素之间都可能相关,因此,图的应用非常广泛,已渗入到诸如语言学‘逻辑学、物理、化学、电讯工程、计算机科学及数学的其它分支中。因此,实现图这种数据类型也尤为重要,在该练习中即要实现图的抽象数据类型。基本要求:2、 定义出图的ADT;3、 采用邻接矩阵及邻接表的存储结构(有向图也可使用十字链表)实现以下操作:a. 构造图 b. 销毁图 c. 定位操作d. 访问图中某个顶点的操作e. 给图中某个顶点赋值的操作f. 找图中某个顶点的第一个邻接点g. 找出图G中顶点v相对于w的下一个邻接点h. 在图G中添加新顶点vi. 删除图G中顶点vj. 在图G中插入一条边k. 在图G中删除一条边l. 实现图的深度遍历操作m. 实现图的广度遍历操作参考提示:具体内容参看教科书本156页实验要求:对于以上具体操作要求实现时有良好的用户交互界面。详细设计、编码、测试。

    标签: 数据类型 图形 线性

    上传时间: 2015-03-13

    上传用户:saharawalker

  • prolog 找路例子程序: === === === === === === Part 1-Adding connections Part 2-Simple Path example

    prolog 找路例子程序: === === === === === === Part 1-Adding connections Part 2-Simple Path example | ?- path1(a,b,P,T). will produce the response: T = 15 P = [a,b] ? Part 3 - Non-repeating path As an example, the query: ?- path2(a,h,P,T). will succeed and may produce the bindings: P = [a,depot,b,d,e,f,h] T = 155 Part 4 - Generating a path below a cost threshold As an example, the query: ?- path_below_cost(a,[a,b,c,d,e,f,g,h],RS,300). returns: RS = [a,b,depot,c,d,e,g,f,h] ? RS = [a,c,depot,b,d,e,g,f,h] ? no ==================================

    标签: Part connections example prolog

    上传时间: 2015-04-24

    上传用户:ljt101007

  • DELPHI basicCtrl+NUM 直接将光标跳到NUM处

    DELPHI basicCtrl+NUM 直接将光标跳到NUM处,NUM是用Ctrl+Shift+NUM设置的标号。 NUM不能用小键盘。 Ctrl+Home 将光标移至文件头。 Ctrl+End 将光标移至文件尾。 Ctrl+B Buffer List窗口。 Ctrl+I 同Tab键。 Ctrl+M 同Enter键。 Ctrl+N 同Enter键,但光标位置保持不变。 Ctrl+T 删除光标右边的一个单词。 Ctrl+Y 删除光标所在行。 Ctrl+Shift+↑ 光标在函数体内时,将光标快速移至当前函数声明处。 Ctrl+Shift+↓ 光标在函数声明行时,将光标快速移至函数定义处。 Ctrl+Shift+C 声明一个过程或函数后,直接生成过程或函数的名称、begin、end Ctrl+Shift+E 光标在Edit窗口和Explorer窗口间切换。 Ctrl+Shift+G 插入GUID。 Ctrl+Shift+J 弹出Delphi语句提示窗口,选择所需语句将自动完成一条语句。 Ctrl+Shift+T 在光标行加入To-Do注释。 Ctrl+Shift+Y 删除光标之后至本行末尾之间的文本。 Ctrl+F3 Call Stack窗口。 Ctrl+F4 等于File菜单中的Close项。

    标签: basicCtrl NUM DELPHI 光标

    上传时间: 2014-11-26

    上传用户:kr770906

  • MATLABThe CD-ROM accompanying this book contains MATLAB® M-files (MATLAB language source code) an

    MATLABThe CD-ROM accompanying this book contains MATLAB® M-files (MATLAB language source code) and Simulink® block diagram models for designing, implementing and testing control systems.

    标签: MATLAB accompanying MATLABThe contains

    上传时间: 2013-11-26

    上传用户:yyyyyyyyyy

  • The IEEE Multipath Channel block simulates an indoor UWB channel as described in "A Channel Model fo

    The IEEE Multipath Channel block simulates an indoor UWB channel as described in "A Channel Model for Ultrawideband Indoor Communications" by J.R. Foerster, M. Pendergrass and A.F. Molisch, November 2003, and attempts to incorporate the processes used in their MATLAB scripts.

    标签: Channel Multipath simulates described

    上传时间: 2015-05-08

    上传用户:水中浮云

  • MFC Black Book Introduction: Are you an MFC programmer? Good. There are two types of MFC programme

    MFC Black Book Introduction: Are you an MFC programmer? Good. There are two types of MFC programmers. What kind are you? The first kind are the good programmers who write programs that conform to the way MFC wants you to do things. The second bunch are wild-eyed anarchists who insist on getting things done their way. Me, I’m in the second group. If you are in the same boat (or would like to be) this book is for you. This book won’t teach you MFC—not in the traditional sense. You should pick it up with a good understanding of basic MFC programming and a desire to do things differently. This isn’t a Scribble tutorial (although I will review some fundamentals in the first chapter). You will learn how to wring every drop from your MFC programs. You’ll discover how to use, abuse, and abandon the document/view architecture. If you’ve ever wanted custom archives, you’ll find that, too.

    标签: MFC Introduction programmer programme

    上传时间: 2015-05-30

    上传用户:youke111

  • LCS(最长公共子序列)问题可以简单地描述如下: 一个给定序列的子序列是在该序列中删去若干元素后得到的序列。给定两个序列X和Y

    LCS(最长公共子序列)问题可以简单地描述如下: 一个给定序列的子序列是在该序列中删去若干元素后得到的序列。给定两个序列X和Y,当另一序列Z既是X的子序列又是Y的子序列时,称Z是序列X和Y的公共子序列。例如,若X={A,B,C,B,D,B,A},Y={B,D,C,A,B,A},则序列{B,C,A}是X和Y的一个公共子序列,但它不是X和Y的一个最长公共子序列。序列{B,C,B,A}也是X和Y的一个公共子序列,它的长度为4,而且它是X和Y的一个最长公共子序列,因为X和Y没有长度大于4的公共子序列。 最长公共子序列问题就是给定两个序列X={x1,x2,...xm}和Y={y1,y2,...yn},找出X和Y的一个最长公共子序列。对于这个问题比较容易想到的算法是穷举,对X的所有子序列,检查它是否也是Y的子序列,从而确定它是否为X和Y的公共子序列,并且在检查过程中记录最长的公共子序列。X的所有子序列都检查过后即可求出X和Y的最长公共子序列。X的每个子序列相应于下标集{1,2,...,m}的一个子集。因此,共有2^m个不同子序列,从而穷举搜索法需要指数时间。

    标签: 序列 LCS 元素

    上传时间: 2015-06-09

    上传用户:气温达上千万的