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
The ISO7220 and ISO7221 are dual-channel digital isolators. To facilitate PCB layout, the channels are orientedin the same direction in the ISO7220 and in opposite directions in the ISO7221. These devices have a logic inputand output buffer separated by TI’s silicon-dioxide (SiO2) isolation barrier, providing galvanic isolation of up to4000 V. Used in conjunction with isolated power supplies, these devices block high voltage, isolate grounds, andprevent noise currents on a data bus or other circuits from entering the local ground and interfering with ordamaging sensitive circuitry.
上传时间: 2013-10-24
上传用户:hbsunhui
基于单DSP的VoIP模拟电话适配器研究与实现:提出和实现了一种新颖的基于单个通用数字信号处理器(DSP)的VoIP模拟电话适配器方案。DSP的I/O和存储资源非常有限,通常适于运算密集型应用,不适宜控制密集型应用[5]。该系统高效利用单DSP的I/O和片内外存储器资源,采用μC/OS-II嵌入式实时操作系统,支持SIP和TCP-UDP/IP协议,通过LAN或者宽带接入,使普通电话机成为Internet终端,实现IP电话。该系统软硬件结构紧凑高效,运行稳定,成本低,具有广阔的应用前景。关键词:模拟电话适配器;IP电话;数字信号处理器;μC/OS-II 【Abstract】This paper presents a VoIP ATA solution based on a single digital signal processor (DSP). DSPs are suitable for arithmetic-intensiveapplication and unsuitable for control-intensive application because of the limitation of I/O and memory resources. This solution is based on a 16-bitfixed-point DSP and μC/OS-II embedded real-time operating system. It makes good use of the limited resources, supports SIP and TCP-UDP/IPprotocol. It can connect the analog telephone to Internet and realize the VoIP application. This system has a great future for its high efficiency andlow cost.【Key words】Analog telephone adapter (ATA); Voice over Internet protocol (VoIP); Digital signal processor (DSP); μC/OS-II Research and Implementation of VoIPATA Based on Single DSP
上传时间: 2013-11-20
上传用户:Wwill
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.
上传时间: 2013-10-23
上传用户:copu
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
The PL2303 USB to Serial adapter is your smart and convenient accessory forconnecting RS-232 serial devices to your USB-equipped Windows host computer. Itprovides a bridge connection with a standard DB 9-pin male serial port connector inone end and a standard Type-A USB plug connector on the other end. You simplyattach the serial device onto the serial port of the cable and plug the USB connectorinto your PC USB port. It allows a simple and easy way of adding serial connectionsto your PC without having to go thru inserting a serial card and traditional portconfiguration.This USB to Serial adapter is ideal for connecting modems, cellular phones, PDAs,digital cameras, card readers and other serial devices to your computer. It providesserial connections up to 1Mbps of data transfer rate. And since USB does not requireany IRQ resource, more devices can be attached to the system without the previoushassles of device and resource conflicts.Finally, the PL-2303 USB to Serial adapter is a fully USB Specification compliantdevice and therefore supports advanced power management such as suspend andresume operations as well as remote wakeup. The PL-2303 USB Serial cable adapteris designed to work on all Windows operating systems.
上传时间: 2013-11-01
上传用户:ghostparker
The SDI standards are the predominant standards for uncompressed digital videointerfaces in the broadcast studio and video production center. The first SDI standard,SD-SDI, allowed standard-definition digital video to be transported over the coaxial cableinfrastructure initially installed in studios to carry analog video. Next, HD-SDI wasto support high-definition video. Finally, dual link HD-SDI and 3G-SDIdoubled the bandwidth of HD-SDI to support 1080p (50 Hz and 60 Hz) and other videoformats requiring more bandwidth than HD-SDI provides.
上传时间: 2013-10-08
上传用户:yjj631
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
The LPC1850/30/20/10 are ARM Cortex-M3 based microcontrollers for embeddedapplications. The ARM Cortex-M3 is a next generation core that offers systemenhancements such as low power consumption, enhanced debug features, and a highlevel of support block integration.The LPC1850/30/20/10 operate at CPU frequencies of up to 150 MHz. The ARMCortex-M3 CPU incorporates a 3-stage pipeline and uses a Harvard architecture withseparate local instruction and data buses as well as a third bus for peripherals. The ARMCortex-M3 CPU also includes an internal prefetch unit that supports speculativebranching.The LPC1850/30/20/10 include up to 200 kB of on-chip SRAM data memory, a quad SPIFlash Interface (SPIFI), a State Configuration Timer (SCT) subsystem, two High-speedUSB controllers, Ethernet, LCD, an external memory controller, and multiple digital andanalog peripherals.
上传时间: 2014-12-31
上传用户:zhuoying119