【正文】
ral infections of the mother, such as rubella, or of the young child, such as encephalitis, mumps, and measles, occasionally appear to cause autistic disorders. The mon childhood immunization series known as MMR (measles, mumps, rubella) has recently e under scrutiny as a possible cause of some autistic can make a true claim to being the only major sport that is an American invention. From high school to the professional level, basketball attracts a large following for live games as well as television coverage of events like the National Collegiate Athletic Association (NCAA) annual tournament and the National Basketball Association (NBA) and Women39。 Have declared the end of the encounter that haven39。s time, your ideas are always special to clear. Want, want, line is clear, as if nothing could shake his. Also once seemed to be determined to do something, but more often is he backed out at last. Dislike his cowardice, finally found that there are a lot of love, there are a lot of miss, like 發(fā)動機(jī)轉(zhuǎn)速 電控系統(tǒng)程序設(shè)計及仿真 32 shadow really have been doomed. Those who do, just green years oneself give oneself an arm injection, or is a selfrighteous spiritual. 一個人的時候,自己的想法總是特別地清晰。 The end of our life, and can meet many things really do? 而窮盡我們的一生,又能遇到多少事情是真正地非做不可? During my childhood, think lucky money and new clothes are necessary for New Year, but as the advance of the age, will be more and more found that those things are optional。s 21 win. Michel Platini, president of European football39。t agree with the disciplinary action your employer has taken against you ? your employer dismisses you and you think that you have been dismissed unfairly. For more information about dismissal and unfair dismissal, see Dismissal. You can make a claim to an employment tribunal, even if you haven39。 } }else { Flag=1。 } // //外部中斷 0的中斷函數(shù) // void INT(void) interrupt 0 { if(Flag) { static unsigned char m=0。 for(i=0。 EX0=1。 dd[0]=d/1000。 write_cmd(0x38)。 } void write_data(uchar date)//寫數(shù)據(jù)子程序 { RS=1。y)。 }else { LED=1。 } write_cmd(0x80+0x40)。 dis_dat=0。 void LCD_Disp(uint d)。 //溢出次數(shù) unsigned long T[5]。 發(fā)動機(jī)轉(zhuǎn)速 電控系統(tǒng)程序設(shè)計及仿真 16 發(fā)動機(jī)轉(zhuǎn)速 電控系統(tǒng)程序設(shè)計及仿真 17 結(jié)論 致謝 發(fā)動機(jī)轉(zhuǎn)速 電控系統(tǒng)程序設(shè)計及仿真 18 參考文獻(xiàn) [1] 徐崢穎 編著 .Protel99SE EDA 技術(shù)及應(yīng)用 [M].北京:機(jī)械工業(yè)出版社, 2021. [2] 張靖武編著 .單片機(jī)系統(tǒng)的 protues 設(shè)計與仿真 [M].北京:電子工業(yè)出版社, 2021. [3] 李朝青編著 .單片機(jī)原理及接口技術(shù) [M].北京:北京航空航天大學(xué)出版社, 2021. [4] 邊春遠(yuǎn)編著 .MCS51單片機(jī)應(yīng)用開發(fā)實用子程序 [M].北京:人民郵電出版社, 2021. [5] 劉守義編著 .單片機(jī)應(yīng)用技術(shù) [M].西安:西安電子科技大學(xué)出版社, 2021. [6] 韓志軍編著 .單片機(jī)應(yīng)用系統(tǒng)設(shè)計 [M].北京:機(jī)械工業(yè)出版社, 2021. [7] 張毅剛,劉喜元 編著 .新編 MCS51單片機(jī)應(yīng)用設(shè)計 [M].哈爾濱:哈爾濱工業(yè)大學(xué)出版社, 2021. [8] 唐嵐編著 .汽車測試技術(shù) [M].北京:機(jī)械工業(yè)出版社, 2021. 發(fā)動機(jī)轉(zhuǎn)速 電控系統(tǒng)程序設(shè)計及仿真 19 附錄 A:原理圖 發(fā)動機(jī)轉(zhuǎn)速 電控系統(tǒng)程序設(shè)計及仿真 20 附錄 B:程序編譯 發(fā)動機(jī)轉(zhuǎn)速 電控系統(tǒng)程序設(shè)計及仿真 21 附錄 C:仿真圖 發(fā)動機(jī)轉(zhuǎn)速 電控系統(tǒng)程序設(shè)計及仿真 22 發(fā)動機(jī)轉(zhuǎn)速 電控系統(tǒng)程序設(shè)計及仿真 23 發(fā)動機(jī)轉(zhuǎn)速 電控系統(tǒng)程序設(shè)計及仿真 24 附錄 D:程序代碼 include define uchar unsigned char define uint unsigned int sbit LED=P3^1。 發(fā)動機(jī)轉(zhuǎn)速 電控系統(tǒng)程序設(shè)計及仿真 13 圖 執(zhí)行機(jī)構(gòu)仿真圖 仿真調(diào)試結(jié)果 圖 ,圖 ,圖 分別表示在不同的輸入頻率下,對應(yīng)的 LCD 顯示的轉(zhuǎn)速情況及電機(jī)運作情況。圖 為發(fā)動機(jī)轉(zhuǎn)速電控系統(tǒng)的最小系統(tǒng)圖。保存值達(dá)到五次后,對其進(jìn)行加權(quán)濾波處理。由于 LM324 為模擬器件,其驅(qū)動能力不足。有余輸入至內(nèi)部時鐘信號要通過一個二分頻觸發(fā)器,因此對外部時鐘信號的脈寬無任何要求,但必須保證脈沖的高低電平要求的寬度。注意加密方式 1 時, /EA 將內(nèi)部鎖定為 RESET;當(dāng) /EA 端 保持高電平時,此間內(nèi)部程序存儲器。如想禁止ALE 的輸出可在 SFR8EH 地址上置 0。 P3 口也可作為 AT89C51 的一些特殊功能口,如下表所示: P3 口管腳 備選功能 : RXD(串行輸入口) TXD(串行輸出口) INT0(外部中斷 0) INT1(外部中斷 1) T0(記時器 0外部輸入) T1(記時器 1外部輸入) WR(外部數(shù) 據(jù)存儲器寫選通) RD(外部數(shù)據(jù)存儲器讀選通) P3 口同時為閃爍編程和編程校驗接收一些控制信號。并因此作為輸入時, P2 口的管腳被外部拉低,將輸出電流。 P0 口: P0口為一個 8 位漏級開路雙向 I/O 口,每腳 可吸收 8TTL 門電流。 第二方案的總體設(shè)計框圖 本設(shè)計采用 89C52 作為主控芯片,通過濾波電路處理輸入信號, LCD 作為輸出設(shè)備顯示轉(zhuǎn)速。 這樣就能夠?qū)Πl(fā)動機(jī)轉(zhuǎn)速進(jìn)行檢測并相應(yīng)控制電機(jī)運作,并將轉(zhuǎn)速顯示在 LCD1602 上。通過 檢測 單片機(jī) 的外部中斷觸發(fā)信號來啟動 內(nèi)部的定時器 定時兩個信號之間的時間 , 所得時間在程序中進(jìn)行加權(quán)濾波、轉(zhuǎn)換,最后將轉(zhuǎn)速在 LCD 上顯示,以此提醒駕駛?cè)藛T注意發(fā)動機(jī)的轉(zhuǎn)速。 8 9 C 5 2 主 控 芯 片信 號 濾 波 輸 入輸 出 鎖 存顯 示執(zhí) 行 機(jī) 構(gòu)( 電 動 機(jī) ) 圖 發(fā)動機(jī)轉(zhuǎn)速電控系統(tǒng)設(shè)計框圖 發(fā)動機(jī)轉(zhuǎn)速 電控系統(tǒng)程序設(shè)計及仿真 4 3 系統(tǒng)硬件介紹 主控芯片 設(shè)計中所采用主控芯片為 AT89C52。在 FIASH 編程時, P0 口作為原碼輸入口,當(dāng) FIASH 進(jìn)行校驗時,P0 輸出原碼,此時 P0 外部必須被拉高。在給出地址 “1” 時,它利用內(nèi)部上拉優(yōu)勢,當(dāng)對外部八位地址數(shù)據(jù)存儲器進(jìn)行讀寫時,P2 口輸出其特殊功能寄存器的內(nèi)容。 ALE/PROG:當(dāng)訪問外部存儲器時,地址鎖存允許的輸出電平用于鎖存地址的地位字節(jié)。如果微處理器在外部執(zhí)行狀態(tài) ALE 禁止,置位無效。 XTAL2:來自反向振蕩器的輸出。共模輸入范圍包括負(fù)電源,因而消除了在許多應(yīng)用場合中采用外部偏置元件的必要性。如果長期在高轉(zhuǎn)速下運作,對汽車發(fā)動機(jī)的壽命將大打折扣。 程序流程圖 開 始定 時 器 、 外 部 中 斷及 參 數(shù) 初 始 化F l a g _ s = 1調(diào) 用 S m o o t h ( )F l a g _ s = 0調(diào) 用 顯 示 函 數(shù)否是轉(zhuǎn) 速 值 大 于 設(shè)定 值電 機(jī) 運 作指 示 燈 亮電 機(jī) 停 止指 示 燈 滅否是 圖 主程序流程圖 發(fā)動機(jī)轉(zhuǎn)速 電控系統(tǒng)程序設(shè)計及仿真 10 定 時 器 0中斷 開 始COUNT++TH0=0TL0=0退 出 圖 定時器 0 中斷函數(shù)流程圖 外 部 中 斷 0開 始F l a g = 1S t a t i c u n s i g n e d c h a r m = 0T [ M ] = T H 0 * 2 5 6 + T L 0 + 6 5 5 3 6 * C O U N TT H 0 = 0T L 0 = 0C O U N T = 0m + +m = 5m = 0F l a g _ s = 1F l a g = 1T H 0 = 0T L 0 = 0T r 0 = 1是否退 出是否 圖 外部中斷函數(shù)流程圖 發(fā)動機(jī)轉(zhuǎn)速 電控系統(tǒng)程序設(shè)計及仿真 11 5 系統(tǒng) 仿真與調(diào)試 Proteus 軟件介紹 系統(tǒng)采用 Proteus 軟件 來進(jìn)行程序的仿真,這款軟件 是英國 Labcenter electronics 公司出版的 EDA工具軟件 。圖 為濾波轉(zhuǎn) 換電路。仿真結(jié)果正確。 //第一次中斷標(biāo)志 bit Flag_s。 unsigned int Smooth(void)。 uchar msg2[14]= r/min 。 EA=1。i++) { write_data(msg2[i])。 } } void delay(uint N)//延時 N毫秒子程序 { ui