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

正文內(nèi)容

傳感器課程設(shè)計(jì)(智能家居、電子稱)-資料下載頁

2025-06-05 13:12本頁面
  

【正文】 92,0x82,0xf8, 0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e}。 define shuma P0 sbit LED_4=P1^0。 sbit LED_5=P1^1。 sbit LED_6=P1^2。 sbit LED_7=P1^3。 void delay(unsigned int x)。 void display1(unsigned char d1,unsigned char d2,unsigned char d3,unsigned char d4)。 void delay(unsigned int x) { unsigned int i。 for(i=0。ix。i++)。 } void display1(unsigned char d1,unsigned char d2,unsigned char d3,unsigned char d4) { shuma=a[d1]。 LED_4=1。 delay(100)。 LED_4=0。 shuma=a[d2]amp。0x7f。 //DP=1。 LED_5=1。 delay(100)。 //DP=0。 LED_5=0。 shuma=a[d3]。 LED_6=1。 delay(100)。 LED_6=0。 shuma=a[d4]。 LED_7=1。 delay(100)。 LED_7=0。 } unsigned int Adc0832(unsigned char channel) { uchar i=0。 uchar j。 uint dat=0。 uchar ndat=0。 if(channel==0)channel=2。 if(channel==1)channel=3。 ADDI=1。 _nop_()。 _nop_()。 ADCS=0。 _nop_()。 _nop_()。 ADCLK=1。 _nop_()。 _nop_()。 ADCLK=0。 _nop_()。 _nop_()。 ADCLK=1。 ADDI=channelamp。0x1。 _nop_()。 _nop_()。 ADCLK=0。 _nop_()。 _nop_()。 ADCLK=1。 ADDI=(channel1)amp。0x1。 _nop_()。 _nop_()。 ADCLK=0。 ADDI=1。 _nop_()。 _nop_()。 dat=0。 for(i=0。i8。i++) { dat|=ADDO。 ADCLK=1。 _nop_()。 _nop_()。 ADCLK=0。 _nop_()。 _nop_()。 dat=1。 if(i==7)dat|=ADDO。 } for(i=0。i8。i++) { j=0。 j=j|ADDO。 ADCLK=1。 _nop_()。 _nop_()。 ADCLK=0。 _nop_()。 _nop_()。 j=j7。 ndat=ndat|j。 if(i7)ndat=1。 } ADCS=1。 ADCLK=0。 ADDO=1。 dat=8。 dat|=ndat。 return(dat)。 } void disp(void) { getdata=Adc0832(0)。 temp=getdata**500。 dispbuf[0]=temp%10。 dispbuf[2]=temp/10%10。 dispbuf[1]=temp/100。 display1(0,dispbuf[1],dispbuf[2],dispbuf[0])。 } void main(void) { while(1) { disp()。 } } 頻率計(jì)程序 include ifndef LCD_CHAR_1602_2021_4_9 define LCD_CHAR_1602_2021_4_9 define uchar unsigned char define uint unsigned int sbit lcdrs = P2^0。 sbit lcdrw = P2^1。 sbit lcden = P2^2。 unsigned char count=0,ss=0。 void delay(uint z) //延時(shí)函數(shù),此處使用晶振為 { uint x,y。 for(x=z。x0。x) { for(y=110。y0。y) { 。 } } } void write_(uchar ) //寫入指令數(shù)據(jù)到 lcd { lcdrw=0。 lcdrs=0。 P0=。 delay(5)。 lcden=1。 delay(5)。 lcden=0。 } void write_data(uchar date) //寫入字符顯示數(shù)據(jù)到 lcd { lcdrw=0。 lcdrs=1。 P0=date。 delay(5)。 lcden=1。 delay(5)。 lcden=0。 } void init1602() //1602 液晶初始化設(shè)定 { lcdrw=0。 lcden=0。 write_(0x3C)。 write_(0x0c)。 write_(0x06)。 write_(0x01)。 write_(0x80)。 } void write_sfm(uchar add,uchar date)//向指定地址寫入數(shù)據(jù) { uchar shi,ge。 shi=date/10。 ge=date%10。 write_(0x80+add)。 write_data(0x30+shi)。 write_data(0x30+ge)。 } endif unsigned char code date[]=count 。 void cal_init() //計(jì)數(shù)器 0 初始化 { TMOD=0x00。 TH0=0x1f。 TL0=0xaa。 //EA=1。 ET0=1。 TR0=1。 } void clock_init() //顯示子程序 { uchar i。 write_(0x80)。 for(i=0。i16。i++) { write_data(date[i])。 } write_sfm(0x40,count)。 } void cal_func() interrupt 1 using 2 //定時(shí)器 0 中斷服務(wù)程序 { TH0=0x1f。 TL0=0xaa。 ss++。 if(ss=175) //根據(jù)實(shí)驗(yàn)測定 定時(shí)器溢出計(jì)數(shù) 175 次定時(shí)約為 100ms { clock_init()。 ss=0。 count=0。 } } void count_int0(void) interrupt 0 using 1 //外部中斷 0 服務(wù)程序 { count++。 } void main() { cal_init()。 EA=1。 EX0=1。 TR0=1。 //外部中斷 0 開 IT0=1。 //全局中斷開 init1602()。 clock_init()。 while(1) { } }
點(diǎn)擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計(jì)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1