有關(guān)單片機(jī)的中英文翻譯資料_第1頁(yè)
有關(guān)單片機(jī)的中英文翻譯資料_第2頁(yè)
有關(guān)單片機(jī)的中英文翻譯資料_第3頁(yè)
有關(guān)單片機(jī)的中英文翻譯資料_第4頁(yè)
有關(guān)單片機(jī)的中英文翻譯資料_第5頁(yè)
已閱讀5頁(yè),還剩2頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、單片機(jī)也被稱為微控制器(microcontroler),單片機(jī)由芯片內(nèi)僅有cpu的專用處理器發(fā)展而來(lái)。最早的設(shè)計(jì)理念是通過(guò)將大量外圍設(shè)備和cpu集成在一個(gè)芯片中,使計(jì)算機(jī)系統(tǒng)更小,更容易集成。早期的單片機(jī)都是8位或4位的。其中最成功的是intel的8031,因?yàn)楹?jiǎn)單可靠而性能不錯(cuò)獲得了好評(píng)。此后在8031上發(fā)展出了mcs51系列單片機(jī)系統(tǒng)?;谶@一系統(tǒng)的單片機(jī)系統(tǒng)直到現(xiàn)在還在廣泛使用。隨著工業(yè)控制領(lǐng)域要求的提高,開(kāi)始出現(xiàn)了16位單片機(jī)。90年代后隨著消費(fèi)電子產(chǎn)品大發(fā)展,單片機(jī)技術(shù)得到了巨大的提高。隨著intel i960系列的出現(xiàn),特別是后來(lái)的arm系列的廣泛應(yīng)用,32位單片機(jī)迅速取代16位單

2、片機(jī)的高端地位,并且進(jìn)入主流市場(chǎng)。而傳統(tǒng)的8位單片機(jī)的性能也得到了飛速提高,處理能力比起80年代提高了數(shù)百倍。目前,高端的32位單片機(jī)主頻已經(jīng)超過(guò)300mhz,性能直追90年代中期的專用處理器。當(dāng)代單片機(jī)系統(tǒng)已經(jīng)不再只在裸機(jī)環(huán)境下開(kāi)發(fā)和使用,大量專用的嵌入式操作系統(tǒng)被廣泛應(yīng)用在單片機(jī)上。作為掌上電腦和手機(jī)核心處理的高端單片機(jī)甚至可以直接使用專用的windows和linux操作系統(tǒng)。 單片機(jī)比專用處理器更適合應(yīng)用于嵌入式系統(tǒng)。事實(shí)上單片機(jī)是世界上數(shù)量最多的計(jì)算機(jī)。現(xiàn)代人類生活中所用的幾乎每件電子和機(jī)械產(chǎn)品中都會(huì)集成有單片機(jī)。手機(jī)、電話、計(jì)算器、家用電器、電子玩具、掌上電腦以及鼠標(biāo)等電腦配件中都配

3、有1-2部單片機(jī)。而個(gè)人電腦中也會(huì)有為數(shù)不少的單片機(jī)在工作。汽車上一般配備40多部單片機(jī),復(fù)雜的工業(yè)控制系統(tǒng)上甚至可能有數(shù)百臺(tái)單片機(jī)在同時(shí)工作!單片機(jī)的數(shù)量不僅遠(yuǎn)超過(guò)pc機(jī)和其他計(jì)算的綜合,甚至比人類的數(shù)量還要多。在單片機(jī)應(yīng)用中,單片機(jī)的系統(tǒng)軟件抗干擾和單片機(jī)的編程調(diào)試一直困擾著初學(xué)者。本文就簡(jiǎn)單的介紹這兩個(gè)問(wèn)題。 單片機(jī)系統(tǒng)軟件抗干擾方法在提高硬件系統(tǒng)抗干擾能力的同時(shí),軟件抗干擾以其設(shè)計(jì)靈活、節(jié)省硬件資源、可靠性好越來(lái)越受到重視。下面以mcs-51單片機(jī)系統(tǒng)為例,對(duì)微機(jī)系統(tǒng)軟件抗干擾方法進(jìn)行研究。 在工程實(shí)踐中,軟件抗干擾研究的內(nèi)容主要是: 一、消除模擬輸入信號(hào)的噪聲(如數(shù)字濾波技術(shù));二、

4、程序運(yùn)行混亂時(shí)使程序重入正軌的方法。本文針對(duì)后者提出了幾種有效的軟件抗干擾方法。 1.指令冗余 cpu取指令過(guò)程是先取操作碼,再取操作數(shù)。當(dāng)pc受干擾出現(xiàn)錯(cuò)誤,程序便脫離正常軌道“亂飛”,當(dāng)亂飛到某雙字節(jié)指令,若取指令時(shí)刻落在操作數(shù)上,誤將操作數(shù)當(dāng)作操作碼,程序?qū)⒊鲥e(cuò)。若“飛” 到了三字節(jié)指令,出錯(cuò)機(jī)率更大。 在關(guān)鍵地方人為插入一些單字節(jié)指令,或?qū)⒂行巫止?jié)指令重寫(xiě)稱為指令冗余。通常是在雙字節(jié)指令和三字節(jié)指令后插入兩個(gè)字節(jié)以上的nop。這樣即使亂飛程序飛到操作數(shù)上,由于空操作指令nop的存在,避免了后面的指令被當(dāng)作操作數(shù)執(zhí)行,程序自動(dòng)納入正軌。 此外,對(duì)系統(tǒng)流向起重要作用的指令如ret、 re

5、ti、lcall、ljmp、jc等指令之前插入兩條nop,也可將亂飛程序納入正軌,確保這些重要指令的執(zhí)行。 2.攔截技術(shù) 所謂攔截,是指將亂飛的程序引向指定位置,再進(jìn)行出錯(cuò)處理。通常用軟件陷阱來(lái)攔截亂飛的程序。因此先要合理設(shè)計(jì)陷阱,其次要將陷阱安排在適當(dāng)?shù)奈恢谩?1)軟件陷阱的設(shè)計(jì) 當(dāng)亂飛程序進(jìn)入非程序區(qū),冗余指令便無(wú)法起作用。通過(guò)軟件陷阱,攔截亂飛程序,將其引向指定位置,再進(jìn)行出錯(cuò)處理。軟件陷阱是指用來(lái)將捕獲的亂飛程序引向復(fù)位入口地址0000h的指令。其機(jī)器碼為0000020000。 2)陷阱的安排 通常在程序中未使用的eprom空間填0000020000。最后一條應(yīng)填入020000,當(dāng)亂飛

6、程序 落到此區(qū),即可自動(dòng)入軌。在用戶程序區(qū)各模塊之間的空余單元也可填入陷阱指令。當(dāng)使用的中斷因干擾而開(kāi)放時(shí),在對(duì)應(yīng)的中斷服務(wù)程序中設(shè)置軟件陷阱,能及時(shí)捕獲錯(cuò)誤的中斷。返回指令可用“reti”,也可用“l(fā)jmp 0000h”。如果故障診斷程序與系統(tǒng)自恢復(fù)程序的設(shè)計(jì)可靠、 完善,用“l(fā)jmp 0000h”作返回指令可直接進(jìn)入故障診斷程序,盡早地處理故障并恢復(fù)程序的運(yùn)行。 考慮到程序存貯器的容量,軟件陷阱一般1k空間有2-3個(gè)就可以進(jìn)行有效攔截。 3.軟件“看門狗”技術(shù) 若失控的程序進(jìn)入“死循環(huán)”,通常采用“看門狗”技術(shù)使程序脫離“死循環(huán)”。通過(guò)不斷檢測(cè)程序循環(huán)運(yùn)行時(shí)間,若發(fā)現(xiàn)程序循環(huán)時(shí)間超過(guò)最大循

7、環(huán)運(yùn)行時(shí)間,則認(rèn)為系統(tǒng)陷入“死循環(huán)”,需進(jìn)行出錯(cuò)處理。 “看門狗”技術(shù)可由硬件實(shí)現(xiàn),也可由軟件實(shí)現(xiàn)。 在工業(yè)應(yīng)用中,嚴(yán)重的干擾有時(shí)會(huì)破壞中斷方式控制字,關(guān)閉中斷。則系統(tǒng)無(wú)法定時(shí),硬件看門狗電路失效。而軟件看門狗可有效地解決這類問(wèn)題。 在實(shí)際應(yīng)用中,采用環(huán)形中斷監(jiān)視系統(tǒng)。用定時(shí)器t0監(jiān)視定時(shí)器t1,用定時(shí)器t1監(jiān)視主程序,主程序監(jiān)視定時(shí)器t0。采用這種環(huán)形結(jié)構(gòu)的軟件“看門狗”具有良好的抗干擾性能,大大提高了系統(tǒng)可靠性。對(duì)于需經(jīng)常使用t1定時(shí)器進(jìn)行串口通訊的測(cè)控系統(tǒng),則定時(shí)器t1不能進(jìn)行中斷,可改由串口中斷進(jìn)行監(jiān)控。這種軟件“看門狗”監(jiān)視原理是:在主程序、t0中斷服務(wù)程序、t1中斷服務(wù)程序中各設(shè)一

8、運(yùn)行觀測(cè)變量,假設(shè)為mwatch、t0watch 、t1watch,主程序每循環(huán)一次,mwatch加,同樣t0、t1中斷服務(wù)程序執(zhí)行一次,t0watch、 t1watch加。在t0中斷服務(wù)程序中通過(guò)檢測(cè)t1watch的變化情況判定t1運(yùn)行是否正常,在t1中斷服務(wù)程序中檢測(cè)mwatch的變化情況判定主程序是否正常運(yùn)行,在主程序中通過(guò)檢測(cè)t0watch的變化情況判別t0是否正常工作。若檢測(cè)到某觀測(cè)變量變化不正常,比如應(yīng)當(dāng)加1而未加1,則轉(zhuǎn)到出錯(cuò)處理程序作排除故障處理。當(dāng)然,對(duì)主程序最大循環(huán)周期、定時(shí)器t0和t1定時(shí)周期應(yīng)予以全盤合理考慮。scm also be known as micro-con

9、troller (microcontroler), scm only by the cpu chip, developed from a dedicated processor. the first design concept is by and large number of peripheral devices integrated in a cpu chip, the computer system is smaller, more easily integrated. early scm are eight or the four. one of the most successfu

10、l is the 8031 intel, because simple and reliable and good performance was praised. since then in 8031 on the development of a series mcs51 scm system. based on this system until now the scm system is still widely used. as the field of industrial control requirements of the increase, began to appear

11、in 16-bit microcontrollers. as the 1990s after the big consumer electronics product development, scm technology got a huge raise. with the emergence of intel i960 series, especially the later arm wide range of applications, 32-bit microcontroller quickly replaced by 16 high-end mcu status and enter

12、the mainstream market. and the traditional 8-bit microcontrollers performance has been improving rapidly, the capacity increase compared with the 1980s a few hundred times. at present, high-speed 32-bit microcontroller has exceeded 300 mhz, catching up performance of the mid-1990s, dedicated process

13、ors. contemporary scm system is no longer only barebone environment in the development and use of a large number of dedicated embedded operating system is widely used in the scm. as handheld computers and mobile phones with high-end microcontroller core can even direct the use of a dedicated windows

14、 and linux operating systems. scm processor for more than suitable for embedded systems. in fact scm is the worlds largest number of computers. modern human life used in almost every electronic and machinery products will integrate a microcontroller. cell phone, telephone, calculator, household appl

15、iances, electronic toys, handheld computers and computer accessories such as a mouse with a 1-2 in both the department of scm. and personal computers will also have a large number of scm at work. general vehicle equipped with more than 40 of the microcontroller, complex industrial control systems ma

16、y have even hundreds of scm at the same time work! scm is not only far exceeded the number of pc and other integrated computing, or even than the number of human beings more. in scm applications, the mcu anti-jamming system software debugging and mcu programming has been troubled for beginners. this

17、 article brief introduction of these two issues. scm system software interference methodsin improving the ability of anti-jamming system hardware, software interference with its flexible design, save hardware resources, more and more attention to reliability. below the mcs-51 scm system as an exampl

18、e, the computer system software interference methods for research. in engineering practice, anti-jamming software on the content of the main ones being: 1, analog input signal to eliminate the noise (such as digital filter technology); two, is running the program when the chaos back to the right tra

19、ck approach. in this paper, which made several effective methods of anti-jamming software. 1. redundant directives cpu process is to take instructions from operating code, and then take a few operators. when the pc interference errors, procedures will be from the normal track flying, when flying to

20、a double-byte instructions, if the instructions for a few moments landed on the operation, as the number-up operation operation code, procedural error will be . if the fly to the three-byte instructions, a greater probability of error. in some key areas were inserted into single-byte instructions, o

21、r to be effective single-byte command rewrite directive known as redundancy. is usually double-byte instructions and orders three bytes inserted after more than two bytes of the nop. this flew to operate even if the number of flying procedures, the air operations of nop because of the existence of t

22、he directive to avoid being behind the operation as a number of implementation, automatically into the right track. in addition, the system flows to play an important role in the directive such as ret, reti, lcall, ljmp, jc, and other instructions inserted before the two nop, also could be flying in

23、to the right track procedures to ensure that the implementation of these important directives. 2. interception technology the so-called blocking, is flying the procedure will lead the specified location and then an error handling. traps are usually software used to block flying procedures. therefore

24、 must be reasonably designed trap, trap in the second to the appropriate location. 1) the design software trap when flying into the non-process procedures, redundant command will not work. by software traps, interceptors flying procedures, to lead the specified location and then an error handling. s

25、oftware trap is used to capture the flying process toward reduction of import address 0000 h instructions. its native code for the 0000020000. 2) the arrangements for traps usually in the process of the unused space filled eprom 0000020000. finally one should fill 020,000, when flying procedures fel

26、l on the area, to automatically orbit. in the user program, and various modules in the margins between the unit can also fill traps command. when using the interference and interruption due to open, in the corresponding interrupt service procedures set up software trap, caught the wrong time can be

27、interrupted. top of instruction available reti, can also be used ljmp 0000h. if the fault diagnosis procedures and systems since the restoration of the design process reliable, complete with ljmp 0000h for the return instructions directly into the fault diagnosis procedures, as soon as possible to d

28、eal with failure and recovery procedures of the operation. taking into account the capacity of program memory, software trap 1 k space in the general 2-3 can be effectively blocked. 3. the software watchdog technology if out-of-control process into the cycle of death, usually a watchdog technology t

29、o process from the death cycle. by constantly testing procedures cycle running time, if the process cycle time exceeds the maximum running time cycle, the system that a cycle of death, the need for error handling. watchdog technology can be hardware, software can be. in industrial applications, seri

30、ous interference may sometimes be interrupted damage control word, closure of interruption. the system can not regularly, hardware watchdog circuit failure. the software watchdog to be effective in solving such problems. in practical applications, using ring interrupted surveillance systems. t0 watc

31、hdog timer with t1, with timer t1 surveillance main program, the main program watchdog t0. this ring used the software watchdog has a good anti-jamming performance, greatly improving the system reliability. the need for frequent use of t1 timer serial communications monitoring and control system, the timer t1 can not be interrupted, may be diverted from the serial port to monitor the interrupt

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝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ù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(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ì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論