【正文】
or instruction set is not required. Rudimentary knowledge of the memory structure of the 8051 CPU is desirable (but not necessary). Details like register allocation and addressing of the various memory types and data types is managed by the piler. 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 reusability as well as better overall application structure. The ability to bine variable selection with specific operations improves program readability. Keywords and operational functions that more nearly resemble the human thought process may be used. Programming and program test time is drastically reduced. The C runtime library contains many standard routines such as: formatted output, numeric conversions, and floatingpoint arithmetic. Existing program parts can be more easily included into new programs because of modular program construction techniques. 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. Existing program investments can be quickly adapted to other processors as needed. Code Optimizations The C51 Compiler is an aggressive optimizing piler that takes numerous steps to ensure that the code generated and output to the object file is the most efficient (smallest and/or fastest) code possible. The piler analyzes the generated code to produce the most efficient instruction sequences. This ensures that your C program runs as quickly and effectively as possible in the least amount of code space. The C51 Compiler provides nine different levels of optimizing. Each increasing level includes the optimizations of levels below it. The following is a list of all optimizations currently performed by the C51 Compiler. General Optimizations Constant Folding: Constant values occurring in an expression or address calculation are bined as a single constant. Jump Optimizing: Jumps are inverted or extended to the final target address when the program efficiency is thereby increased. Dead Code Elimination: Code that cannot be reached (dead code) is removed from the program. Register Variables: Automatic variables and function arguments are located in registers whenever possible. No data memory space is reserved for these variables.? Parameter Passing Via Registers: A maximum of three function arguments? may be passed in registers. Global Common Subexpression Elimination: Identical subexpressions or address calculations that occur multiple times in a function are recognized and calculated only once whenever possible. Common Tail Merging: Common instruction blocks are merged together using jump instructions. Reuse Common Entry Code: Common instruction sequences are moved in front of a function to reduce code size. 2 Principle of MCU Singlechip is an integrated on a single chip a plete puter system. Even though most of his features in a small chip, but it has a need to plete the majority of puter ponents: CPU, memory, internal and external bus system, most will have the Core. At the same time, such as integrated munication interfaces, timers, realtime clock and other peripheral equipment. And now the most powerful singlechip microputer system can even voice, image, working, input and output plex system integration on a single chip. Also known as singlechip MCU (Microcontroller), because it was first used in the field of industrial control. Only by the singlechip 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 puter system so that smaller, more easily integrated into the plex 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 singlechip 8bit or all of the four. One of the most successful is INTEL39。s close on the heels of a special processor, while the ordinary price of the model dropped to one . dollars, the most highend models, only 10 . dollars. Contemporary singlechip microputer system is no longer only the baremetal environment in the development and use of a large number of dedicated embedded operating system is widely used in the full range of singlechip microputer. In PDAs and cell phones as the core processing of highend singlechip or even a dedicated direct access to Windows and Linux operating systems. More than a dedicated singlechip processor suitable for embedded systems, so it was up to the application. In fact the number of singlechip is the world39。 32 descrete I/O pins (4 groups of 8) which can be individually accessed 128 bytes of on board RAM 本課題就是一個溫度檢測及狀態(tài)顯示的監(jiān)控系統(tǒng)。溫度控制的基本原理為 :當 DSl8B20 采集到溫度信號后,將溫度信號送至 AT89S52 中處理,同時將溫度送到 LCD 液晶屏顯示,單片機根據(jù)初始化設(shè)置的溫度上下限 進行判斷處理,即如果溫度大于所設(shè)的最高溫度就啟動風扇降溫 ; 如果溫度小于所設(shè)定的最低溫度就啟動報警裝置。系統(tǒng)整體硬件電路包括,電源電路,傳感器電路,溫度顯示電路,上下限報警電路等如圖 1 所示。溫度檢測與狀態(tài)顯示技術(shù)與設(shè)備已經(jīng)普遍應(yīng) 用于各行各業(yè),市場上的產(chǎn)品層出不窮。 full duplex UART s 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: s with the big consumer electronics product development, singlechip technology is a huge improvement. INTEL i960 Series with subsequent ARM in particular, a broad range of applications, quickly replaced by 32bit singlechip 16bit singlechip highend status, and enter the mainstream market. Traditional 8bit singlechip performance has been the rapid increase in processing power pared to the 8039。Vision2 Debugger supports target debugging using Monitor51. The monitor program resides in the memory of your target hardware and municates with the 181。Visi