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

正文內(nèi)容

畢業(yè)設(shè)計-基于單片機的溫濕度計的設(shè)計(文件)

2025-12-22 17:19 上一頁面

下一頁面
 

【正文】 } // //SHT11 啟動傳輸子程序 // void s_transstart(void) { DATA=1。 _nop_()。 _nop_()。 _nop_()。 // //SHT11 連接復位子程序 //void s_connectionreset(void) { unsigned char i。i9。 //transmission start } // //讀 IIC 總線子程序 // Char read_IIC(unsigned char 4 ack) //ack=1 或 0 { Unsigned char i,read_data=0。 if(DATA) read_data=(read_data|i)。 _nop_()。 DATA=1。i0。 SCK=1。 SCK=0。 //檢查應(yīng)答信號,確認通訊正常 SCK=0。 s_transstart()。break。i++) if(DATA==0) break。 //read the second byte(LSB) *p_checksum=s_read_byte(noACK)。 rw=1。 _nop_()。 //P0 口與 0x80 相與,只保留最高位( BF 位) ep=0。 rw=0。 P0=cmd。 _nop_()。 _nop_()。 //寫入顯示地址時要求最高位必須為高電平 // //LCD 寫數(shù)據(jù)子程序 // void lcd_wdat(BYTE dat) { While(lcd_bz())。 P0 =dat。 _nop_()。 _nop_()。 //4 位總線,雙行顯示,顯示 5*7 的點陣字符 delay(1)。 //僅光標右移,文字不移動 delay(1)。 Int nhum。 memset(dis1,0x20,16)。 for(i=0。 flt0=**nhum*nhum4。 len=strlen(dis2)。ilen。 _nop_()。 SC。 _nop_()。 } } // //EEPROM 啟動 傳輸子程序 // void e_transstart(void) { DATA=1。 lcd_pos(40)。//想對濕度對于溫度的依賴性補償 memset(dis2,0x20,16)。i++) { lcd_wdat(dis 1[i]。 lcd_pos(0)。 ntemp=(*ptem)*256+(*(ptem+1))。 //清除 LCD的顯示內(nèi)容 delay(1)。 //開顯示,無光標 delay(1)。 ep = 0。 _nop_()。 _nop_()。 rw = 0。 6 ep=0。 _nop_()。 _nop_()。 _nop_()。 // //LCD 寫指令子程序 // void lcd_wcmd(BYTE cmd) { while(lcd_bz())。 result=(BOOL)(P0 amp。 _nop_()。 // //LCD 忙狀態(tài)檢測子程序 // BOOL lcd_bz() { BOOL result。 //or timeout(~2 sec.)is reached *(p_value)=s_read_byte(ACK)。 } for(i=0。break。 //ack_bit=1 通訊錯誤 } // //溫濕度采集子程序 // char s_measure(unsigned char*p_value,unsigned char*p_checksum,unsigned char mode) { unsigned error=0。 //釋放數(shù)據(jù)線 SCK=1。 _nop_()。 write_data) DATA=1。 } // // 寫 IIC 總線子程序 // char write_IIC(unsigned char write_data) { unsigned char i,ack_bit=0。 _nop_()。 } DATA=lack。 //釋放數(shù)據(jù)線 for(i=0x80。 SCK=0。SCK=0。 _nop_()。 _nop_()。 _nop_()。 //initial state _nop_()。 _nop_()。 While(x) { For(i=0。 unsigned char Hem [2 ]。//光標右移鍵 sbit K3 =P1?2。 sbit SCK =P1?5。 BYTE dis1[16]。float HH,HL。 include include 2 include include include define uchar unsigned char define uint unsigned int typedef unsigned char BYTE。s key ponents. Many singlechip developers are moving in that direction. 28 6. Serialization of North Korea, major prehensive development of singlechip developers in the functions of the product at the same time increase the effectiveness of the product in the form of serialized = be prehensive in order to meet the requirements of the various areas of control, which is singlechip development One of the trends. TOSHBA Japan has developed from a 464 multifamily singlechip, Hitachi also from the 4. Bit to 32bit microcontroller, which has not yet produced singlechip factory than Toshiba39。 help manufacturers shorten the design cycle, so that the enduser products and more petitive. 4. Integrate more functions and patibility of the other singlechip current trends in the chip more. If the analog functions, including analog parator, A / D and D / A converters and so on. This is specifically manifested in: the patibility of the design as the first consideration。 EPROM includes analog circuits, when Vcc higher than 4V, the software can make these analog circuits to reduce power consumption down, in the case of electrical system could withdraw from the model. 3. Use of Flash Memory With the semiconductor process technology advances, MPU the Flash version of a gradual replacement of the original version of the OTP. Flash MPU has the following advantages: with a number of windowprogrammable EPROM pared, Flash MPU much lower cost??臻e模式停止的CPU, 同時允許的 RAM, 定時器 /計數(shù)器,串行端口,并中斷系統(tǒng)繼續(xù)運作。片上閃存允許程序內(nèi)存重新編程的系統(tǒng)或通過傳統(tǒng)的非易失性內(nèi)存親語法。在各種控制領(lǐng)域,單片機將擁有更加廣闊的使用天地。許多單片機開發(fā)商也正朝著這個方向努力。如模擬功能,包括模擬比較器、 A/D 和 D/A 轉(zhuǎn)換器等。 ( 3)使系統(tǒng)進入低電壓 EPROM 操作 ,EPROM 包含了模擬電路,當 Vcc 高于4V時,可通過軟件使這些模擬電路掉電以降低功耗,在上電情況下可使系統(tǒng)退出該模式??v觀幾十 年來單片機發(fā)展歷程可以看出,單片機技術(shù)的發(fā)展以微處理器( MPU)技術(shù)及超大規(guī)模集成電路技術(shù)的發(fā)展為先導,推動廣泛的應(yīng)用領(lǐng)域,表現(xiàn)出比微處理器更具個性的發(fā)展趨勢: 在過去的一段時間內(nèi),單片機的指令運行速度一直在 10MIPS 以下,這對于應(yīng)用在工業(yè)控制領(lǐng)域內(nèi)的單片機來說是足夠了,但當單片機被應(yīng)用在通訊及 DSP領(lǐng)域作為高速運算、編碼或解碼時,就會出現(xiàn)因指令運行速度不夠而限制單片機應(yīng)用的情形,因此提高單片機指令運行速度已經(jīng)成為迫切需要解決的問題。不僅是我樹立了遠大的工作目標,掌握了基本的學習方法,還是我明白了許多帶人接物與為人處世的道理,還有教過我的老師,你們的嚴謹細致、一絲不茍的作風一直是我工作學習中的榜樣;他們的循循善誘的教導和不拘一格的思路給與我無盡的啟迪。回首走過的歲月,心中倍感充實,當我寫完這篇畢業(yè)論文的時候有一種如釋重負的感覺,感慨良多。測量精度有待進一步提高,軟件設(shè)計也存在不合理之處。加上優(yōu)化程序,使湖南人文科技學院畢業(yè)設(shè)計 21 得本系統(tǒng) 具有很高的實用性。 在本此設(shè)計中,由于采用的是高效單片機作為核心,集 溫度傳感器和濕度傳感器于一體的 SHT11 作為主要的采集與測量系統(tǒng), 由于將傳感器與電路部分結(jié)合在一起,因此,該傳感器具有比其它類型的濕度傳感器優(yōu)越得多的性能。 運行 下載完成后程序自動運行,或重上電后程序 正常運行,如圖 12 所示。記住括號里的 COM 口號。當編譯生成 .hex 文件后,就可以下載并進行調(diào)試了。 else keyHH1 = 1。 else keyTH1 = 1。 keyvalue = 4。 keyvalue = 3。 keyvalue = 2。 keyvalue = 1。 else Led_qushi = 1。 L1602_int(2,5,humidity)。 TR0 = 1。 L1602_char(2, 16, HH%10+48)。 //載入溫度上限和濕度上限設(shè)定值 Load_Setting()。} 16 //清屏 L1602_string(1,1, )。i1000。 L1602_string(1,1, Wele to Tamp。 Timer0_Init()。 default: break。 case 4: if (HH1) HH。 case 3: if (HH99) HH++。 湖南人文科技學院畢業(yè)設(shè)計 15 case 2: if (TH1) TH。 } void KeyProcess(uint num) { switch (num) { case 1: if (TH99) TH++。 *pSave++ = rdeeprom(2)。 *pSave++ = rdeeprom(0)。 wrteeprom(3, *pSave)。HH。 pSave ++。 } } //存入設(shè)定值、 14 void Save_Setting() { pSave = (char *)amp。 TH0 = 0xf8。 //定時器工作方式選擇 TL0 = 0x06。 keyHH1 = 1。 HH = 85。 湖南人文科技學院畢業(yè)設(shè)計 13
點擊復制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1