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

正文內容

多串口多線程的數(shù)據(jù)管理系統(tǒng)的設計畢業(yè)論文(參考版)

2025-06-29 11:18本頁面
  

【正文】 t have the resources, but threads to use them. 6] due to share resources, so between threads need munication and synchronization mechanism. [7] there is life time, some threads of birth and death. In the lifespan of a state And not in all the puter system threads is applicable. In fact in those rarely do the realtime process scheduling and switch system and personal digital assistant system, because the task oneness, setting thread instead will occupy more memory and registers. The biggest advantage of using threads in a multiple tasks need processor processing, reduce processor switch time。2003,130133[5] 郝文化. Windows多線程編程技術與實例 [M ].北京:中國水利水電出版社,2005.[6] 王苓,蘇維均. 基于多線程技術的多串口通信 [J]. 微計算機信息,2006(3S):253 255.[7] 馬忠梅,籍順心 (第3版).北京:北京航空航天大學出版社, ISBN7810773682[8] (修訂版).北京:北京航空航天大學出版社, ISBN7810770829[9] DENVER A. Serial munications in Win32, Microsoft Windows developer support[Z]. Microsoft, 1995.[10] CAITAO, JU SHIGUANG, QIAN ZHENJIN, et al. Implement of a Web2based and serial port Agent remote demonstrating systems[11] GALLAGHER M J, NARSI MHAN V L. ADTEST: A test data gen2 erati on suite for ada s oft ware systems[J ] . IEEE Transactions on Soft2ware Engineering, 1997, 23: 473 454. Thread and multithread If, in operating systems into process are the purpose is to make multiple programs can be executed concurrently, in order to improve the system throughput of resources utilization and, then, in the operating system, is introducing thread again to reduce the concurrent execution procedures in paid the spacetime expenses, make the puter operating system has better simultaneity. To illustrate this point, first review process the two basic attribute: (1) process is an independent unit with resources. (2) process and at the same time, a separate scheduling and distribution of the basic unit. Because the two basic attribute a process, to make it into a basic unit can operate independently, which also constitutes the concurrent execution process based. However, in order to make the program subsequent executions, system also can make a series of operations to: (1) to create process. System in create a process for it must, when necessary, the distribution of so resources except processing cake layer. . memory space, I/O devices and establish corresponding PCB (2) revoked process. System in process and cancellation of its occupied first must the resources to execute recovery operation, then revoked PCB (3) process switching. When switching to process due to retain the current process of the PCB environment and setting new the selected process, must spend a good CPU environment the processor time. In other words, because the owner of the process is a resources, thus in the creation, revocation and switching, system must pay the price larger spending of spacetime. And because of it, in the process of system Settings, the number is unfavorable and overmuch, process switching frequency also is unfavorable and exorbitant, which also limited to further improve concurrent processes. How can multiple programs better concurrent execution also minimize the cost of design has bee in recent years operating system pursued important goals. Many scholars, acting operating system, if can think of the above two attributes the process, the operating system separated respectively processing, also is for as the basic unit scheduling and dispatch is not the same as have the resources to do the unit, lightly。北京:Visual人民郵電版社,Visual微計算機信息,2005,10,46 [2] 尹德春.王萬玉. 而且在通信軟件上考慮了抗干擾措施,因此使得整個系統(tǒng)穩(wěn)定性大大加強,整個系統(tǒng)符合設計要求。這種方法適用于對于多路通信接收所耗費的時間差別較大的情況 ,這時可以減少對某一路接收信息的等待時間 ,如果接收耗費時間相當 。而PC串口通信的程序的編寫也有很多,如Delphi, C++Bilder, VB, VC等。經(jīng)軟件上述處理后,即大大增強了串行通信的可靠性,又滿足了一般實時性的要求。在串行通信程序中增加限時等待接收部分。第三種方法是:采用限時的策略以處理有可能發(fā)生的以外錯誤。即在傳送數(shù)據(jù)時,放送方和接受方均對數(shù)據(jù)進行累加,發(fā)送方在發(fā)完數(shù)據(jù)后,再發(fā)一累加和;接受方在收到數(shù)據(jù)后得其累加和與收到的數(shù)據(jù)累加和相比。若相等則本次命令無誤,否則就認為下位機接受的命令幀有錯,上位機即重發(fā)命令幀。如:響應幀中第2字節(jié)相同,都表示下位機站號;第4字節(jié)表示命令碼;第6字節(jié)和第8字節(jié)相同表示傳輸數(shù)據(jù)的長度等。校驗幀、響應幀和確認幀中有關信息的數(shù)據(jù)。本通信系統(tǒng)中采用三種方法來糾正不同的錯誤。這樣使得接收設備能夠知道一個位的狀態(tài),有機會判斷是否有噪聲干擾了通信或者是否傳輸和接收數(shù)據(jù)是否不同步。如果是奇校驗,校驗位位1,這樣就有3個邏輯高位。對于偶和奇校驗的情況,串口會設置校驗位(數(shù)據(jù)位后面的一位),用一個值確保傳輸?shù)臄?shù)據(jù)有偶個或者奇?zhèn)€邏輯高位。有四種檢錯方式:偶、奇、高和低。適用于停止位的位數(shù)越多,不同時鐘同步的容忍程度越大,但是數(shù)據(jù)傳輸率同時也越慢。由于數(shù)據(jù)是在傳輸線上定時的,并且每一個設備有其自己的時鐘,很可能在通信中兩臺設備間出現(xiàn)了小小的不同步。   c,停止位:用于表示單個包的最后一位。每個包是指一個字節(jié),包括開始/停止位,數(shù)據(jù)位和奇偶校驗位。擴展的ASCII碼是0~255(8位)。如何設置取決于你想傳送的信息。   b,數(shù)據(jù)位:這是衡量通信中實際數(shù)據(jù)位的參數(shù)。波特率可以遠遠大于這些值,但是波特率和距離成反比。這意味著串口通信在數(shù)據(jù)線上的采樣率為4800Hz。例如300波特表示每秒鐘發(fā)送300個bit。對于兩個進行通行的端口,這些參數(shù)必須匹配:   a,波特率:這是一個衡量通信速度的參數(shù)。其他線用于握手,但是不是必須的。通信使用3根線完成:(1)地線,(2)發(fā)送,(3)接收。比如IEEE488定義并行通行狀態(tài)時,規(guī)定設備線總長不得超過20米,并且任意兩個設備間的長度不得超過2米;而對于串口而言,長度可達1200米。盡管比按字節(jié)(byte)的并行通信慢,但是串口可以在使用一根線發(fā)送數(shù)據(jù)的同時用另一根線接收數(shù)據(jù)。同時,串口通信協(xié)議也可以用于獲取遠程采集設備的數(shù)據(jù)。大多數(shù)計算機包含兩個基于RS232的串口。數(shù)據(jù)可在5~8位之間選擇,通信頻率為0~,有奇偶校驗、幀校驗、溢出校驗三種方式。前兩幀是單向的,數(shù)據(jù)幀可以由主機發(fā)出發(fā),也可以由從機發(fā),確認幀只由數(shù)據(jù)幀的接收者發(fā)出。若選波特率為1200bps,則計數(shù)初值為0E8H(SMOD=0),。 上面的計算可以看出使用12M 晶體的時候計算出來的TH1 不為整數(shù),而TH1 的值只能取整數(shù),這樣它就會有一定的誤差存在不能產生精確的9600 波特率。TH1≈32)((12M/12)/(256TH1)) 9600=(2247。代入公式: 晶體是為了得到標準的無誤差的波特率,那么為何呢?計算一下就知道了。溢出速率=(計數(shù)速率)/(256-TH1)在這個定時模式2 下定時器1 溢出速率的計算公式如下: 上式中如設置了PCON 寄存器中的SMOD 位為1 時就可以把波特率提升2 倍。32)定時器1 溢出速率 那么我們怎么去計算這兩個模式的波特率設置時相關的寄存器的值呢?可以用以下的公式去計算。模式2 的波特率是固定在fosc/64 或fosc/32,具體用那一種就取決于PCON 寄存器中的SMOD位,如SMOD 為0,波特率為focs/64,SMOD 為1,波特率為focs/32。10=960 字節(jié)。波特率是指串行端口每秒內可以傳輸?shù)牟ㄌ匚粩?shù)。 AT89C51 和AT89C2051 等51 系列芯片只有兩個定時器,定時器0 和定時器1,而定時器2是89C52 系列芯片才有的。常用的串口模式1 是傳輸10 個位的,1 位起始位為0,8 位數(shù)據(jù)位,低位在先,1 位停止位為1。但在模式1 中,SM2=1時,當未收到有效的停止位,則不會對RI 置位。其它模式中則是在接收停止位的半中間,由硬件置位。 RI 接收中斷標識位。TI 置位后,申請中斷,CPU 響應中斷后,發(fā)送下一幀數(shù)據(jù)。在模式0,發(fā)送完第8 位數(shù)據(jù)時,由硬件置位。 在模式1 中,當SM2=0,RB8 是已接收數(shù)據(jù)的停止位。該位可能是奇偶位,地址/數(shù)據(jù)標識位。 該位可以用軟件根據(jù)需要置位或清除,通常這位在通信協(xié)議中做奇偶位,在多處理機通信中這一位則用于表示是地址幀還是數(shù)據(jù)幀。 大家也可以用上面的實際源碼加入REM=0 來進行實驗。REM 是由軟件置位或清零。 在模式0 中要求該位為0。SCON 就是51 芯片的串行口控制寄存器。 等頭文件中已對其做了定義,只要用include 引用就可以了。操作SBUF寄存器的方法則很簡單,只要把這個99H 地址用關鍵字sfr定義為一個變量就可以對其進行讀寫操作了,如sfr SBUF = 0x99。CPU 在讀SBUF 時會指到接收寄存器,在寫時會指到發(fā)送寄存器,而且接收寄存器是雙緩沖寄存器,這樣可以避免接收中斷沒有及時的被響應,數(shù)據(jù)沒有被取走,下一幀數(shù)據(jù)已到來,而造成的數(shù)據(jù)重疊問題。有朋友這樣問起過“為何在串行口收發(fā)中,都只是使用到同一個寄存器SBUF?而不是收發(fā)各用一個寄存器。 單片機
點擊復制文檔內容
畢業(yè)設計相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1