freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于51單片機的9999秒倒計時器設(shè)計畢業(yè)論文(參考版)

2025-07-01 01:57本頁面
  

【正文】 s entire line of products since it can perform many functions and developers will only have to earn this one platform.The basic architecture consists of the following features:an eight bit ALU32 descrete I/O pins (4 groups of 8) which can be individually accessedtwo 16 bit timer/counters full duplex UART.6 interrupt sources with 2 priority levels.128 bytes of on board RAM.separate 64K byte address spaces for DATA and CODE memory.One 8051 processor cycle consists of twelve oscillator of the twelve oscillator periods is used for a special function by the 8051 core such as op code fetches and samples of the interrupt daisy chain for pending time required for any 8051 instruction can be puted by dividing the clock frequency by 12, inverting that result and multiplying it by the number of processor cycles required by the instruction in , if you have a system which is using an clock, you can pute the number of instructions per second by dividing this value by gives aninstruction frequency of 921583 instructions per this will provide the amount of time taken by each instruction cycle ( microseconds).Memory OrganizationThe 8051 architecture provides the user with three physically distinct memory spaces which can be seen in Figure A 1. Each memory space consists of contiguous addresses from 0 to the maximum size, in bytes, of the memory space. Address overlaps are resolved by utilizing instructions which refer specifically to a given address space. The three memory spaces function as described below.Figure A 1 8051 Memory ArchitectureThe CODE SpaceThe first memory space is the CODE segment in which the executable program segment can be up to 64K (since it is addressed by 16 address lines) .The processor treats this segment as read only and will generate signals appropriate to access a memory device such as an , this does not mean that the CODE segment must be implemented using an embedded systems these days are using EEPROM which allows the memory to be overwritten either by the 8051 itself or by an external makes upgrades to the product easy to do since new software can be downloaded into the EEPROM rather than having to sassemble it and install a new EPROM. Additionally, battery backed SRAMs can be used in place of an EPROM. This method offers the same capability to upload new software to the unit as does an EEPROM, and does not have any sort of read/write cycle limitations such as an EEPROM has. However, when the battery supplying the RAM eventually dies, so does the software in an SRAM in place of an EPROM in development systems allows for rapid downloading of new code into the target this can be done, it helps avoid the cycle of programming /testing /erasing with EPROMs, and can also help avoid hassles over an in circuit emulator which is usually a rare modity.In addition to executable code, it is mon practice with the 8051 to store fixed lookup tables in the CODE segment. To facilitate this, the 8051 provides instructions which allow rapid access to tables via the data pointer (DPTR) or the program counter with an offset into the table optionally provided by the means that oftentimes, a table39。在他們的幫助下,我才順利的完成了畢業(yè)設(shè)計和論文寫作。在此我要再一次向我的導(dǎo)師——劉雙臨老師表示深深的感謝和崇高的敬意,謝謝您!同時,我還要感謝我的輔導(dǎo)員劉鴻老師、我的同學(xué)和朋友們。在我的畢業(yè)設(shè)計論文期間,老師為我提供了各種專業(yè)知識上的指導(dǎo),他時常關(guān)注我的進(jìn)展情況,給出一些創(chuàng)造性的建議。無論何時我們有疑問,他總是抽出時間為我們解答。但是由于本次設(shè)計我對單片機是從頭開始學(xué),對知識了解的局限性,使得這個倒計時系統(tǒng)在功能上不完善,對開發(fā)有一定的影響,懇請各位老師原諒! 致 謝在本次畢業(yè)設(shè)計過程中,我學(xué)到了很多東西,也接觸到了一些以前沒有遇到過的問題,在不停的解決問題的時候真是受益頗多!在這里,我首先要感謝我尊敬的劉雙臨導(dǎo)師,在畢業(yè)設(shè)計的這2個多月的時間里,從設(shè)計選題到整個論文的完成,無不凝聚著劉老師的汗水與心血。系統(tǒng)功能:一切就緒后,通過KC鍵等待初值設(shè)置,其次通過矩陣鍵盤設(shè)定任何小于9999的初值,然后通過KF鍵開始倒計時,同時設(shè)置有復(fù)位鍵,以達(dá)到可以重新設(shè)置初值的目的。 結(jié) 論通過對MCS51單片機原理和接口技術(shù)的初步了解,結(jié)合自己的專業(yè)知識和對C語言的基本認(rèn)識,在導(dǎo)師的幫助指導(dǎo)下完成了基于單片機控制的9999秒倒計時系統(tǒng)的設(shè)計和這篇論文,本論文完成了以下幾個方面的工作:①介紹了本次倒計時系統(tǒng)的設(shè)計目的、設(shè)計方案和開發(fā)意義。最后,需要實驗板和軟件系統(tǒng)進(jìn)行仿真檢查結(jié)果是否正確,引入了Keil uVision3系統(tǒng)調(diào)試。其次,在硬件設(shè)計的基礎(chǔ)上,為了實現(xiàn)倒計時器的功能,進(jìn)行了軟件C語言編程。第四節(jié) 本章小結(jié)本章介紹了此倒計時器的設(shè)計過程,分為硬件電路設(shè)計、軟件設(shè)計、系統(tǒng)調(diào)試三個部分。因為只要程序語句沒有語法錯誤,軟件就不能檢測出錯誤的地方,必須一個模塊一個模塊仔細(xì)編寫。⑩ 當(dāng)演示完成后,按RESET開關(guān)鍵復(fù)位,然后點擊,拔出USB線。 提示選擇窗口 設(shè)置端口號⑨ 點擊Run按鈕,在試驗版上即可以看到程序效果(顯示默認(rèn)初值9999并開始以秒為單位倒計時),接下來在實驗板上進(jìn)行操作。第一次將會出現(xiàn)下圖314提示窗口,則需要點擊Settings,設(shè)置相應(yīng)端口號。這里可以先把學(xué)習(xí)板通過USB下載線與電腦USB相連,連接好后,學(xué)習(xí)板POWER指示燈點亮。 正確編譯時對話框⑦點擊Build target按鈕,此時選擇Options for Target按鈕。在寫入程序的時候,通過軟件設(shè)計模塊,先寫好主程序的框架,然后在需要調(diào)用子程序的時候,一個子程序一個子程序進(jìn)行編寫、調(diào)試。點擊Target1 前面的+號,右鍵單擊 Source Group 1——〉選擇 Add Files to Group’Source Group 1’,選擇添加 Add,然后關(guān)閉此對話框。新建一個文件,文件菜單 File——〉New,我們再點擊save the active document按鈕,(另存為)彈出對話框后,()保存,這個時候C 語言文件創(chuàng)建完畢。接著彈出 CPU 類型選擇框,選擇最常用的Atmel——〉A(chǔ)T89C51,按確定。②新建一個工程。它之所以具有這種功能,實際上它有兩塊程序flash區(qū),其中一塊 flash 中運行的程序可以更改另外的一塊程序 flash 區(qū)中的程序,正是利用這一特性才用它作成了仿真器,我們把仿真器的監(jiān)控程序事先燒入SST89C58,監(jiān)控程序通過 SST89C58的串口和PC通訊,當(dāng)使用 KEIL UVISION3 的 IDE 環(huán)境仿真時,用戶的程序通過串口被監(jiān)控程序?qū)懭雈lash程序區(qū)中,當(dāng)用戶設(shè)置斷點等操作仿真程序時,flash 程序中的用戶程序也在相應(yīng)的更改,從而實現(xiàn)了仿真功能 。然后通過temp = (temp1)+0x01語句可知,接下來顯示十位……每個子程序在主程序的調(diào)用過程中完成不同的功能,從而使主程序能夠順利的執(zhí)行,以順利完成9999秒的倒計時器的設(shè)計。 }首先將初值的四位通過程序分別賦給led_data[3]~ led_data[0],然后通過for語句的調(diào)用將四位數(shù)字在數(shù)碼管上呈現(xiàn)出來。 temp = (temp1)+0x01。i++) { …… P0 = table[led_data[i]]。 for(i=0。led_data[0] = Data%10。 led_data[2] = (Data/100)%10。 倒計時流程圖五、 其他子程序設(shè)計本次設(shè)計的倒計時系統(tǒng),除了上述的子程序外,還有顯示子程序、延時子程序delay()、鎖存器的正確控制等。其次,根據(jù)中斷子程序及初值,50ms產(chǎn)生一次中斷,計數(shù)器則加1,當(dāng)計數(shù)器count加到20的時候,倒計時器減1,并且count清0依次循環(huán)程序。 } }倒計時模塊設(shè)計:首先,初值設(shè)置。 data_set。 count++。四、 倒計時模塊子程序設(shè)計中斷程序:void timer0() interrupt 1{ TH0 = (65536TIME)/256。但是由于之前,所以此時,則顯示12……完成初值設(shè)置,數(shù)碼管上顯示已設(shè)置好的初值。同時,通過返回值也可以確定倒計時系統(tǒng)的初值,比如,返回值為0x11,則表示按下的鍵為K0,K0鍵表示數(shù)字1,則數(shù)碼管顯示數(shù)字1。通過鍵盤掃描的返回值,確定即將執(zhí)行的狀態(tài)。 鍵盤掃描程序三、 倒計時初值設(shè)置倒計時初值設(shè)置程序中重要語句:case 0x11: //1K0 temp = temp*10 + 1。最后,返回鍵值,并進(jìn)行判斷,建立有效標(biāo)志,以對主程序的進(jìn)行。其次,若有鍵按下,則延時去建抖動(delay(1)。0x10)!=0) //行掃描完成時(即4行已經(jīng)全部掃描完成)sccode為1110 1111停止while {…}首先,根據(jù)列判斷是否有鍵按下,沒有返回則為0。0x0f)!=0x0f) //再次判斷列中是否是干擾信號,不是則向下執(zhí)行 { sccode = 0xfe。0x0f)!=0x0f) //判斷是否有有鍵按下 { delay(1)。 //開定時器T0由前面可知工作方式寄存器TMOD的值和TH0、TL0的值,ET0是T0溢出中斷允許位,所以ET0=1表示允許T0中斷;要引入中斷,所以必須開總中斷,所以EA=1;TR0是T0定時器運行控制位,置1表示啟動T0。 //允許T0中斷 EA = 1。
點擊復(fù)制文檔內(nèi)容
研究報告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1