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

正文內(nèi)容

基于單片機(jī)的計算器設(shè)計論文-資料下載頁

2024-11-12 14:52本頁面

【導(dǎo)讀】近年來隨著科技的飛速發(fā)展,單片機(jī)的應(yīng)用正在不斷深入,同時帶動傳統(tǒng)控制檢測技術(shù)日益更新。在實時檢測和自動控制的。合,來加以完善。計算機(jī)在人們的日常生活中是比較常見的電子產(chǎn)品之一。制按鍵為元件來設(shè)計的計算器。利用此設(shè)計熟悉單片機(jī)微控制器。掌握MicrosoftVisualC++應(yīng)用程序開發(fā)環(huán)境,常用的。LCD顯示器的使用方法和一般鍵盤的使用方法。匯編語言和C語言的特點(diǎn)及選擇………………………計算器可謂是我們最親密的電子伙伴之一。驗出發(fā)對計算器設(shè)計做了詳細(xì)的分析和研究。型計算機(jī)的一個重要分支,也是頗具生命力的機(jī)種。算機(jī)簡稱單片機(jī),特別適用于控制領(lǐng)域,故又稱為微控制器。MCS-51系列單片機(jī)Intel8051為中心器件來設(shè)計計算器控制器,計的能力的目的。品種共存;單片機(jī)從8位、16位到32位,數(shù)不勝數(shù),應(yīng)有盡有,電池供電的應(yīng)用場合。機(jī)除了功能強(qiáng)和功耗低外,還要求其體積要小。

  

【正文】 ]=str1[2]=str1include //51 單片機(jī)基本定義頭文件 include include //循環(huán)位移頭文件 define uchar unsigned char //宏定義 define uint unsigned int sbit P1_4=P1^4。 //I/O 端口定義(矩陣掃描后 4 位端口) sbit P1_5=P1^5。 sbit P1_6=P1^6。 sbit P1_7=P1^7。 uchar i,num s。 uchar wei,wei 2,ss,ss1,ss2,str[]={0,0,0,0,0,0,0}。 long temp,temp1,str[]={10,10,10,10,10,10,10}。 uchar code dutable[]={ //段位編碼 0xc0,0xf9,0xa4,0xb0,0x99,0x92, 0x82,0xf8,0x80,0x90,0x88,0x83, 0xc6,0xa1,0x86,0x8e}。 uchar code wetable[]={ 0xfe,0xfd,0xfb,0xf7,0xef,0xdf}。 void init()。 //函數(shù)聲明 void panduan()。 30 void display()。 void delay(uint z)。 void shaomiao()。 void main() //主函數(shù) { init()。 //調(diào)用變量初始化函數(shù) while(1) //大循環(huán) { shaomiao()。 //調(diào)用矩陣掃描加處理函數(shù) diaplay()。 //調(diào)用顯示函數(shù) } } void init() { ss2=0。 wei2=1。 temp1=0。 ss=0。 ss1=0。 temp=0。 wei=0。 num=0。 } void delay(uint z) //延時函數(shù)(單位 ms) { 31 uchar i。 uint j。 for(j=z。j0。j) for(i=114。i0。i)。 } void shaomiao() //掃描加處理函數(shù) { for(i=0,s=0xfe。i4。i++) //低四位端口依次賦值 1 { P1=s。 //對 P1 口賦值 panduan()。 //調(diào)用判斷處理函數(shù) s=_crol_(s,1)。 //s 循環(huán)位左移 s=sl0xf0。 //進(jìn)行位或運(yùn)算(使高 4 位復(fù)原) } } void panduan() { uchar n。 if(P1_4==0||P1_5==0||P1_6==0||P1_7==0) { delay(10)。 P1=sl0xf0。 if(P1_4==0||P1_5==0||P1_6==0||P1_7==0) { if(P1_4==0) 32 {n=1。num=i*4+n1。} else if(P1_5==0) {n=2。num=i*4+n1。} else if(P1_6==0) {n=3。num=i*4+n1。} else if(P1_7==0) {n=4。num=i*4+n1。} if(num10amp。amp。wei!=7) { wei++。 if(ss1==1) { temp=0。 str[6]=str[5]=str[4]=str[3]=str[2]=str[1]=10。 str1[6]=str1[5]=str1[4]=str1[3]=str1[2]=str1[1]=0。 ss1=0。 } str[wei]=num。 if(str[1]!=10) temp=str[1]。 if(str[2]!=10) temp=str[1]*10+str[2]。 if(str[3]!=10) temp=str[1]*100+str[2]*10+str[3]。 if(str[4]!=10) temp=str[1]*1000+str[2]*100+str[3]*10+str[4]。 if(str[5]!=10) temp=str[1]*10000+str[2]*1000+str[3]*100+str[4]*10+str[5]。 if(str[6]!=10) 33 temp=str[1]*100000+str[2]*10000+str[3]*1000+str[4]*100+str[5]*10+str[6]。 } if(num=10) { wei=0。 if(num==10) { temp=0。 l[1]=0。 wei=0。 temp1=0。 ss=0。 wei2=1。 } if(ss1==0amp。amp。num==11||(ss1==0amp。amp。ss2!=0amp。amp。num11amp。amp。num16)) { if(num==11) ss2=0。 switch(ss) { case0:break。 case1:temp=temp1。break。 case2:temp=temp1temp。break。 34 case3:temp=temp*temp1。break。 case4:temp=temp1/temp。break。 } if(temp999999) temp=0。 ss1=1。 } if(num==12) { temp1=temp。 ss=1。ss1=1。ss2=1。 } if(num==13) { temp1=temp。 ss=2。ss1=1。ss2=1。 } if(num==14) { temp1=temp。 ss=3。ss1=1。ss2=1。 } if(num==15) { ss=4。ss1=1。ss2=1。 35 } } } str1[6]=temp/100000。 str1[5]=temp%100000/10000。 str1[4]=temp%10000/1000。 str1[3]=temp%1000/100。 str1[2]=temp%100/10。 str1[1]=temp%10/1。 if(str1[1]!=0) wei2=1。 if(str1[2]!=0) wei2=2。 if(str1[3]!=0) wei2=3。 if(str1[4]!=0) wei2=4。 if(str1[5]!=0) wei2=5。 if(str1[6]!=0) wei2=6。 } while(P1_4==0||P1_5==0||P1_6==0||P1_7==0)。 } void display() 36 { char i1。 for(i1=1。i1wei2+1。i1++) { P2=wetable[0]。 P3=dutable[14]。 } else { P2=wetable[i11]。 P3=dutable[str1[i1]]。 delay(10)。 P3=0xff。 } }
點(diǎn)擊復(fù)制文檔內(nèi)容
醫(yī)療健康相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1