【正文】
。 military aerospace and defense systems, sophisticated weapons and other fields, the application of SCM is selfevident.2. Microcontroller Development Of A Few Basic SkillsIn the MCU application development, the code efficiency issues, single chip interference and reliability problems still plagued many developers. MCU development are summarized in a few basic skills to be mastered.1) How to reduce the program39。s bug. Procedures for how to reduce the bug, should first consider the system operation should be considered out of range management parameters are as follows. Physical parameters: These parameters are the input parameters, which include incentive parameters, acquisition and processing of the operating parameters and processing parameters of the end result. Resource parameters: These parameters are system circuit, device, functional unit resources, such as memory, storage unit length, stack depth. Application parameters: these parameters Changbiaoxianwei Some SCM applications, functional unit of application conditions. Process parameters: the orderly operation of that system changes in the parameters.2) How to improve the efficiency of C language programming code. Microcontroller using C language programming is the development and application of microcontroller inevitable trend. If you use the C programming, to achieve maximum efficiency, the best familiar with the use of C piler. First to test after each C piler assembly language statements corresponding to the number of rows, so that efficiency can be very clear. When programming in the future, the most efficient use of piled statements. Various Cpilers are some differences in the efficiency of it will be different piler, excellent C pilers for embedded system code size and execution time than by just the same function written in assembly language 520% long Chengdu. For plex and tight project development time, you can use C language, but only ask you for the MCU system C language and C pilers are very familiar with, with particular attention to the C piler system can support data types and algorithms. Although the C language is the most mon form of highlevel language, but because of their different MCU C piler system manufacturers have some differences, especially in some special function module operation. So, do not know if these characteristics, then the problem would be a lot of debugging them, but lead to the implementation efficiency is lower than assembly language.3) How to solve the single chip interference issues. The most effective way to prevent interference is to remove the interference source, cut off the interference path, but often difficult to achieve, we can only enough antiinterference ability of the SCM strengthened. Hardware system to improve antijamming ability, interference with its flexible design software, saving hardware resources, reliability and more and more attention. The most mon phenomenon of SCM is the interference reduction。 The Runaway, in fact, can also use the software to process traps and watchdog reset back to the state。 so SCM software, the most important interference handle reset state. General SCM will have some signs registers can be used to determine the reasons for reduction。 Alternatively you can bury themselves in the RAM in a number of signs. Reset every time processes, through judging these signs, you can determine the reasons for the different reset。 also can jump directly to different signs corresponding program. This allows a continuous run, users will not notice when using procedures had to be reset again.4) How to test the reliability of microputer systems. When a single chip system design is pleted, microputer systems for different products have different test items and methods, but some must be tested: Test SCM software features perfection。 on electricity, powerdown test。 aging test。 ESD and EFT and other tests. Sometimes, we can simulate the human use, the possible destruction. For example, deliberately using the human body or clothing fabric friction contact port MCU system, thus testing the ability of antistatic. In summary, the SCM has bee a puter development and application of an important aspect of the application of the important significance of SCM is that it fundamentally changes the traditional control system design and design methods. Former must be analog or digital circuits to achieve most of the functions now can use SCM software approach to reality. This software instead of hardware control technology, also known as microcontrol technology, control technology is a revolution in the traditional. In addition, in the development and application process, we must master the skills, improve efficiency in order to fulfill its broader use. 單片機的應用與開發(fā)技巧 目前單片機滲透到我們生活的各個領域,幾乎很難找到哪個領域沒有單片機的蹤跡。本系統(tǒng)以單片機系統(tǒng)為核心,通過與智能傳感器相連,采集并存儲智能傳感器的測量數據,經過分析處理將結果顯示于LCD液晶屏,從而實現了室內環(huán)境的監(jiān)測。因此,單片機的學習、開發(fā)與應用顯得尤為重要。 一、單片機的特點應用 單片機的特點主要有:高集成度,體積小,高可靠性;控制功能強;低電壓,低功耗,便于生產便攜式產品;易擴展;優(yōu)異的性能價格比。目前,單片機的應用領域主要包括:辦公自動化設備;單片機在機電一體化中的應用;在實時過程控制中的應用;單片機在日常生活及家用電器領域的應用;在各類儀器儀表中引入單片機,使儀器儀表智能化,提高測試的自動化程度和精度,簡化儀器儀表的硬件結構,提高其性能價格比;在計算機網絡和通信領域中的應用;商業(yè)營銷設備;單片機在醫(yī)用設備領域中的應用;汽車電子產品;航空航天系統(tǒng)和國防軍事、尖端武器等領域,單片機的應用更是不言而喻。 單片機開發(fā)中的幾個基本技巧 在單片機應用開發(fā)中,代碼的使用效率問題、單片機抗干擾性和可靠性等問題仍困擾著許多研發(fā)者?,F歸納出單片機開發(fā)中應掌握的幾個基本技巧。 如何減少程序中的bug。對于如何減少程序的bug,應該先考慮系統(tǒng)運行中應考慮的超范圍管理參數如下。物理參數:這些參數主要是系統(tǒng)的輸入參數,它包括激勵參數、采集處理中的運行參數和處理結束的結果參數。資源參數:這些參數主要是系統(tǒng)中的電路、器件、功能單元的資源,如記憶體容量、存儲單元長度、堆疊深度。應用參數:這些應用參數常表現為一些單片機、功能單元的應用條件。過程參數:指系統(tǒng)運行中的有序變化的參數。 如何提高C語言編程代碼的效率。用C語言進行單片機程序設計是單片機開發(fā)與應用的必然趨勢。如果使用C編程時,要達到最高的效率,最好熟悉所使用的C編譯器。先試驗一下每條C語言編譯以后對應的匯編語言的語句行數,這樣就可以很明確的知道效率。在今后編程的時候,使用編譯效率最高的語句。各家的C編譯器都會有一定的差異,故編譯效率也會有所不同,優(yōu)秀的嵌入式系統(tǒng)C編譯器代碼長度和執(zhí)行時間僅比以匯編語言編寫的同樣功能程度長520%。對于復雜而開發(fā)時間緊的項目時,可以采用C語言,但前提是要求你對該MCU系統(tǒng)的C語言和C編譯器非常熟悉,特別要注意該C編譯系統(tǒng)所能支持的數據類型和算法。雖然C語言是最普遍的一種高級語言,但由于不同的MCU廠家其C語言編譯系統(tǒng)是有所差別的,特別是在一些特殊功能模塊的操作上。所以如果對這些特性不了解,那么調試起來問題就會很多,反而導致執(zhí)行效率低于匯編語言。 如何解決單片機的抗干擾性問題。防止干擾最有效的方法是去除干擾源、隔斷干擾路徑,但往往很難做到,所以只能看單片機抗干擾能力夠不夠強了。在提高硬件系統(tǒng)抗干擾能力的同時