【正文】
電路。輸入至內(nèi)部時鐘信號要通過一個二分頻觸發(fā)器,因此對外部時鐘信號的脈寬無任何要求,但必須保證脈沖的高低電平要求的寬度。利用其內(nèi)部的振蕩電路 XTAL1 和 XTAL2 引線上外接定時元件,內(nèi)部振蕩電路便產(chǎn)生自激振蕩,用示波器可以觀察到 XTAL2 輸出的時鐘信號。晶體可在 之間選擇。對電容無嚴格要求,但它的取值對振蕩頻率輸出的穩(wěn)定性、大小及振蕩電路起振蕩速度有一點影響。外部時鐘方式是把外部振蕩信號源直接接入 XTAL1 或XTAL2。 程序下載模塊 該模塊完成的功能是把源程序代碼下載到 AT89S51 芯片中,它需要和運城學(xué)院計算機科學(xué)與技術(shù)系畢業(yè)論文第 12 –頁 共 33 頁微機上的 ISP 下載器軟件配合使用來完成這樣的功能。ISP 在線編程接口為 89S51 單片機提供了方便的在線編程方法。下載線插接說明:兩排十針下載口, 1 號引腳的邊上有一個小方框;下載線的凸口為正方向,凸口的右側(cè)邊的第一個插孔為 1 號引腳,這一點一定要切記,不然的話程序下載不進去。匯編語言是一種用來替代機器語言進行程序設(shè)計的語言。由于助記符用英文縮寫來描述指令的特征,因此它不但便于記憶,也便于理解和分類。在單片機系統(tǒng)設(shè)計中,程序設(shè)計是重要的一環(huán),它的質(zhì)量直接影響到整個系統(tǒng)的功能,用匯編語言進行程序設(shè)計的過程大致可以分為以下幾個步驟:(1) 明確課題對程序功能、運算精度、執(zhí)行速度等方面的要求及硬件條件。對復(fù)雜問題可分別畫出分模塊流程圖和總的流程圖。(4) 編制程序,根據(jù)程序流程圖精心選擇合適的指令和尋址方式來編制源程序。將編制好的源程序進行匯編,并進行目標(biāo)程序、檢查修改程序中的錯誤,對程序運行結(jié)果進行分析,直到正確為止。電梯下降時則進行 8 到 1 層按鍵的循環(huán)檢測。 程序初始化 TCOUNT EQU4CHCENG EQU4DHORG0000HLJMP STARTORG000BHLJMP INT0XORG0030H。START: MOVTMOD,01HMOVTH0,3CHMOVTL0,0B0H 。把30H到4DH這30個單元清0MOVP0,06HMOVP3,0F8H運城學(xué)院計算機科學(xué)與技術(shù)系畢業(yè)論文第 16 –頁 共 33 頁 主程序調(diào)用XUN: JB ,ONELCALL YS10MSJB ,ONE 。若按下則把對應(yīng)的紅色發(fā)光二極管點亮ONE: JB ,TWO LCALL YS10MS JB ,TWO 。若按下則把對應(yīng)的紅色發(fā)光二極管點亮TWO: JB ,THRLCALL YS10MSJB ,THRTHR: JB ,FOULCALL YS10MSJB ,FOUFOU: JB ,FIVLCALL YS10MSJB ,FIVFIV: JB ,SIXLCALL YS10MSJB ,SIXSIX: JB ,SEVLCALL YS10MSJB ,SEVSEV: JB ,XUNLCALL YS10MSJB ,XUNLJMP XUN 中斷程序調(diào)用INT0X: MOVTH0,3CHMOVTL0,0B0H模擬電梯控制系統(tǒng)設(shè)計第 17 –頁 共 33 頁INCTCOUNTMOVA,TCOUNTCJNE A,5,ZHUAN2 。上升的箭頭MOVA,CENGCJNE A,00H,SS2MOVP0,06H 。一層門開的聲音開SSX1_1: CJNE A,2,SSX1_2SETB 。一層門關(guān)的聲音開SSX1_3: CJNE A,17,ZHUAN2 。一層門關(guān)的聲音關(guān)SETB 。8*250MS=2S(總共次,但實際上升一層只用次MS)MOV31H,0INCCENGSS2: MOV A,CENGCJNE A,01H,SS3MOVP0,5BH 。二層門開的聲音開SSX2_1: CJNE A,2,SSX2_2SETB 。二層門關(guān)的聲音開SSX2_3: CJNE A,17,ZHUAN2 。二層門關(guān)的聲音關(guān)SETB 。8*250MS=2S(總共次,但實際上升一層只用次MS?MOV33H,0LJMP ZHUAN3模擬電梯控制系統(tǒng)設(shè)計第 19 –頁 共 33 頁第四章 系統(tǒng)調(diào)試 硬件調(diào)試硬件調(diào)試是利用開發(fā)系統(tǒng)、基本測試儀器(萬用表、示波器等) ,檢查用戶系統(tǒng)硬件中存在的故障。 靜態(tài)調(diào)試 靜態(tài)調(diào)試是在用戶系統(tǒng)未工作時的一種硬件檢測。檢查外部的各種元件或者是電路是否有斷點。先用萬用表復(fù)核目測中有疑問的連接點,再檢測各種電源線與地線之間是否有短路現(xiàn)象。給板加電,檢測所有的插座或是器件的電源端是否符合要求的值 。因為只有用單片機開發(fā)系統(tǒng)才能完成對用戶系統(tǒng)的調(diào)試。動態(tài)調(diào)試的一般方法是由近及遠、由分到合。當(dāng)調(diào)試電路時,與該元件無關(guān)的器件全部從用戶系統(tǒng)中去掉,這樣可以將故障范圍限定在某個局部的電路上。由近及遠是將信號流經(jīng)的各器件按照距離單片機的邏輯距離進行由近及遠的分層,然后分層調(diào)試。(1) 實驗平臺 軟件調(diào)試在 KEIL 編譯器下進行,運行在 Windows XP操作系統(tǒng)下。運城學(xué)院計算機科學(xué)與技術(shù)系畢業(yè)論文第 20 –頁 共 33 頁(2) 實驗步驟 1) 按照系統(tǒng)硬件連線圖連好。3) 先按下開啟鍵,觀察 LED 能否正常顯示,再觀察發(fā)光二極管形成的上升下降信號和 LED 顯示的數(shù)字增大減小是否一致,當(dāng)這些都符合指標(biāo)后,再按下任意按鍵,看其是否能達到預(yù)想目的。模擬電梯控制系統(tǒng)設(shè)計第 21 –頁 共 33 頁 第五章 英文翻譯 SCM is an integrated circuit chip, the use of large scale technology to a data processing capability (such as arithmetic operations, logic operations, data transfer, interrupt handling) of the microprocessor (CPU), random access data memory (RAM), readonly program memory (ROM), input and output circuits (I / O ports), may also include regular counters, serial port (SCI), display driver circuit (LCD or LED driver circuits), pulse width modulation circuit (PWM), analog multiplexers and A / D converter circuit into a single chip to form a minimum, however, improve the puter system. These circuits can be under the control of the software is accurate, rapid and efficient pletion of the mandate in advance programmers. This point of view, the microcontroller has a microprocessor functions are not available, it can be done alone by the modern industrial control requirements of the intelligent control function, which is the biggest single chip features. SCM is different from the SBC, however, chip in the absence of development of the former, it just has a very strong function of ultra large scale integrated circuits, to give it a specific procedure if it is a minimum, a plete microputer control system, it singleboard puter or personal puter (PC) is essentially different, the application is chip microcontroller applications, microcontroller chip requires the user to understand the structure and mand systems, and other IC applications and system design theory and techniques required by This applicationspecific chip design, so that the chip has a specific function. Different microcontroller have different hardware features and software features, technical features that they are not the same, depending on the hardware features of the internal structure of single chip, users want to use a microcontroller, must know whether this type of product to meet the required functionality and the required application performance index. This technology features include features, control characteristics and electrical characteristics, etc., the information needs of technical manuals from the manufacturers to get. Software feature is the mand system features and development support environment, the mand features that we are familiar with the microcontroller addressing, data processing and logical approach, inputoutput characteristics and power requirements, and so on. Development support environment for patibility and portability, including instruction, support software (including support for developing applications software resources), and hardware resources. To use a model to develop their own application MCU and grasp the structure and technical characteristics are necessary. SCM control system can replace the previous use of plex electronic circuits or digital circuits of the control system, software control to achieve, and to achieve intelligent MCU control areas are now ubiquitous, such as munication products, home appliances, smart instrumentation, process control and special control devices, etc., microcontroller applications and more extensive. Indeed, the application of SCM significance far beyond the scope of its application or the resulting economic benefits, more importantly, it has fundamentally changed the traditional control methods and design ideas. Control techn