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

正文內(nèi)容

基于stc89c52單片機出租車計價器設(shè)計(存儲版)

2024-07-26 18:50上一頁面

下一頁面
  

【正文】 便轉(zhuǎn)入進行處理,處理結(jié)束返回。調(diào)試的方法是在指定地址寫一個數(shù)字再看能是否讀出,當(dāng)顯示程序編寫好后,可以在Ptoteus中用數(shù)碼管顯示看是否與分析一致,也可以把讀出的數(shù)據(jù)賦給某個變量,再通過在keil中執(zhí)行view/watchamp。0x7f(共陽極時加入amp。圖41里程無溢出時仿真結(jié)果(小于三公里)圖42里程無溢出時仿真結(jié)果(大于三公里)圖43里程溢出時仿真結(jié)果(大于十公里)圖44 單價調(diào)整(起步價)結(jié) 論經(jīng)過近幾個月的設(shè)計,在多位老師和同學(xué)的幫助下,全面實現(xiàn)了預(yù)先設(shè)定的計價器應(yīng)具有的功能,且滿足了所有設(shè)計指標(biāo)。 謝 辭在此次設(shè)計中,陳文清老師作為我的指導(dǎo)老師,至始至終都給予我了不少幫助,從下任務(wù)書開始,就幫我制定規(guī)劃,提醒我應(yīng)注意的問題;借給我資料,幫我聯(lián)系硬件;和我一起調(diào)程序,并提出了很多的修改意見以及完善方案;此外還認真批閱了我的論文,指出其中很多瑕疵和不清晰的地方;更重要的是在我遇到困難時對我的鼓勵,讓我不懈怠、不退縮、也讓我更有信心;可以說我的每一點進展都與陳老師的付出是分不開的。 // 清零sbit key1=P1^1。 sbit wela=P1^6 。uchar danjia1,danjia2,danjia3,qibu,danjia。j)。_nop_()。 Sda=1。 Scl=1。 Scl=0。}void Send(uchar Data){ uchar BitCounter=8。 Scl=1。uchar BitCounter=8。 //temp的最低位置1elsetemp=tempamp。}void WrToROM(uchar Addresss,uchar Data){ start()。 delay(20)。 Send(0xa1)。 P3=0x00。 //uint numwei=0。 djiao=danjia0%10。 wela=1。 wela=1。 P2=0x08。 wela=0。 wela=0。 dula=1。 dula=1。 delay(5)。 while(!key1)。 }if(key3num==2) //調(diào)夜晚單價 danjia2 //while (key3num==2) { WrToROM (0x01,danjia1)。 } } if(key2==0) { delay(5)。 WrToROM (0x02,danjia2)。 } } if(key2==0) { delay(5)。 WrToROM (0x03,danjia3)。 } } if(key2==0) { delay(5)。 WrToROM (0x04,qibu)。 } } } } }}void init(){ //Sda=1。 danjia3=RdFromROM(0x03)。 //開總中斷 // EX1=1。 ET0=1。 //TR1=0。}void jisuan(){ if(led==1) if(licheng30) //等價于if((led=1)amp。 //else // zongjine=qibu+7*danjia+dengdai*danjia3。 } // aa=1。 //exter=qufan。 display(123,4,56,danjia)。 TH0=(6553646080)/256。temp1) //每秒比較一次 temp=inter。 inter++。 //TH1=(655363000)/256。 if(inter==500) //設(shè)車輪周長為2米,則500個脈沖為1Km { inter=0。s with the United States developed 74 series, or the 6039。s dedicated processor, while the average model prices fall to one . dollars, the most highend [1] model only 10 SCM systems are no longer only in the development and use of bare metal environment, a large number of proprietary embedded operating system is widely used in the full range of SCM. The handheld puters and cell phones as the core processing of highend microcontroller can even use a dedicated Windows and Linux operating systems.SCM is more suitable than the specific processor used in embedded systems, so it was up to the application. In fact the number of SCM is the world39。 if(exter==0) // 負跳變有效 { // IT1=1。 } */void timer1() interrupt 3 //產(chǎn)生方波,模擬A44E { TH1=(655362765)/256。 delay(5)。 if(bb==100) //每5sec比較一次判斷是否等待 //if(bb==50) { bb=0。 init()。 /* WrToROM (0x05,55)。 key3num=0。 while(!key4)。 //起步公里內(nèi)金額計算 else //if(licheng30) zongjine=qibu+(licheng/10+8)*danjia+dengdai*danjia3 。 dula=0。 ET1=1。 //TL0=(6553650000)%256。 inter=0。 danjia1=RdFromROM(0x01)。 delay(5)。 } } display(0,4,0,qibu)。 delay(5)。 } } display(0,3,0,danjia3)。 delay(5)。 } } display(0,2,0,danjia2)。 delay(5)。 while(!key2)。 while(!key1)。 key3num=1。 P2=0x80。 P2=0x40。 wela=1。 wela=1。 delay(4)。 dula=0。 dula=0。 lge=licheng0%10。 delay(10)。 } /*void main(){ uchar rd。 Ack()。 Ack()。 Scl=0。if(Sda) //如果Sda=1。} uchar Read() //讀一個字節(jié)的數(shù)據(jù),并返回該字節(jié)值{uchar temp=0。0x80)==0x80) Sda=1。 Scl=0。 Scl=1。 }void stop(){ Sda=0。}void start(){ Scl=1。_nop_()。i) for(j=110。uint key3num,qiehuantemp。 //sbit wela=P3^1 。 //sbit fangbo=P3^5。1. 應(yīng)嘗試著在不影響整個計價器的功能的前提下把兩個鎖存器74HC573去掉,這樣會使硬件電路更簡潔,成本也會更低。本次設(shè)計聯(lián)調(diào)時出現(xiàn)的問題主要有:第一是顯示時存在時序上的沖突,;第二就是中斷設(shè)置時出現(xiàn)混亂,即同時用定時器0,定時器1,和外部中斷1時,后兩者都不再工作(通過編一個方波程序,),解決方法時讓定時器1工作在計數(shù)方式代替工作在定時方式,如此不但可以完成相應(yīng)功能,解決了問題,更重要的是省去一個中斷,簡化了程序設(shè)計。 while(!key)。 AT24C02的編程與調(diào)試對AT24C02編程對我來說是一個比較新知識點,遇到了不少問題, 這里僅把經(jīng)驗教訓(xùn)簡要介紹一下。如此循環(huán)操作,使每位分時顯示該位應(yīng)該顯示的字符 [7] 。用定時器作為基準(zhǔn),可使測試的等待時間更為精確(可以精確到uS級);且每隔5秒比較一次,能有效減小誤判率,避免把汽車低速行駛誤認為靜止等待處理。程序流程如圖31所示。使通道打開,接著送字碼,使字碼保持住;(送高電平),緊接著送位碼,控制要顯示的位,數(shù)據(jù)被保持。圖26 74HC573的引腳分布:為三態(tài)允許輸入端(低電平有效),也可稱作輸出允許端;1D8D為數(shù)據(jù)輸入端;1Q8Q為數(shù)據(jù)輸出端;LE為鎖存允許端。所以在實際編程時一定要注意鍵盤的去抖動。(2)主控器的讀數(shù)據(jù)格式:與寫數(shù)據(jù)的不同之處在于數(shù)據(jù)發(fā)送結(jié)束和停止位之間加一個非應(yīng)答位,表示數(shù)據(jù)發(fā)送結(jié)束,格式為當(dāng)SCL為高時SDA傳送1。AT24C02芯片引腳配置如圖24所示。這樣兩次電壓變換,使霍爾開關(guān)完成了一次開關(guān)動作。對于單片機的P0口,可以作為地址/數(shù)據(jù)總線使用,也可以作為一般的I/O口使用。系統(tǒng)結(jié)構(gòu)圖如圖11所示。超過3公里后,實現(xiàn)每1公里單價收費,中間遇到暫停時,計程數(shù)不再增加,開始計時收費,計程收費和計時收費的和便構(gòu)成了一位乘客的車費。也希望能在進一步熟悉單片機控制的同時,對數(shù)字電子技術(shù)、模擬電子技術(shù)、計算控制技術(shù)以及常用外圍芯片有更深層次的了解,提高自己的綜合能力。為了進一步豐富和鞏固單片機知識,也為了能更好的聯(lián)系實際應(yīng)用,本次畢業(yè)設(shè)計選擇了基于單片機STC89C52控制的出租車計價器,并力求能做出實物。如數(shù)字示波器、數(shù)字信號源、感應(yīng)電流表等。里程檢測模塊由A44E構(gòu)成,控制模塊包括STC89C52單片機和AT24C02,人機模塊包括獨立鍵盤和LED動態(tài)顯示?,F(xiàn)在各大中城市出租車行業(yè)都已普及自動計價器,所以計價器技術(shù)的發(fā)展有很好的前景。關(guān)鍵詞:STC89C52,霍爾傳感器A44E ,I2C總線,動態(tài)顯示 Design of Taximeter Based on STC89C52ABSTRACTWith the rapid development of city constriction, the taxi industry which symbolizes the cityscape also has an accelerated progress. Nowadays the automatic taximeter has been widely used in taxi industry in many cites. Therefore, the development of automatic taximeter is doomed. Although automatic taximeter is not spread in some towns, there is no doubt that it would be popularized. Thus, in future the business of automatic taximeter is still potential. One typical applicatio
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1