【正文】
temp_l=read_DS18B20()。 //連續(xù)讀取兩位溫度 temp_h=read_DS18B20()。 flag=temp_hamp。0xf8。 if(flag) { //disp(,10,1)。 temp_h=~temp_h。 if(temp_l==0)temp_h++。 //若低8位全為0且溫度為負(fù),取補(bǔ)時(shí)就要向高位進(jìn)1 temp_l=~temp_l+1。 } 淮北師范大學(xué) 2021 屆學(xué)士畢業(yè)論文 論文正文 26 } void display()//顯示函數(shù) { uint c。 uchar bai,shi,ge。 c=distance。 bai=c/100。 shi=c%100/10。 ge=c%10。 init()。 write_(0x85+0x40)。 write_data(table[bai])。 delay(1)。 write_data(table[shi])。 delay(1)。 write_data(table[ge])。 delay(1)。 write_data(table2[0])。 delay(1)。 write_data(table2[1])。 delay(1)。 write_(0x80)。 for(num=0。num13。num++) { write_data(table1[num])。 delay(1)。 } } void temzhi(void) 、 函數(shù)功能:溫度值計(jì)算 { read_temp() 。 realtemp=(temp_h*256+temp_l)*。 } void speak()//蜂鳴器發(fā)聲 函數(shù) { unsigned int i,d。 d=distance。 while(1) { for(i=0。i200。i++)// //喇叭發(fā)聲的時(shí)間循環(huán),改變大小可以改變發(fā)聲時(shí)間長(zhǎng)短 { delaysk(80)。// 參數(shù)決定發(fā)聲的頻率,估算值 SPK=!SPK。 } SPK=1。 // 喇叭停止工作,間歇的時(shí)間,可更改 if(d100) delaysk(50000)。 else if (d50) 淮北師范大學(xué) 2021 屆學(xué)士畢業(yè)論文 論文正文 27 delaysk(10)。 else delaysk(5000)。 } } void deng()//告警提示燈函數(shù) {uchar l。 l=distance。 Gd=0; Rd=0; While( 1) { if(l100) { Gd=~Gd。 delay(1000)。 } else if (l50) { Rd=~Rd。 delay(700)。 Rd=1。 } else { Rd=~Rd。 delay(50)。 } } } void main()//主程序 { test =0。 Trig=0。 //首先拉低脈沖輸入引腳 EA=1。 //打開總中斷 0 TMOD=0x10。 //定時(shí)器 1, 16 位工作方式 while(1) { EA=0。 //關(guān)總中斷 Trig=1。 //超聲波輸入端 delay_20us()。 //延時(shí) 20us Trig=0。 //產(chǎn)生一個(gè) 20us 的脈沖 while(Echo==0)。 //等待 Echo 回波引腳變高電平 succeed_flag=0。 //清測(cè)量成功標(biāo)志 EA=1。 EX0=1。 //打開外部中斷 0 TH1=0。 //定時(shí)器 1 清零 TL1=0。 //定時(shí)器 1 清零 TF1=0。 //計(jì)數(shù)溢出標(biāo)志 TR1=1。 //啟動(dòng)定時(shí)器 1 delay (20)。 //等待測(cè)量的結(jié)果 TR1=0。 //關(guān)閉定時(shí)器 1 EX0=0。 //關(guān)閉外部中斷 0 temzhi()。 succeed_flag=1。 if(succeed_flag==1) 淮北師范大學(xué) 2021 屆學(xué)士畢業(yè)論文 論文正文 28 { time=timeH*256+timeL。 distance=1000*(+*realtemp)。 //厘米 display()。 speak()。 deng()。 } if(succeed_flag==0) { distance=0。 //沒有回波則清零 test = !test。 //測(cè)試燈變化 } } } //外部中斷 0,用做判斷回波電平 void exter() interrupt 0 // 外部中斷 0 是 0 號(hào) { timeH =TH1。 //取出定時(shí)器的值 timeL =TL1。 //取出定時(shí)器的值 succeed_flag=1。//至成功測(cè)量的標(biāo)志 EX0=0。 //關(guān)閉外部中斷 } //**************************************************************** //定時(shí)器 1 中斷 ,用做超聲波測(cè)距計(jì)時(shí) void timer1() interrupt 3 { TH1=0。 TL1=0。 } 淮北師范大學(xué) 2021 屆學(xué)士畢業(yè)論文 論文正文 29 致 謝 首先 在論文即將完成之際,向所有關(guān)心和支持我的人表示衷心的感謝 ! 本篇 論文是在我的指導(dǎo)老師的親切關(guān)懷與細(xì)心指導(dǎo)下完成的。在本論文的寫作過(guò)程中,方正國(guó) 老師傾注了大量的心血和汗水,給我 提出了許多寶貴的意見。無(wú)論是在論文的選題、構(gòu)思和資料的收集方面,還是在論文的研究方法以及成文定稿方面,我都得到了方老師悉心細(xì)致的教誨和無(wú)私的幫助。 在這里在對(duì)他表示由衷的感謝。 感謝母校內(nèi)所有使我受教的老師們,他們無(wú)私的教導(dǎo),讓我學(xué)到知識(shí),能辨事理,讓我在人生的長(zhǎng)路上向前邁進(jìn)一大步。還要感謝長(zhǎng)期以來(lái)給我諸多幫助的同學(xué)們,你們的友情將是我一生最值得珍惜的財(cái)富和最值得懷念的情感。 感謝我親愛的室友們,感謝你們陪我度過(guò)了美好的大學(xué)四年,感謝你們?cè)趯懻撐倪^(guò)程中對(duì)我的幫助和鼓勵(lì)。 g an employment tribunal clai Employment tribunals sort out disagreements between employers and employees. You may need to make a claim to an employment tribunal if: ? you don39。t agree with the disciplinary action your employer has taken against you ? your employer dismisses you and you think that you have been dismissed unfairly. For more information about dismissal and unfair dismissal, see Dismissal. You can make a claim to an employment tribunal, even if you haven39。t appealed against the disciplinary action your employer has taken against you. However, if you win your case, the tribunal may reduce any pensation awarded to you as a result of your failure to appeal. Remember that in most cases you must make an application to an employment tribunal within three months of the date when the event you are plaining about happened. If your application is received after this time limit, the tribunal will not usually accept i. If you are worried about how the time limits apply to you, take advice from one of the anisations listed under Further help. Employment tribunals are less formal than some other courts, but it is still a legal process and you will need to give evidence under an oath or affirmation. Most people find making a claim to an employment tribunal challenging. If you are thinking about making a claim to an employment tribunal, you should get help straight away from one of the anisations listed under Further help. 淮北師范大學(xué) 2021 屆學(xué)士畢業(yè)論文 論文正文 30 If you are being represented by a solicitor at the tribunal, they may ask you to sign an agreement where you pay their fee out of your pensation if you win the case. This is known as a damagesbased agreement. In England and Wales, your solicitor can39。t charge you more than 35% of your pensation if you win the case. If you are thinking about signing up for a damagesbased agreement, you should make sure you39。re clear about the terms of the agreement. It might be best to get advice from an experienced adviser, for example, at a Citizens Advice Bureau. To find your nearest CAB, including those that give advice by , click on nearest CAB. For more i