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

正文內(nèi)容

基于vb60的溫度數(shù)據(jù)采集系統(tǒng)畢業(yè)設(shè)計(jì)論文單片機(jī)控制(留存版)

  

【正文】 MsgBox 沒(méi)有發(fā)現(xiàn)此串口或被占用, 49, 溫度采集系統(tǒng) Case Else MsgBox 沒(méi)有發(fā)現(xiàn)此串口或被占用, 49, 溫度采集系統(tǒng) End Select End Sub在 VB 程序中設(shè)置為串口 1,輸入模式為二進(jìn)制,且接收和發(fā)送一個(gè)字符就會(huì)觸發(fā)24MSComm1 的 OnComm 接收觸發(fā)事件。在設(shè)計(jì)過(guò)程中可以用虛擬串口和串口調(diào)試助手對(duì)所設(shè)計(jì)的 VB 程序進(jìn)行仿真,看是否達(dá)到設(shè)計(jì)要求。從論文開(kāi)題時(shí)就給予了許多中肯意見(jiàn),使我在之后的設(shè)計(jì)過(guò)程中能夠少走彎路,事半功倍。 // 小數(shù)點(diǎn)bit flash=0。 i 0。 }}/*********************************************************/void Read_Temperature(void)// 讀取溫度{ Init_DS18B20()。}}Else {flag_zf=0} //判斷測(cè)得的溫度數(shù)據(jù)是正還是負(fù),如果為正,不做任何//理 display[4]=temp_data[0]amp。 // 顯示 CP2 = 0xfe。 // 顯示百位P2 = 0xdf。 // 波特率不倍增TR1 = 1。定義窗體級(jí)變量39。 初始化表格 If = True Then = 1000 * 39。H808080 Else If = False Then = True長(zhǎng)沙學(xué)院畢業(yè)設(shè)計(jì)38 mark = True = True = 停止采集 = amp。 設(shè)置波特率 Call tabinit 39。39。 默認(rèn)設(shè)置 Exit Sub End If If (Txttime 60) Or (Txttime ) Then MsgBox 參數(shù)錯(cuò)誤!間隔時(shí)間應(yīng)取“~60”之間的數(shù)。 // DS18B20 不正常,關(guān)閉顯示}if (RI) // 是否有數(shù)據(jù)到來(lái){RI = 0。TL1=(unsigned char)(256 (XTAL / (32L * 12L * baudrate)))。長(zhǎng)沙學(xué)院畢業(yè)設(shè)計(jì)33P0 =LEDData[display[2]]。 Delay(300)。 if(temp_data[1]7) //當(dāng)溫度高八位中的高五位全為 O { flag_zf=1。0x01。 return(presence)。unsigned char data display[5] = {0x00,0x00,0x00,0x00,0x00}。在畢業(yè)設(shè)計(jì)的過(guò)程中,針對(duì)所要設(shè)計(jì)的課題,我更加系統(tǒng)的學(xué)習(xí)了 語(yǔ)言和C 語(yǔ)言,能夠較熟練的運(yùn)用偉福、PROTEUS 和 等設(shè)計(jì)軟件,使我了解了測(cè)溫的原理和相關(guān)領(lǐng)域的知識(shí)。 Mid(buffer, 3, 3) amp。}}Else {flag_zf=0} 其中 temp_data[1] 為溫度數(shù)據(jù)的高八位,temp_data[0]為溫度數(shù)據(jù)的低八位,flag_zf=1 表示溫度為負(fù),進(jìn)行相應(yīng)轉(zhuǎn)化再執(zhí)行上面的顯示轉(zhuǎn)化程序,為正則直接執(zhí)行顯示轉(zhuǎn)化程序里的內(nèi)容。 }此外,在顯示模塊中,小數(shù)位的轉(zhuǎn)化才用了一定的技巧,由于實(shí)際顯示中只要求顯示一位小數(shù),而 DS18B20 每一位的轉(zhuǎn)化溫度為 ℃/LSB,當(dāng)每一位變化時(shí),第一位小數(shù)只有 16 種狀態(tài),我們只需一一算出放在一個(gè)數(shù)組中,通過(guò)查表指令即可獲取第一位小數(shù)的十進(jìn)制值。) {send_char()。VB 編寫(xiě)的實(shí)時(shí)顯示界面如圖 所示,點(diǎn)擊查詢可查詢歷史溫度信息。程序流程圖如圖 所示。 單片機(jī):AT89C51 一塊; 溫度傳感器:DS18B20 一塊;8位共陽(yáng)極數(shù)碼管 一塊; 30PF電容一個(gè),開(kāi)關(guān)一個(gè),蜂鳴器一個(gè); 10K電阻 2個(gè)、5K的電阻排; 串行通信線。另外,由于 DS18B20 單線通信功能是分時(shí)完成的,它有嚴(yán)格的時(shí)隙概念,因此讀寫(xiě)時(shí)序很重要。第 9 字節(jié)讀出前面所有8字節(jié)的 CRC 碼,可用來(lái)檢驗(yàn)數(shù)據(jù),從而保證通信數(shù)據(jù)的正確性。但 RAM,定時(shí)器,計(jì)數(shù)器,串口和中斷系統(tǒng)仍在工作。在由外部程序存儲(chǔ)器取指期間,每個(gè)機(jī)器周期兩次/PSEN 有效。 P3 口:P3 口管腳是 8 個(gè)帶內(nèi)部上拉電阻的雙向 I/O 口,可接收輸出 4 個(gè) TTL 門(mén)電流。低功耗的閑置和掉電模式2 AT89C51簡(jiǎn)介AT89C51 是一種帶 4K 字節(jié)閃爍可編程可擦除只讀存儲(chǔ)器(FPEROM—Flash Programmable and Erasable Read Only Memory)的低電壓,高性能 CMOS8 位微處理器,俗稱單片機(jī)。關(guān)鍵詞:溫度,編碼,單片機(jī),實(shí)時(shí)曲線,DS18B20, IIABSTRACT Temperature is a very important physical quantity which used in production and life .For the different applications, it is necessary to produce the proper system of measuring temperature. In this article I will discuss the system of measuring close quarters temperature.This system involves sensor technic, information processing technic, munication technic and so on .The design mainly includes the sensor part , analogdigital conversion ,the interface between the microcontroller and PC ,serial munication and so on .The main theoretical base is theory of data collection . The temperature signals measured by 18B20 sensors transform to the voltage signals .The single chip transforms the voltage code to 16M code which is the basic of munication .I design the interface circuit between the single chip and PC .The temperature signals are received and described by VB and then displayed on the screen .All the signals can be Realtime memory in order to analyze them .Form the result the metrical signals and the theoretical signals have the linearity relation .the result indicates that the has high precision and stability We can draw the curve of temperature value and the code and establish the database ,form which we can get the real temperature of the different objects. Keywords: temperature ,coding ,microcontroller ,current curve,18B20, III目 錄摘 要 .........................................................IABSTRACT ......................................................II第 1 章 緒論 ...................................................1 AT89C51 簡(jiǎn)介 ................................................2 DS18B20 傳感器簡(jiǎn)介 ..........................................5第 2章 系統(tǒng)設(shè)計(jì) ...............................................9 功能與設(shè)計(jì)方案 ..............................................9 功能要求 ..............................................................................................9 設(shè)計(jì)方案 ..............................................................................................9 設(shè)計(jì)中所需要的器件 .........................................11 系統(tǒng)硬件設(shè)計(jì) ..............................................12 系統(tǒng)軟件設(shè)計(jì) ...............................................13 下位機(jī)軟件設(shè)計(jì) ................................................................................13 上位機(jī)軟件設(shè)計(jì) .................................................................................16第 3章 程序設(shè)計(jì) ...............................................19 下位機(jī)程序 ................................................19 上位機(jī)程序 ................................................22第 4章 結(jié)論 ...................................................25參考文獻(xiàn) ......................................................26IV致 謝 ........................................................27附錄 1 下位機(jī)程序 .............................................28附錄 2 上位機(jī)程序 ..............................................34 1第 1 章 緒論隨著科學(xué)技術(shù)的迅猛發(fā)展,電子學(xué)的發(fā)展也越來(lái)越快,帶動(dòng)了大批相關(guān)產(chǎn)業(yè)的發(fā)展,其應(yīng)用的范圍也越來(lái)越廣泛。此技術(shù)主要包括:傳感器,模數(shù)轉(zhuǎn)換,單片機(jī)與 PC 機(jī)接口,串行通訊,VB 等部分。 。全靜態(tài)工作:0Hz24Hz在 FLASH 編程和校驗(yàn)時(shí),P1 口作為第八位地址接收。因此它可用作對(duì)外部輸出的脈沖或用于定時(shí)目的。石晶振蕩和陶瓷振蕩均可采用。第 5 個(gè)字節(jié),為配置寄存器,它的內(nèi)容用于確定溫度值的數(shù)字轉(zhuǎn)換分辨率。在 64 位 ROM 的最高有效字節(jié)中存儲(chǔ)有循環(huán)冗余檢驗(yàn)碼(CRC) 。從以上兩種方案,很容易看出,采用方案二,電路比較簡(jiǎn)單,軟件設(shè)計(jì)也比較簡(jiǎn)單,故采用了方案二。 主程序主程序的主要功能是負(fù)責(zé)溫度的實(shí)時(shí)顯示、讀出并處理 DS18B20 的測(cè)量的當(dāng)前溫度值,溫度測(cè)量每 1s 進(jìn)行一次。這些串口在 CPU 和外設(shè)之間充當(dāng)解釋器的角色。 while(1) { Read_Temperature()。TH1=(unsigned char)(256 (XTAL / (32L * 12L * baudrate)))。display[2]=display[1]/10。此外程序還添加了接收溫度數(shù)據(jù)的判定,接收到的溫度數(shù)據(jù)應(yīng)為兩字節(jié),且低位在前,當(dāng)接收到的數(shù)據(jù)不是兩字節(jié)時(shí),表示接收錯(cuò)誤,跳出此程序。讀數(shù)方便,測(cè)量范圍廣,測(cè)溫準(zhǔn)確。很慶幸這些年來(lái)我遇到了許多恩師益友,無(wú)論在學(xué)習(xí)上、生活上還是工作上都給予了我無(wú)私的幫助和熱心的照顧,讓我在許多方面都
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1