【正文】
指令系統(tǒng)比通用微處理器慢的多;(4) X系列芯片取代;(5) 抗干擾性強(qiáng),工作溫度范圍寬。② 在數(shù)據(jù)線上加上要寫入的數(shù)據(jù)字節(jié)。晶振的頻率可以在1MHz24MHz內(nèi)選擇,在本設(shè)計(jì)電路中選用了12MHz。需注意的是:如果加密位LB1被編程,復(fù)位時(shí)內(nèi)部會鎖存EA端狀態(tài)。一般情況下,ALE仍以時(shí)鐘振蕩頻率的1/6輸出固定的脈沖信號,因此它可對外輸出時(shí)鐘或用于定時(shí)目的。 在flash編程和校驗(yàn)時(shí),P3口也接收一些控制信號。 在訪問外部程序存儲器或用16位地址讀取外部數(shù)據(jù)存儲器(例如執(zhí)行MOVX DPTR) 時(shí),P2 口送出高八位地址。 P1口:P1 口是一個(gè)具有內(nèi)部上拉電阻的8 位雙向I/O 口,p1 輸出緩沖器能驅(qū)動(dòng)4 個(gè)TTL 邏輯電平。 AT89S52引腳圖(1)口線:P0、PPP3 共四個(gè)八位口。在單芯片上,擁有靈巧的8 位CPU 和在系統(tǒng) 可編程Flash,使得AT89S52為眾多嵌入式控制應(yīng)用系統(tǒng)提 供高靈活、超有效的解決方案。綜合考慮,很容易看出,采用方案二,電路比較簡單,軟件設(shè)計(jì)也比較簡單,故采用了方案二。數(shù)字溫度計(jì)根據(jù)使用的傳感器的不同,AD轉(zhuǎn)換電路,及處理單元的不同,它的精度,穩(wěn)定性,測溫范圍等都有區(qū)別,這就要根據(jù)實(shí)際情況選擇符合規(guī)格的數(shù)字溫度計(jì)。該器件可直接向單片機(jī)傳輸數(shù)字信號,便于單片機(jī)處理及控制。該數(shù)字溫度計(jì)以ATMEL公司的AT89S52 單片機(jī)為主控,配以達(dá)拉斯公司的DS18B20數(shù)字溫度傳感器,采用1602雙行英文字符液晶作顯示。與傳統(tǒng)的溫度計(jì)相比,這里設(shè)計(jì)的數(shù)字溫度計(jì)具有讀數(shù)方便,測溫范圍廣,測溫精確,數(shù)字顯示,適用范圍寬等特點(diǎn)。是傳統(tǒng)現(xiàn)場指針雙金屬溫度計(jì)的理想替代產(chǎn)品,廣泛應(yīng)用于各類工礦企業(yè),大專院校,科研院所。綜合上述原因,采用方案二,使用LCD液晶作顯示電路。AT89S52具有以下的特點(diǎn):● 8031 CPU與MCS51 兼容● 壽命:1000寫/擦循環(huán)● 4K字節(jié)可編程FLASH存儲器● 全靜態(tài)工作:024MHz● 三級程序存儲器保密鎖定● 128*8位內(nèi)部RAM● 32條可編程I/O線● 兩個(gè)16位定時(shí)器/計(jì)數(shù)器● 6個(gè)中斷源● 可編程串行通道● 低功耗的閑置和掉電模式● 片內(nèi)振蕩器和時(shí)鐘AT89S52 是一種低功耗、高性能CMOS8位微控制器,具有 8K 在系統(tǒng)可編程Flash 存儲器。8 位微控制器 8K 字節(jié)在系統(tǒng)可編程 Flash。在這種模式下,P0不具有內(nèi)部上拉電阻。 引腳號第二功能: T2(定時(shí)器/計(jì)數(shù)器T2的外部計(jì)數(shù)輸入),時(shí)鐘輸出 T2EX(定時(shí)器/計(jì)數(shù)器T2的捕捉/重載觸發(fā)信號和方向控制) MOSI(在系統(tǒng)編程用) MISO(在系統(tǒng)編程用) SCK(在系統(tǒng)編程用)P2口:P2 口是一個(gè)具有內(nèi)部上拉電阻的8 位雙向I/O 口,P2 輸出緩沖器能驅(qū)動(dòng)4 個(gè)TTL 邏輯電平。對P3 端口寫“1”時(shí),內(nèi)部上拉電阻把端口拉高,此時(shí)可以作為輸入口使用。特殊寄存器AUXR(地址8EH)上的DISRTO位可以使此功能無效。此外,該引腳會被微弱拉高,單片機(jī)執(zhí)行外部程序時(shí),應(yīng)設(shè)置ALE禁止位無效。 XTAL1,XTAL2接石英晶體振蕩器。復(fù)位后,P0~P3輸出高電平;SP寄存器為07H;其它寄存器全部清0;不影響RAM狀態(tài)。改變編程單元的地址和寫入的數(shù)據(jù),重復(fù)①—⑤步驟,直到全部文件編程結(jié)束。176。漏極開路,常態(tài)下高電平。 DS18B20溫度傳感器的內(nèi)部存儲器包括一個(gè)高速暫存RAM和一個(gè)非易失性的可電擦除的E2RAM,后者存放高溫度和低溫度觸發(fā)器TH、TL和結(jié)構(gòu)寄存器。復(fù)位要求主CPU將數(shù)據(jù)線下拉500微秒,然后釋放,DS18B20收到信號后等待16~60微秒左右,后發(fā)出60~240微秒的存在低脈沖,主CPU收到此信號表示復(fù)位成功。圖35為DSl8820內(nèi)部結(jié)構(gòu)。 顯示電路的連接圖4 軟件設(shè)計(jì) DS18b20的讀操作DSl8B20的主要數(shù)據(jù)元件有:64位激光Lasered ROM,溫度靈敏元件和非易失性溫度告警觸發(fā)器TH和TL。當(dāng)數(shù)據(jù)是個(gè)負(fù)數(shù)的時(shí)候,顯示之前要進(jìn)行數(shù)據(jù)轉(zhuǎn)換,將其整數(shù)部分取反加一。 //減//LCD1602//P07==== D07define LCDDATA P1sbit rs=P3^0。 //溫度報(bào)警uchar count。//待顯示的各溫度數(shù)位bit DS18B20_IS_OK = 1。}//1602void delayms(uint z) //延時(shí)N ms{ uint x,y。 LCDDATA=。 delayms(1)。 write_(0x0c)。 Delay(10)。 status = DQ1。i8。 DQ1 = 1。 Delay(5)。 WriteOneByte(0xcc)。//,延時(shí) ng = 0。0x0f]。 //報(bào)警溫度 if(ng == 1){Temp=0。 write_date(0x30+Display_Digit[1])。 write_(0x80+0X40+0)。 39。 write_date(39。)。 39。}void DIS_SET_SEG(void)//在LED上顯示數(shù)據(jù){ Display_Digit[7]=DQ1_SET[0]%100/10。 write_date(39。 write_date(39。)。 write_date(0x30+Display_Digit[4])。} //加上限 和限值下限最大值 }}void S3_SUB(void){ if(mode==2) //下限模式 { DQ1_SET[0]。} //等待按鍵釋放 } if(S2==0) { Delay_ms(10)。 TL0=(6553650000)%256。 //DQ1下限10 DQ1_SET[1]=85。 //讀溫度 if(DS18B20_IS_OK) Display_Temperature()。} //溫度數(shù)據(jù)處理 i=0。TR0=1。 //顯示數(shù)據(jù)處理 DIS_SET_SEG()。 BUZ=~BUZ。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 organisations listed underTo find your nearest CAB, including those that give advice by , click onfor the racist behaviour of their fans during總覺得自己自己似乎應(yīng)該去做點(diǎn)什么,或者寫點(diǎn)什么。Originally, this world, can produce a chemical reaction to an event, in addition to resolutely, have to do, and time. 原來,這個(gè)世界上,對某個(gè)事件能產(chǎn)生化學(xué)反應(yīng)的,除了非做不可的堅(jiān)決,還有,時(shí)間。 Those were broken into various shapes of stationery。t. Baumgartner still will free fall at a speed that would cause you and me to pass out, and no parachute is guaranteed to work higher than 25,000 feet (7,620 meters).cause there40。 Have declared the end of the encounter that haven39。s time, your ideas are always special to clear. Want, want, line is clear, as if nothing could shake his. Also once seemed to be determined to do something, but more often is he backed out at last. Dislike his cowardice, finally found that there are a lot of love, there are a lot of miss, like shadow really have been doomed. Those who do, just green years oneself give oneself an arm injection, or is a selfrighteous spiritual. 一個(gè)人的時(shí)候,自己的想法總是特別地清晰。The end of our life, and can meet many things really do? 而窮盡我們的一生,又能遇到多少事情是真正地非做不可?During my childhood, think lucky money and new clothes are necessary for New Year, but as the advance of the age, will be more and more found that those things are optional。s 21 win.Michel Platini, president of European football39。Employment tribunals.The (lack of) air up there Watch mCayman Islandsbased Webb, the head of Fifa39。Further help.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 you don39。//鍵盤掃描// DIS_DOWN()。}else{LED1=1。TR0=1。 //mode=1 正常模式 while(1) { if(mode==1){//模式1 //鍵盤掃描 KEY_SCAN()。 //初始化蜂鳴器// DQ_CHN=0x01。 //開中斷 ET0=1。 while(!S2){。} //加下限 和限值下限最大值 } if(mode==3)//上限模式 { DQ1_SET[1]。C39。H39。)。)。 Display_Digit[5]=DQ1_SET[1]%100/10。 write_date(39。 39。)。 write_date(39。 39。.39。