版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、<p><b> 附錄A 外文文獻(xiàn)</b></p><p> The SCM and µVision2</p><p> 一、Principle of MCU</p><p> Single-chip is an integrated on a single chip a complete computer sys
2、tem. 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
3、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</p>
4、;<p> 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
5、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 f
6、irst design in accordance with the idea of the processor, From then on, th</p><p> Early single-chip 8-bit or all of the four. One of the most successful is INTEL's 8031, because the performance of a si
7、mple 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
8、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. Af</p><p> More than a dedicated single-chip pr
9、ocessor suitable for embedded systems, so it was up to the application. In fact the number of single-chip is the world's largest computer. Modern human life used in almost every piece of electronic and mechanical pro
10、ducts 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.
11、And personal computers also </p><p> Hardwave introduction</p><p> The 8051 family of micro controllers is based on an architecture which is highly optimized for embedded control systems. It i
12、s 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 availab
13、le in a wide array of variations from manufacturers such as Intel, Philips, and Siemens. These manufacturers have added numerous features and peripherals t</p><p> The basic architecture consists of the fol
14、lowing features: </p><p> · an eight bit ALU</p><p> · 32 descrete I/O pins (4 groups of 8) which can be individually accessed</p><p> · two 16 bit timer/counte
15、rs</p><p> · full duplex UART</p><p> · 6 interrupt sources with 2 priority levels</p><p> · 128 bytes of on board RAM</p><p> · separate 64
16、K byte address spaces for DATA and CODE memory</p><p> 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 s
17、uch 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 multiply
18、ing it by the number of processor cycles required by the instruction in question. Therefore, if you have a system which is using </p><p> 二、etting Started with µVision2</p><p> The Keil S
19、oftware 8051 development tools listed below are programs you use to compile your C code, assemble your assembly source files, link and locate object modules and libraries, create HEX files, and debug your target program.
20、</p><p> µVision2 for Windows? is an Integrated Development Environment that combines project management, source code editing, and program debugging in one single, powerful environment.</p><
21、p> The C51 ANSI Optimizing C Cross Compiler creates relocatable object modules from your C source code.</p><p> The A51 Macro Assembler creates relocatable object modules from your 8051 assembly source
22、code.</p><p> The BL51 Linker/Locator combines relocatable object modules created by the C51 Compiler and the A51 Assembler into absolute object modules.</p><p> The LIB51 Library Manager comb
23、ines object modules into libraries that may be used by the linker.</p><p> The OH51 Object-HEX Converter creates Intel HEX files from absolute object modules.</p><p> The RTX-51 Real-time Oper
24、ating System simplifies the design of complex, time-critical software projects.</p><p> Software Development Cycle</p><p> When you use the Keil Software tools, the project development cycle i
25、s roughly the same as it is for any other software development project. </p><p> 1. Create a project, select the target chip from the device database, and configure the tool settings.</p><p>
26、2. Create source files in C or assembly.</p><p> 3. Build your application with the project manager.</p><p> 4. Correct errors in source files.</p><p> 5. Test the linked applica
27、tion.</p><p> µVision2 IDE</p><p> The µVision2 IDE combines project management, a rich-featured editor with interactive error correction, option setup, make facility, and on-line he
28、lp. Use µVision2 to create your source files and organize them into a project that defines your target application. µVision2 automatically compiles, assembles, and links your embedded application and provides a
29、 single focal point for your development efforts.</p><p> LIB51 Library Manager</p><p> The LIB51 library manager allows you to create object library from the object files created by the compi
30、ler and assembler. Libraries are specially formatted, ordered program collections of object modules that may be used by the linker at a later time. When the linker processes a library, only those object modules in the li
31、brary that are necessary to create the program are used.</p><p> BL51 Linker/Locator</p><p> The BL51 linker creates an absolute object module using the object modules extracted from libraries
32、 and those created by the compiler and assembler. An absolute object file or module contains no relocatable code or data. All code and data reside at fixed memory locations. The absolute object file may be used:</p>
33、;<p> To program an EPROM or other memory devices,</p><p> With the µVision2 Debugger for simulation and target debugging,</p><p> With an in-circuit emulator for the program test
34、ing.</p><p> µVision2 Debugger</p><p> The µVision2 symbolic, source-level debugger is ideally suited for fast, reliable program debugging. The debugger includes a high-speed simulat
35、or that let you simulate an entire 8051 system including on-chip peripherals and external hardware. The attributes of the chip you use are automatically configured when you select the device from the Device Database.<
36、/p><p> The µVision2 Debugger provides several ways for you to test your programs on</p><p> real target hardware:</p><p> Install the MON51 Target Monitor on your target syste
37、m and download your program using the Monitor-51 interface built-in to the µVision2 Debugger.</p><p> Use the Advanced GDI interface to attach use the µVision2 Debugger front end with your target
38、system.</p><p> Monitor-51</p><p> The µVision2 Debugger supports target debugging using Monitor-51. The monitor program resides in the memory of your target hardware and communicates wit
39、h the µVision2 Debugger using the serial port of the 8051 and a COM port of your PC. With Monitor-51, µVision2 lets you perform source-level, symbolic debugging on your target hardware.</p><p> RT
40、X51 Real-Time Operating System</p><p> The RTX51 real-time operating system is a multitasking kernel for the 8051 microcontroller family. The RTX51 real-time kernel simplifies the system design, programming
41、, and debugging of complex applications where fast reaction to time critical events is essential. The kernel is fully integrated into the C51 Compiler and is easy to use. Task description tables and operating system cons
42、istency are automatically controlled by the BL51 linker/locator.</p><p> C51 Optimizing C Cross Compiler</p><p> The Keil C51 Cross Compiler is an ANSI C Compiler that was written</p>&
43、lt;p> specifically to generate fast, compact code for the 8051 microcontroller family.</p><p> The C51 Compiler generates object code that matches the efficiency and speed</p><p> of assem
44、bly programming.</p><p> Using a high-level language like C has many advantages over assembly language</p><p> programming:</p><p> Knowledge of the processor instruction set is
45、not required. Rudimentary knowledge of the memory structure of the 8051 CPU is desirable (but not necessary).</p><p> Details like register allocation and addressing of the various memory types and data typ
46、es is managed by the compiler.</p><p> Programs get a formal structure (which is imposed by the C programming language) and can be divided into separate functions. This contributes to source code reusabilit
47、y as well as better overall application structure.</p><p> The ability to combine variable selection with specific operations improves program readability.</p><p> Keywords and operational fun
48、ctions that more nearly resemble the human thought process may be used.</p><p> Programming and program test time is drastically reduced.</p><p> The C run-time library contains many standard
49、routines such as: formatted output, numeric conversions, and floating-point arithmetic.</p><p> Existing program parts can be more easily included into new programs because of modular program construction t
50、echniques.</p><p> The language C is a very portable language (based on the ANSI standard) that enjoys wide popular support and is easily obtained for most systems.</p><p> Existing program in
51、vestments can be quickly adapted to other processors as needed.</p><p> Code Optimizations</p><p> The C51 Compiler is an aggressive optimizing compiler that takes numerous steps to ensure tha
52、t the code generated and output to the object file is the most efficient (smallest and/or fastest) code possible. The compiler analyzes the generated code to produce the most efficient instruction sequences. This ensures
53、 that your C program runs as quickly and effectively as possible in the least amount of code space. </p><p> The C51 Compiler provides nine different levels of optimizing. Each increasing level includes the
54、 optimizations of levels below it. The following is a list of all optimizations currently performed by the C51 Compiler.</p><p> General Optimizations</p><p> Constant Folding: Constant values
55、 occurring in an expression or address calculation are combined as a single constant.</p><p> Jump Optimizing: Jumps are inverted or extended to the final target address when the program efficiency is there
56、by increased.</p><p> Dead Code Elimination: Code that cannot be reached (dead code) is removed from the program.</p><p> Register Variables: Automatic variables and function arguments are loc
57、ated in registers whenever possible. No data memory space is reserved for these variables.</p><p> Parameter Passing Via Registers: A maximum of three function arguments</p><p> may be passed
58、in registers.</p><p> Global Common Subexpression Elimination: Identical subexpressions or address calculations that occur multiple times in a function are recognized and calculated only once whenever possi
59、ble.</p><p> Common Tail Merging: Common instruction blocks are merged together using jump instructions.</p><p> Re-use Common Entry Code: Common instruction sequences are moved in front of a
60、function to reduce code size.</p><p> Principle of MCU</p><p> Single-chip is an integrated on a single chip a complete computer system. Even though most of his features in a small chip, but i
61、t 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
62、 and other peripheral equipment. And now the most powerful single-chip microcomputer system can even voice, image, networking, input and output complex</p><p> Also known as single-chip MCU (Microcontroller
63、), 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 sing
64、le 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, Fr
65、om then on, th</p><p> Early single-chip 8-bit or all of the four. One of the most successful is INTEL's 8031, because the performance of a simple and reliable access to a lot of good praise. Since then
66、 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
67、 beginning of a 16-bit single-chip, but not ideal because the price has not been very widely used. Af</p><p> More than a dedicated single-chip processor suitable for embedded systems, so it was up to the a
68、pplication. In fact the number of single-chip is the world's largest computer. Modern human life used in almost every piece of electronic and mechanical products will have a single-chip integration. Phone, telephone,
69、 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 </p><p> Hardwave
70、introduction</p><p> 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 equip
71、ment 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
72、Intel, Philips, and Siemens. These manufacturers have added numerous features and peripherals t</p><p> The basic architecture consists of the following features: </p><p> · an eight bit
73、 ALU</p><p> · 32 descrete I/O pins (4 groups of 8) which can be individually accessed</p><p> · two 16 bit timer/counters</p><p> · full duplex UART</p>
74、<p> · 6 interrupt sources with 2 priority levels</p><p> · 128 bytes of on board RAM</p><p> · separate 64K byte address spaces for DATA and CODE memory</p>&l
75、t;p> 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 ch
76、ain 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 ins
77、truction in question. Therefore, if you have a system which is using </p><p><b> 附錄B 中文譯文</b></p><p><b> 單片機(jī)和keil</b></p><p><b> 一、單片機(jī)原理</b>&l
78、t;/p><p> 單片機(jī)是指一個(gè)集成在一塊芯片上的完整計(jì)算機(jī)系統(tǒng)。盡管他的大部分功能集成在一塊小芯片上,但是它具有一個(gè)完整計(jì)算機(jī)所需要的大部分部件:CPU、內(nèi)存、內(nèi)部和外部總線系統(tǒng),目前大部分還會(huì)具有外存。同時(shí)集成諸如通訊接口、定時(shí)器,實(shí)時(shí)時(shí)鐘等外圍設(shè)備。而現(xiàn)在最強(qiáng)大的單片機(jī)系統(tǒng)甚至可以將聲音、圖像、網(wǎng)絡(luò)、復(fù)雜的輸入輸出系統(tǒng)集成在一塊芯片上。</p><p> 單片機(jī)也被稱為微控制器(M
79、icrocontroller),是因?yàn)樗钤绫挥迷诠I(yè)控制領(lǐng)域。單片機(jī)由芯片內(nèi)僅有CPU的專用處理器發(fā)展而來。最早的設(shè)計(jì)理念是通過將大量外圍設(shè)備和CPU集成在一個(gè)芯片中,使計(jì)算機(jī)系統(tǒng)更小,更容易集成進(jìn)復(fù)雜的而對(duì)體積要求嚴(yán)格的控制設(shè)備當(dāng)中。INTEL的Z80是最早按照這種思想設(shè)計(jì)出的處理器,從此以后,單片機(jī)和專用處理器的發(fā)展便分道揚(yáng)鑣。</p><p> 早期的單片機(jī)都是8位或4位的。其中最成功的是INTEL的8
80、031,因?yàn)楹?jiǎn)單可靠而性能不錯(cuò)獲得了很大的好評(píng)。此后在8031上發(fā)展出了MCS51系列單片機(jī)系統(tǒng)?;谶@一系統(tǒng)的單片機(jī)系統(tǒng)直到現(xiàn)在還在廣泛使用。隨著工業(yè)控制領(lǐng)域要求的提高,開始出現(xiàn)了16位單片機(jī),但因?yàn)樾詢r(jià)比不理想并未得到很廣泛的應(yīng)用。90年代后隨著消費(fèi)電子產(chǎn)品大發(fā)展,單片機(jī)技術(shù)得到了巨大的提高。隨著INTEL i960系列特別是后來的ARM系列的廣泛應(yīng)用,32位單片機(jī)迅速取代16位單片機(jī)的高端地位,并且進(jìn)入主流市場(chǎng)。而傳統(tǒng)的8位單片機(jī)
81、的性能也得到了飛速提高,處理能力比起80年代提高了數(shù)百倍。目前,高端的32位單片機(jī)主頻已經(jīng)超過300MHz,性能直追90年代中期的專用處理器,而普通的型號(hào)出廠價(jià)格跌落至1美元,最高端的型號(hào)也只有10美元。當(dāng)代單片機(jī)系統(tǒng)已經(jīng)不再只在裸機(jī)環(huán)境下開發(fā)和使用,大量專用的嵌入式操作系統(tǒng)被廣泛應(yīng)用在全系列的單片機(jī)上。而在作為掌上電腦和手機(jī)核心處理的高端單片機(jī)甚至可以直接使用專用的Windows和Linux操作系統(tǒng)。</p><p
82、> 單片機(jī)比專用處理器更適合應(yīng)用于嵌入式系統(tǒng),因此它得到了最多的應(yīng)用。事實(shí)上單片機(jī)是世界上數(shù)量最多的計(jì)算機(jī)?,F(xiàn)代人類生活中所用的幾乎每件電子和機(jī)械產(chǎn)品中都會(huì)集成有單片機(jī)。手機(jī)、電話、計(jì)算器、家用電器、電子玩具、掌上電腦以及鼠標(biāo)等電腦配件中都配有1-2部單片機(jī)。而個(gè)人電腦中也會(huì)有為數(shù)不少的單片機(jī)在工作。汽車上一般配備40多部單片機(jī),復(fù)雜的工業(yè)控制系統(tǒng)上甚至可能有數(shù)百臺(tái)單片機(jī)在同時(shí)工作!單片機(jī)的數(shù)量不僅遠(yuǎn)超過PC機(jī)和其他計(jì)算的綜合,
83、甚至比人類的數(shù)量還要多。 </p><p><b> 單片機(jī)硬件介紹:</b></p><p> 8051系列微控制器是建立在一個(gè)高度優(yōu)化的嵌入式控制系統(tǒng)的結(jié)構(gòu)上。它的運(yùn)用范圍比較廣,從軍事裝備到汽車再到你的PC機(jī)的鍵盤。僅次于摩托羅拉68HC11在8位處理器銷售,8051家庭的微控制器, 在制造商上有各種各樣的變化,如因特爾公司、西門子、飛利浦。這些廠家已經(jīng)增加
84、了許多功能及外設(shè),如總線接口,模擬到數(shù)字轉(zhuǎn)換器,看門狗定時(shí)器、脈沖寬度調(diào)制的輸出。8051的變化,達(dá)到40MHz時(shí)鐘頻率下降到150伏電壓條件是可得到的。這種廣泛的部分基于一個(gè)核心使8051系列的一個(gè)很好的選擇作為基礎(chǔ)架構(gòu)的一個(gè)公司產(chǎn)品,因?yàn)樗梢詧?zhí)行許多功能和開發(fā)者只會(huì)有這樣的一個(gè)平臺(tái)。</p><p> 基本結(jié)構(gòu)由以下特點(diǎn):</p><p> 一個(gè)8為的算術(shù)邏輯單元</p&g
85、t;<p> 32個(gè)離散輸入輸出端口(4組8位)可單獨(dú)訪問</p><p> 二16位?定時(shí)器/計(jì)數(shù)器</p><p> 全雙工通用異步接收/發(fā)送裝置</p><p> 6個(gè)中斷源與2個(gè)優(yōu)先級(jí)別</p><p> 128字節(jié)的隨機(jī)存儲(chǔ)器</p><p> 64K分開字節(jié)地址空間的數(shù)據(jù)和代碼的記
86、憶</p><p> 一個(gè)數(shù)字處理器周期共有十二振蕩器的時(shí)期。他本是十二門徒里的每一個(gè)階段是用于振蕩器的特殊功能的核心,如鳳凰社代碼的數(shù)字和樣品中的全部中斷菊花鏈未決的中斷。所需的時(shí)間任何8051指令可以除以12例,時(shí)鐘頻率通過反演結(jié)果和增殖它的數(shù)字處理器周期所指示的問題。因此,如果你有一個(gè)系統(tǒng),使用一個(gè)11.059MHz時(shí)鐘,可以計(jì)算出的指令數(shù)除以這個(gè)值每秒12分。這給出了921583指令每秒指令頻率。反相這
87、將提供每個(gè)指令周期(1.085微秒)采取的時(shí)間。</p><p> 二、 Keil C 簡(jiǎn)介</p><p> Keil Software 的8051開發(fā)工具提供以下程序,你可以用它們來編譯你的C源碼,匯編你的匯編源程序,連接和重定位你的目標(biāo)文件和庫(kù)文件,創(chuàng)建HEX文件,調(diào)試你的目標(biāo)程序。</p><p> Windows應(yīng)用程序uVision2是一個(gè)集成開發(fā)
88、環(huán)境,它把項(xiàng)目管理,源代碼編輯,程序調(diào)試等集成到一個(gè)功能強(qiáng)大的環(huán)境中。</p><p> C51美國(guó)標(biāo)準(zhǔn)優(yōu)化C交叉編譯器從你的C源代碼產(chǎn)生可重定位的目標(biāo)文件。</p><p> A51宏匯編器從你的8051匯編源代碼產(chǎn)生可重定位的目標(biāo)文件。</p><p> BL51連接/重定位器組合你的由C51和A51產(chǎn)生的可重定位的目標(biāo)文件,生成絕對(duì)目標(biāo)文件。</p
89、><p> LIB51庫(kù)管理器組合你的目標(biāo)文件,生成可以被連接器使用的庫(kù)文件。</p><p> OH51目標(biāo)文件到HEX格式的轉(zhuǎn)換器從絕對(duì)目標(biāo)文件創(chuàng)建Intel HEX 格式的文件。</p><p> RTX-51實(shí)時(shí)操作系統(tǒng)簡(jiǎn)化了復(fù)雜和對(duì)時(shí)間要求敏感的軟件項(xiàng)目。</p><p><b> 軟件開發(fā)流程</b>&l
90、t;/p><p> 當(dāng)你使用Keil Software工具時(shí),你的項(xiàng)目開發(fā)流程和其它軟件開發(fā)項(xiàng)目的流程極其相似。</p><p> 1. 創(chuàng)建一個(gè)項(xiàng)目,從器件庫(kù)中選擇目標(biāo)器件,配置工具設(shè)置。</p><p> 2. 用C語(yǔ)言或匯編語(yǔ)言創(chuàng)建源程序。</p><p> 3. 用項(xiàng)目管理器實(shí)現(xiàn)你的應(yīng)用。</p><p>
91、 4. 修改源程序中的錯(cuò)誤。</p><p> 5. 測(cè)試,連接應(yīng)用。</p><p> uVision2 IDE</p><p> uVision2 集成開發(fā)環(huán)境集成了一個(gè)項(xiàng)目管理器,一個(gè)功能豐富、有錯(cuò)誤提示的編輯器,以及設(shè)置選項(xiàng),生成工具,在線幫助。利用uVision2創(chuàng)建你的源代碼并把它們組織到一個(gè)能確定你的目標(biāo)應(yīng)用的項(xiàng)目中去。uVision2自動(dòng)編譯
92、,匯編,連接你的嵌入式應(yīng)用,并為你的開發(fā)提供一個(gè)單一的焦點(diǎn)。</p><p> C51編譯器和A51匯編器</p><p> 源代碼由uVision2 IDE創(chuàng)建,并被C51編譯或A51匯編。編譯器和匯編器從源代碼生成可重定位的目標(biāo)文件。Keil C51編譯器完全遵照ANSI C語(yǔ)言標(biāo)準(zhǔn),支持C語(yǔ)言的所有標(biāo)準(zhǔn)特性。另外,直接支持8051結(jié)構(gòu)的幾個(gè)特性被添加到里面。Keil A51宏匯編
93、器支持8051及其派生系列的全部指令集。</p><p> LIB51 庫(kù)管理器</p><p> LIB51庫(kù)管理器允許你從由編譯器或匯編器生成的目標(biāo)文件創(chuàng)建目標(biāo)庫(kù)。庫(kù)是一種被特別地組織過并在以后可以被連接重用的對(duì)象模塊。當(dāng)連接器處理一個(gè)庫(kù)時(shí),僅僅那些被使用的目標(biāo)模塊才被真正使用。</p><p> BL51 連接器/定位器</p><p
94、> BL51 連接器/定位器利用從庫(kù)中提取的目標(biāo)模塊和由編譯器或匯編器生成的目標(biāo)模塊創(chuàng)建一個(gè)絕對(duì)地址的目標(biāo)模塊。一個(gè)絕對(duì)地址目標(biāo)模塊或文件包含不可重定位的代碼和數(shù)據(jù)。所有的代碼和數(shù)據(jù)被安置在固定的存儲(chǔ)器單元中。此絕對(duì)地址目標(biāo)文件可以用來:</p><p> 寫入EPROM或其它存儲(chǔ)器件。</p><p> 由uVision2調(diào)試器使用來模擬和調(diào)試。</p><
95、;p> 由仿真器用來測(cè)試程序。</p><p> uVision2 調(diào)試器</p><p> uVision2源代碼級(jí)調(diào)試器是一個(gè)理想地快速,可靠的程序調(diào)試器。此調(diào)試器包含一個(gè)高速模擬器,能夠讓你模擬整個(gè)8051系統(tǒng),包括片上外圍器件和外部硬件。當(dāng)你從器件庫(kù)中選擇器件時(shí),這個(gè)器件的特性將自動(dòng)配置。</p><p> uVision2調(diào)試器為你在實(shí)際目標(biāo)
96、板上測(cè)試你的程序提供了幾種方法:</p><p> 安裝MON51目標(biāo)監(jiān)控器到你的目標(biāo)系統(tǒng)并且通過Monitor-51接口下載你的程序。</p><p> 利用高級(jí)的GDI(AGDI)接口,把uVision2調(diào)試器綁定到你的目標(biāo)系統(tǒng)。</p><p> Monitor-51</p><p> uVision2調(diào)試器支持用Monitor
97、-51進(jìn)行目標(biāo)板調(diào)試。此監(jiān)控程序駐留在你的目標(biāo)板的 存儲(chǔ)器里,它利用串口和uVision2調(diào)試器進(jìn)行通信。利用Monitor-51,uVision2調(diào)試器 可以對(duì)你的目標(biāo)硬件實(shí)行源代碼級(jí)的調(diào)試。</p><p> RTX51實(shí)時(shí)操作系統(tǒng)</p><p> RTX51實(shí)時(shí)操作系統(tǒng)是一個(gè)針對(duì)8051系列的多任務(wù)核。RTX51實(shí)時(shí)內(nèi)核從本質(zhì)上簡(jiǎn)化了對(duì)實(shí)時(shí)事件反應(yīng)速度要求高的復(fù)雜應(yīng)用系統(tǒng)的設(shè)計(jì)
98、,編程和調(diào)試。RTX51實(shí)時(shí)內(nèi)核是完全集成到C51編譯器中的,從而方便使用。任務(wù)描述表和操作系統(tǒng)的連接由BL51連接器/定位器自動(dòng)控制。</p><p> C51優(yōu)化的C語(yǔ)言交叉編譯器</p><p> Keil C51交叉編譯器是一個(gè)基于ANSI C標(biāo)準(zhǔn)的針對(duì)8051系列MCU的C編譯器,生成的可執(zhí)行代碼快速、緊湊,在運(yùn)行效率和速度上可以和匯編程序得到的代碼相媲美。 </p&g
99、t;<p> 和匯編語(yǔ)言相比,用C語(yǔ)言這樣的高級(jí)語(yǔ)言有很多優(yōu)勢(shì),比如:</p><p> 對(duì)處理器的指令集不必了解,8051 CPU的基本結(jié)構(gòu)可以了解,但不是必須的。</p><p> 寄存器的分配以及各種變量和數(shù)據(jù)的尋址都由編譯器完成。</p><p> 程序擁有了正式的結(jié)構(gòu)(由C語(yǔ)言帶來的),并且能被分成多個(gè)單獨(dú)的子函數(shù)。這使整個(gè)應(yīng)用系統(tǒng)的
100、結(jié)構(gòu)變得清晰,同時(shí)讓源代碼變得可重復(fù)使用。</p><p> 選擇特定的操作符來操作變量的能力提高了源代碼的可讀性。</p><p> 可以運(yùn)用和人的思維很接近的詞匯和算法表達(dá)式。</p><p> 編寫程序和調(diào)試程序的時(shí)間得到很大程度的縮短。</p><p> C運(yùn)行連接庫(kù)包含一些標(biāo)準(zhǔn)的子程序,如:格式化輸出,數(shù)字轉(zhuǎn)換,浮點(diǎn)運(yùn)算。&
101、lt;/p><p> 由于程序的模塊結(jié)構(gòu)技術(shù),使得現(xiàn)有的程序段可以很容易的包含到新的程序中去。</p><p> ANSI 標(biāo)準(zhǔn)的C語(yǔ)言是一種豐常方便的,獲得廣泛應(yīng)用的,在絕大部分系統(tǒng)中都能夠很容易得到的語(yǔ)言。</p><p> 因此,如果需要,現(xiàn)有的程序可以很快地移植到其他的處理器上,節(jié)省投資。</p><p><b> 代碼
102、優(yōu)化 </b></p><p> C51是一個(gè)杰出的優(yōu)化編譯器,它通過很多步驟以確保產(chǎn)生的代碼是最有效率的(最小和/或最快)。編譯器通過分析初步的代碼 產(chǎn)生最終的最有效率的代碼序列,以此來保證你的C語(yǔ)言程序占用最少空間的同時(shí)運(yùn)行的快而有效。</p><p> C51編譯器提供9個(gè)優(yōu)化級(jí)別。每個(gè)高一級(jí)的優(yōu)化級(jí)別都包括比它低的所有優(yōu)化級(jí)別的優(yōu)化內(nèi)容。以下列出的是目前C51編譯器
103、提供的所有優(yōu)化級(jí)別的內(nèi)容:</p><p> 常量折疊:在表達(dá)式及尋址過程中出現(xiàn)的常量被綜合為一個(gè)單個(gè)的常量。</p><p> 跳轉(zhuǎn)優(yōu)化:采用反轉(zhuǎn)跳轉(zhuǎn)或直接指向最終目的的跳轉(zhuǎn),從而提升了程序的效率。</p><p> 啞碼消除:永遠(yuǎn)不可能執(zhí)行到的代碼將自動(dòng)從程序中剔除。</p><p> 寄存器變量:只要可能,局部變量和函數(shù)參數(shù)被放
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 眾賞文庫(kù)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 單片機(jī)畢業(yè)設(shè)計(jì)外文翻譯
- 單片機(jī)畢業(yè)設(shè)計(jì)外文翻譯7
- 單片機(jī)基礎(chǔ)畢業(yè)設(shè)計(jì)外文翻譯
- 單片機(jī)畢業(yè)設(shè)計(jì)外文翻譯1
- 單片機(jī)外文翻譯9
- 單片機(jī)畢業(yè)設(shè)計(jì)外文翻譯-- pic系列單片機(jī)的特點(diǎn)
- 單片機(jī)畢業(yè)設(shè)計(jì)外文翻譯單片機(jī)at89c51
- 單片機(jī)畢業(yè)設(shè)計(jì)外文文獻(xiàn)翻譯
- 畢業(yè)設(shè)計(jì)--單片機(jī)畢業(yè)設(shè)計(jì)溫度控制(外文翻譯)
- 單片機(jī)遙控系統(tǒng)畢業(yè)設(shè)計(jì)(含外文翻譯)
- 單片機(jī)畢業(yè)外文翻譯
- 單片機(jī)畢業(yè)設(shè)計(jì)--基于單片機(jī)的智能恒溫箱設(shè)計(jì)(含外文翻譯)
- 單片機(jī)畢業(yè)設(shè)計(jì)英文翻譯--單片機(jī)的組成
- 單片機(jī)畢業(yè)設(shè)計(jì)外文翻譯--at89s52
- 單片機(jī)畢業(yè)設(shè)計(jì)外文翻譯--數(shù)據(jù)傳送指令
- 51系列單片機(jī)外文翻譯電子畢業(yè)設(shè)計(jì)
- 單片機(jī)畢業(yè)設(shè)計(jì)(論文)外文資料翻譯---51系列單片機(jī)的結(jié)構(gòu)和功能
- 單片機(jī)畢業(yè)設(shè)計(jì)----基于單片機(jī)的多功能電子時(shí)鐘設(shè)計(jì)(含外文翻譯)
- 畢業(yè)設(shè)計(jì)外文翻譯---單片機(jī)的組成(中英文)
- 單片機(jī)外文翻譯-----單片機(jī)簡(jiǎn)介
評(píng)論
0/150
提交評(píng)論