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

正文內容

基于gprs的溫度實時監(jiān)測系統(tǒng)設計畢業(yè)設計-資料下載頁

2025-07-01 20:49本頁面

【導讀】[摘要]近年來,隨著通信事業(yè)的不斷發(fā)展,移動終端的設計也逐漸倍受關注。隨著無線網絡的覆蓋范。圍的擴大和完善,基于遠程的溫度采集控制系統(tǒng)在各行各業(yè)中大量使用。該系統(tǒng)主要由DS18B20單總線溫度。傳感器、GPRS傳輸模塊SIM900A和AT89C52微控制器組成,具有無線傳輸網絡的特征??煞奖銓崿F(xiàn)對各種現(xiàn)。場溫度進行遠程監(jiān)控和管理。具有傳輸速度快、可靠性高、適應性強等特點。

  

【正文】 eChar(0xBE)。 delay_18B20(1000)。 a=ReadOneChar()。 //讀取溫度值低位 b=ReadOneChar()。 //讀取溫度值高位 temp_value = b8。 temp_value |= a。 tt=temp_value*。 //得到真實十進制溫度值,因為 DS18B20 //可以精確到 度,所以讀回數(shù)據 的最低位代表的是 // 度。 temp_value=tt。 //放大十倍,這樣做的目的將小數(shù)點后第一位 return temp_value。 } void display(uint temp) //顯示程序 { uchar A1,A2,A2t,A3,ser。 ser=temp/10。 //分離出三位要顯示的數(shù)字 SBUF=ser。 A1=temp/100。 A2t=temp%100。 A2=A2t/10。 A3=A2t%10。 dula=0。 P0=table[A1]。 //顯示百位 dula=1。 dula=0。 wela=0。 P0=0x20。 wela=1。 wela=0。 delay1(1)。 dula=0。 P0=table1[A2]。 //顯示十位帶小數(shù)點的 dula=1。 陜西理工學院畢業(yè)設計 第 26 頁 共 46 頁 dula=0。 wela=0。 P0=0x40。 wela=1。 wela=0。 delay1(1)。 P0=table[A3]。 //顯示個位 dula=1。 dula=0。 P0=0x80。 wela=1。 wela=0。 delay1(1)。 } static void delay ( unsigned char t ) { unsigned char i = 0,j = 0。 for( i=0。 it。 i++){ for( j=0。 j j++)。 } } /******************************************************************** 長延時函數(shù) *********************************************************************/ static void delay1S ( unsigned int z ) { unsigned int x = 0。 for(x = 0。x z。x++ ) { delay( 160 )。 } } void LED_ON(unsigned int n) { switch(n){ case 1: LED1 = 0。 陜西理工學院畢業(yè)設計 第 27 頁 共 46 頁 break。 case 2: LED2 = 0。 break。 case 3: LED3 = 0。 break。 case 4: LED4 = 0。 break。 default: break。 } } void LED_OFF(unsigned int n) { switch(n){ case 1: LED1 = 1。 break。 case 2: LED2 = 1。 break。 case 3: LED3 = 1。 break。 case 4: LED4 = 1。 break。 default: break。 } } unsigned char get_key() { unsigned char tmp = 0。 unsigned char res = 0。 tmp = P1。 tmp = tmp amp。 0xC0。 陜西理工學院畢業(yè)設計 第 28 頁 共 46 頁 if(tmp == 0X80){ res = 1。 } if(tmp == 0x40){ res = 2。 } if (tmp == 0xc0){ res = 3。 } return res。 } void sim900a_start(void) { //P1M1 amp。= ~0x40。 //P1M0 amp。= ~0x40。 //先置高 //SIM900A_START_KEY = 1。 //delay1S(20)。 //再拉低 SIM900A_START_KEY = 0。 delay1S(100)。 //大于 1S //再置高 SIM900A_START_KEY = 1。 delay1S(300)。 //大于 1S // //P1M1 |= 0x40。 //P1M0 amp。= ~0x40。 } void board_init(void) { P1 = 0x0。 P2 = 0x0。 P3 = 0x0。 P4 = 0x0。 } unsigned char start_str[] = Temperature Monitoring System。 unsigned char tmp_end[] = {0x0d,0x0a}。 unsigned char user_tel[] = 15319382834。 unsigned char temperature[4]。 陜西理工學院畢業(yè)設計 第 29 頁 共 46 頁 sfr WAKE_CLKO = 0X8F。 sfr P4SW = 0XBB。 sbit ELVD = IE^6。 static void delay(unsigned int t) { unsigned int i,j。 for( i=0。 i t。 i++) for( j=0。 j j++)。 } void delay_long_1S(unsigned int z) { unsigned int x = 0,j = 0。 for (x = 0。x z。x++ ){ for (j = 0。j 100。j++) { delay(10)。 } } } void int2asc(int dat) { temperature[0] = dat/100 + 0x30。 temperature[1] = dat%100/10 + 0x30。 temperature[2] = dat%10 + 0x30。 temperature[3] = 39。\039。 } void init() { Uart0_Init()。 Uart1_Init()。 sim900a_start()。 } void main(void) { unsigned int i = 0, a。 uint tmpt。 陜西理工學院畢業(yè)設計 第 30 頁 共 46 頁 init()。 Uart0_PutString(start_str,strlen(start_str))。 Uart0_PutString(tmp_end,2)。 //delay_long_1S(10)。 //LED_ON(1)。 while(1){ tmpt = ReadTemp()。 for(a=500。a0。a) { display(tmpt)。 //顯示十次 } int2asc(tmpt)。 //sim900a_call(user_tel)。 //sim900a_send_message(temperature,strlen(temperature),user_tel)。 if 1 /*GPRS*/ GPRS_INIT()。 GPRS_TCP_LINK()。 GPRS_TCP_SEND_INIT()。 GPRS_TCP_SEND_DATA(temperature,strlen(temperature))。 GPRS_TCP_SEND_INIT()。 GPRS_TCP_SEND_DATA(temperature,strlen(temperature))。 GPRS_TCP_SEND_INIT()。 GPRS_TCP_SEND_DATA(temperature,strlen(temperature))。 GPRS_TCP_SEND_INIT()。 GPRS_TCP_SEND_DATA(temperature,strlen(temperature))。 GPRS_TCP_SEND_INIT()。 GPRS_TCP_SEND_DATA(temperature,strlen(temperature))。 //GPRS_CLOSE()。 endif //delay_long_1S(2)。 //while(1)。 } } 陜西理工學院畢業(yè)設計 第 31 頁 共 46 頁 附錄 B:溫度采集仿真 陜西理工學院畢業(yè)設計 第 32 頁 共 46 頁 附錄 C 外文翻譯 Single Connection Command AT+CIPMUX=n is used for selecting TCPIP connection mode, when n=0, it is single connection。 when n=1, it is multi connection. The default configuration is single connection mode. For single connection, SIM900 supports both transparent mode and nontransparent mode. Nontransparent mode Command AT+CIPMODE=n is used for selecting TCPIP application mode, when n=0, it is nontransparent mode (normal mode)。 when n=1, it is transparent mode. The default configuration is nontransparent mode. There are three working modes for SIM900 under this mode: TCP client, UDP client and TCP server. How to Establish a TCP Client Connection Firstly, before any TCP/UDP related operation is set up, the module should be connected to GSM or GPRS work. User can use the mands “AT+CREG?” and “AT+CGATT?” to query the GSM work registration status whether the module has been attached to GPRS service. AT+CPIN? +CPIN: READY OK AT+CSQ CSQ: 20,0 OK AT+CREG? +CREG: 0,1 OK AT+CGATT? +CGATT: 1 OK Secondly, user should use the mand group AT+CSTT, AT+CIICR and AT+CIFSR to start the task and activate the wireless connection. Lastly, user can establish TCP connection between SIM900 and the server by AT mand (AT+CIPSTART=”TCP”,”IP Ad
點擊復制文檔內容
研究報告相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1