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

正文內(nèi)容

動(dòng)態(tài)汽車衡系統(tǒng)胎壓形變及車速檢測(cè)設(shè)計(jì)——軟件部分畢業(yè)論文-資料下載頁(yè)

2025-06-24 02:05本頁(yè)面
  

【正文】 //第一次檢測(cè)void jiance2()。//第二次檢測(cè)jishi() 。 //計(jì)時(shí)功能西安工業(yè)大學(xué)北方信息工程學(xué)院畢業(yè)設(shè)計(jì)(論文)dubianma()。 //讀紅外編碼eocan()。 //eo參數(shù)求取void vdisplay(uchar aa,uchar bb,uchar cc,uchar dd)。//車速顯示void wdisplay(uchar aa,uchar bb,uchar cc,uchar dd)。//重量顯示ufloat chab(case)。 //查表程序int ReadAD976(void)。//AD轉(zhuǎn)換讀程序void ReadAD976_N(int *array, uchar n)。void delay(unsigned int ss)。// 延時(shí)程序void main() //主程序{ init()。//初始化 jiance1()。 jishi()。//開啟定時(shí)器 jiance2()。 dubianma()。 qchang=qgeshu*。 //前一排長(zhǎng)度 hchang=hgeshu*。 //后一排的長(zhǎng)度 v=qchang/a。 vdisplay(uchar aa,uchar bb,uchar cc,uchar dd,)。 =0。 =1。 //選中AD976A int ReadAD976(void)。// 開啟轉(zhuǎn)換 P0=0xff。 //設(shè)置位輸入狀態(tài) P0=dataH。 tt=P0。 scanf(%x,amp。tt)。 printf(%d\n,tt)。 P0=dataL。 tt1=P0。 scanf(%x,amp。tt1)。 printf(%d\n,tt1)。 hfeli=(tt*256+tt1)*15/65536; //15噸,AD轉(zhuǎn)換精度為15/65536 tt=0。 tt1=0。 //將變量清零 =1。 =0。 //選中AD976B int ReadAD976(void)。// 開啟轉(zhuǎn)換 P0=0xff。 //設(shè)置位輸入狀態(tài) P0=dataH。 tt=P0。 scanf(%x,amp。tt)。 printf(%d\n,tt)。 P0=dataL。 tt1=P0。 scanf(%x,amp。tt1)。 printf(%d\n,tt1)。 hfeli=(tt*256+tt1)*15/65536; //15噸,AD轉(zhuǎn)換精度為15/65536 case=sin(eo/r)。 aaa=chab(case)。 //查表得到阿爾法(aaa)的值 sfeli=hfeli*log(eo/0o)/(2*aaa)。 jweigh=weifhsfeli。 wdisplay()。 //重量顯示}void init()//初始化{ P1=0。 ALE=0。//關(guān)閉377 P3=0。}void jiance1()//檢測(cè)是否有車經(jīng)過(guò){ while(1) { uint=temp。 houba=1。 ALE=1。 P0=0x01。 //abcd=1000 ALE=0。 P0=0xff。 //p0口設(shè)為輸入 temp=P0。 //讀P0口數(shù)據(jù) if(temp!=0) break。 }}void jiance2()//檢測(cè)數(shù)據(jù)是否有效{ while(1) { uint=temp。 houba=1。 ALE=1。 P0=0x01。 //abcd=1000 ALE=0。 P0=0xff。 //p0口設(shè)為輸入 temp=P0。 //讀P0口數(shù)據(jù) if(temp!=0xff) TR0=0。 //停止計(jì)時(shí) }}jishi() //定時(shí)1ms{ while(1) { uint temp=65486,a=0。 TMOD=0x01。 // 定時(shí)器0,工作方式1 EA=0。 ET0=0。 //禁止中斷 TH0=temp/256。 TL0=temp%256。 //裝初值 TF0=0。 //標(biāo)志位清零 TRO=1。 //啟動(dòng)定時(shí)器 if(TF0==1) //標(biāo)志位 TF0=0 a++。 }}dubianma()//讀取紅外編碼{ uint hgeshu,qgeshu,geshu,shu,num=0,temp1[],temp2[],abcd=0x00。 for(abcd=0x07,abcd++)//讀第一行的編碼 { qianba=1。 //選中前八位 ALE=1。 //打開鎖存 P0=abcd。 P0=0xff。 //p0口設(shè)為輸入 temp1[num]=P0。 houba=1。//選中后八個(gè) ALE=1。 P0=abcd。 P0=0xff。//p0口設(shè)為輸入 temp1[num]=P0。 shu=temp1[num]amp。0xffff。//求編碼中一的個(gè)數(shù) if(shu0x8000) { while(1) { geshu=0。 shu=_cror_(shu,1)。 if(shu=0) geshu++。 } } else if(shu0x8000amp。amp。shu!=0xffff) { while(1) { geshu=0。 shu=_crol_(shu,1)。 if(shu=0) geshu++。 } } else if(shu=0xffff) geshu=16。 num++。 qgeshu+=geshu。 //前一行數(shù)據(jù)處理并返回1的個(gè)數(shù) } for(abcd=0x07,abcd=0xff,abcd++)//讀第二行的編碼 { qianba=1。 suocun=1。 P0=abcd。 P0=0xff。//p0口設(shè)為輸入 temp2[num]=P0。 houba=1。 suocun=1。 P0=abcd。 P0=0xff。//p0口設(shè)為輸入 temp2[num]=P0。 shu=temp2[num]amp。0xffff。//求編碼中一的個(gè)數(shù) if(shu0x8000)//第一位不是1 { while(1) { geshu=0。 shu=_cror_(shu,1)。//將數(shù)右移一位 if(shu=0) geshu++。 } } else if(shu0x8000amp。amp。shu!=0xffff)//第一位是1且不全是1 { while(1) { geshu=0。 shu=_crol_(shu,1)。//將數(shù)左移一位 if(shu=0) geshu++。 } } else if(shu=0xffff)//全是1 geshu=16。 num++。 hgeshu+=geshu。//后一行數(shù)據(jù)處理并返回1的個(gè)數(shù) }}void vdisplay(uchar aa,uchar bb,uchar cc,uchar dd)//車速顯示{ while(1) { uint temp。 wela=0x10。 P1=wela。//選中第五位 temp=v*100。 aa=temp/1000。 dula=table[aa]。 =0。 =0。//打開段選鎖存 P0=duan。 =1。//鎖存數(shù)據(jù) delay()。 wela=0x20。 P1=wela。//選中第六位 bb=(temp%1000)/100。 dula=table[bb+1]。 =0; =0。//打開段選鎖存 P0=duan。 =1。//鎖存數(shù)據(jù) delay()。 wela=0x40。 P1=wela。//選中第七位 cc=(temp%100)/10。 dula=table[cc]。 =0。 =0。//打開段選鎖存 P0=duan。 =1。//鎖存數(shù)據(jù) delay()。 wela=0x80。 P1=wela。//選中第八位 dd=temp%10。 dula=table[dd]。 =0。 =0。//打開段選鎖存 P0=duan。 =1。//鎖存數(shù)據(jù) delay()。 } }wdisplay(uchar aa,uchar bb,uchar cc,uchar dd)//重量顯示{ while(1) { uint temp。 wela=0x01。 P1=wela。//選中第一位 temp=jweigh*100。 aa=temp/1000。 dula=table[aa]。 =0。 =0。//打開段選鎖存 P0=duan。 =1。//鎖存數(shù)據(jù) delay()。 wela=0x02。 P1=wela。//選中第二位 bb=(temp%1000)/100。 dula=table[bb+1]。//顯示小數(shù)點(diǎn) =0。 =0。//打開段選鎖存 P0=duan。 =1。//鎖存數(shù)據(jù) delay()。 wela=0x04。 P1=wela。//選中第三位 cc=(temp%100)/10。 dula=table[cc]。 =0。 =0。//打開段選鎖存 P0=duan。 =1。//鎖存數(shù)據(jù) delay()。 wela=0x08。 P1=wela。//選中第四位 dd=temp%10。 dula=table[dd]。 =0。 =0。//打開段選鎖存 P0=duan。 =1。//鎖存數(shù)據(jù) delay()。 } }eocan()//eo參數(shù)的求取{ uint ab,cd,oa,0o,r,eo。 ab=qchang*5。 cd=hchang*5。 oa=(ab*abcd*cd100)/20。 0o=oa+20。 r=ab*ab+oa*oa。 eo=sqrt(r*r0o*0o)。}int ReadAD976(void)//AD轉(zhuǎn)換程序{ int ad。 uchar datah,datal。 AD976COM=0。 //開啟一次轉(zhuǎn)換 while(! INT976)。//等待轉(zhuǎn)換結(jié)束 datah=AD976DatH。//讀高八位數(shù)據(jù) datal=AD976DatL。 //讀低八位數(shù)據(jù) ad=(datah+8)+datal。 return(ad)?!  ?/返回轉(zhuǎn)換結(jié)果}            //讀n點(diǎn)轉(zhuǎn)換值void ReadAD976_N(int *array, uchar n){ unsigned char i。 for(i=O。in。i++) { array [i]= ReadAD976。 }}ufloat chab(case)//求aaa的查表程序{ if(caseamp。amp。case) return 10。 else if(caseamp。amp。case) return 11。 else if(caseamp。amp。case) return 12。 else if(caseamp。amp。case) return 13。 else if(caseamp。amp。case) return 14。 else if(caseamp。amp。case) return 15。 else if(caseamp。amp。case) return 16。 else if(caseamp。amp。case) return 17。 else if(caseamp。amp。case) return 18。 else if(caseamp。amp。case) return 19。 else if(caseamp。amp。case) return 20。 else if(caseamp。amp。case) return 21。 else if(caseamp。amp。case) return 22。 else if(caseamp。amp。case) return 23。 else if(caseamp。amp。cas
點(diǎn)擊復(fù)制文檔內(nèi)容
范文總結(jié)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1