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

正文內(nèi)容

基于proteus的出租車計(jì)價(jià)及安全系統(tǒng)的研究畢業(yè)設(shè)計(jì)-資料下載頁(yè)

2025-06-27 18:38本頁(yè)面
  

【正文】 RS=1。 RW=0。 EN=0。 P0=dat。39 delay1ms(1)。 EN=1。 delay1ms(1)。 EN=0。}//// LCD 初始化設(shè)置//void lcd_init(){ delay1ms(15)。 wr_(0x38)。delay1ms(5)。 wr_(0x08)。delay1ms(5)。 wr_(0x01)。delay1ms(5)。 wr_(0x06)。delay1ms(5)。 wr_(0x0c)。delay1ms(5)。}//// 定時(shí)計(jì)數(shù)器初始化//void Time_init(void){ TMOD = 0x51。 //T1 為 16 位計(jì)數(shù)模式 ,定時(shí)器 T0 工作方式 1 定時(shí)TH0 = 1000 8。 //1ms 定時(shí)常數(shù) TL0 = 1000 amp。 0xFF。 TH1 = 0x00。TL1 = 0x00。 //計(jì)數(shù)器初值為 0 ET0 = 1。 //允許定時(shí) 1 中斷EA = 1。 //允許總中斷40IT1=1。 //邊沿觸發(fā)方式 TCON = 0x40。 //設(shè)串口工作模式 TI = 1。 //發(fā)送完成標(biāo)志位置 1}////T0 定時(shí)器中斷控制點(diǎn)陣屏顯示//void T0_Led_Display_control() interrupt 1{ static INT8U Scan_BIT=0x01。 //初始列碼 TH0 = 1000 8。 //重新列入 1ms 定時(shí)常數(shù) TL0 = 1000 amp。 0xFF。 Scan_BIT = _cror_(Scan_BIT,1)。 //計(jì)算當(dāng)前列碼 putchar(Scan_BIT)。 //先通過(guò)串口發(fā)送列碼 while (TI == 0)。 //等待串口輸出完成 if(KEY2==1) //顯示‘HELP 打 110’ { //發(fā)送四字節(jié)點(diǎn)陣編碼(四字節(jié)行碼) putchar (Arrow_Matrix [ Offset + Idx +24 ] )。 while (TI == 0)。 putchar (Arrow_Matrix [ Offset + Idx +16 ] )。 while (TI == 0)。 putchar (Arrow_Matrix [ Offset + Idx +8 ] )。 while (TI == 0)。 putchar (Arrow_Matrix [ Offset + Idx ] )。 while (TI == 0)。 ST_CP = 0。 //先置低電平 ST_CP = 1。 //上升沿將數(shù)據(jù)送到輸出鎖存器 ST_CP = 0。 //置低電平 if (++Idx == 8) Idx = 0。 //下一次取數(shù)的索引 } if(KEY1==1amp。amp。KEY2==0) //顯示 ‘TAXI 有人’41 { //發(fā)送四字節(jié)點(diǎn)陣編碼(四字節(jié)行碼) putchar (Arrow_Matrix2 [ Offset + Idx +24 ] )。 while (TI == 0)。 putchar (Arrow_Matrix2 [ Offset + Idx +16 ] )。 while (TI == 0)。 putchar (Arrow_Matrix2[ Offset + Idx +8 ] )。 while (TI == 0)。 putchar (Arrow_Matrix2 [ Offset + Idx ] )。 while (TI == 0)。 ST_CP = 0。 //先置低電平 ST_CP = 1。 //上升沿將數(shù)據(jù)送到輸出鎖存器 ST_CP = 0。 //置低電平 if (++Idx == 8) Idx = 0。 //下一次取數(shù)的索引 } if(KEY1==0amp。amp。KEY2==0) //顯示‘TAXI 空車’ { //發(fā)送四字節(jié)點(diǎn)陣編碼(四字節(jié)行碼) putchar (Arrow_Matrix1 [ Offset + Idx +24 ] )。 while (TI == 0)。 putchar (Arrow_Matrix1 [ Offset + Idx +16 ] )。 while (TI == 0)。 putchar (Arrow_Matrix1 [ Offset + Idx +8 ] )。 while (TI == 0)。 putchar (Arrow_Matrix1 [ Offset + Idx ] )。 while (TI == 0)。 ST_CP = 0。 //先置低電平 ST_CP = 1。 //上升沿將數(shù)據(jù)送到輸出鎖存器 ST_CP = 0。 //置低電平 if (++Idx == 8) Idx = 0。 //下一次取數(shù)的索引 } }//// 有乘客時(shí)數(shù)據(jù)處理 (為了方便演示假設(shè)車輪旋轉(zhuǎn) 100 圈為 1km,起價(jià)為 5 元,每公里 元)// void numpro(int x) 42{ unsigned int a,c,d。 a=xsum 。 c=a*。 Price=c*。 d=Price*10。 disdata1[4]=d%10+0x30。 //價(jià)錢數(shù)據(jù)分解d=d/10。disdata1[3]=(d+5)%10+0x30。d=(d+5)/10。disdata1[2]=d%10+0x30。d=d/10。disdata1[1]=d%10+0x30。disdata1[0]=d/10+0x30。 disdata2[5]=a%10+0x30。 //距離數(shù)據(jù)分解a=a/10。disdata2[4]=a%10+0x30。a=a/10。disdata2[3]=a%10+0x30。a=a/10。disdata2[2]=a%10+0x30。a=a/10。disdata2[1]=a%10+0x30。disdata2[0]=a/10+0x30。 wr_(0x86)。 //顯示價(jià)錢 wr_dat(disdata1[0])。 wr_(0x87)。 wr_dat(disdata1[1])。43 wr_(0x88)。 wr_dat(disdata1[2])。 wr_(0x89)。 wr_dat(disdata1[3])。 wr_(0x8a)。 wr_dat(39。.39。)。 wr_(0x8b)。 wr_dat(disdata1[4])。 wr_(0xc9)。 //顯示里程 wr_dat(disdata2[0])。 wr_(0xca)。 wr_dat(disdata2[1])。 wr_(0xcb)。 wr_dat(disdata2[2])。 wr_(0xcc)。 wr_dat(disdata2[3])。 wr_(0xcd)。 wr_dat(39。.39。)。 wr_(0xce)。 wr_dat(disdata2[4])。 wr_(0xcf)。 wr_dat(disdata2[5])。}//// 無(wú)乘客時(shí)數(shù)據(jù)處理 //void numpro1(int x){ 44 unsigned int a,d。 a=x。 Price=0。 d=Price*10。sum=a。 disdata1[4]=d%10+0x30。 //價(jià)錢數(shù)據(jù)分離d=d/10。disdata1[3]=(d)%10+0x30。d=(d+5)/10。disdata1[2]=d%10+0x30。d=d/10。disdata1[1]=d%10+0x30。disdata1[0]=d/10+0x30。 disdata2[5]=a%10+0x30。 //距離數(shù)據(jù)分解a=a/10。disdata2[4]=a%10+0x30。a=a/10。disdata2[3]=a%10+0x30。a=a/10。disdata2[2]=a%10+0x30。a=a/10。disdata2[1]=a%10+0x30。disdata2[0]=a/10+0x30。 wr_(0x86)。 //顯示價(jià)錢 wr_dat(disdata1[0])。 wr_(0x87)。 wr_dat(disdata1[1])。45 wr_(0x88)。 wr_dat(disdata1[2])。 wr_(0x89)。 wr_dat(disdata1[3])。 wr_(0x8a)。 wr_dat(39。.39。)。 wr_(0x8b)。 wr_dat(disdata1[4])。 wr_(0xc9)。 //顯示里程 wr_dat(disdata2[0])。 wr_(0xca)。 wr_dat(disdata2[1])。 wr_(0xcb)。 wr_dat(disdata2[2])。 wr_(0xcc)。 wr_dat(disdata2[3])。 wr_(0xcd)。 wr_dat(39。.39。)。 wr_(0xce)。 wr_dat(disdata2[4])。 wr_(0xcf)。 wr_dat(disdata2[5])。} //// 轉(zhuǎn)數(shù)檢測(cè) // unsigned int count0() {46if(TH1==255) {TH1= 0x00。 //重新賦值TL1 = 0x00。 count++。 } zhuanshu=count*65536+TL1+TH1*256。 return zhuanshu。 } //// 顯示字符串 //void display(unsigned char *p){ while(*p!=39。\039。){ wr_dat(*p)。 p++。 delay1ms(1)。}}//// 有無(wú)乘客判斷 //void taxi() { if(KEY1==1) //顯示‘TAXI 有人’ { numpro(zhuanshu)。47 } else //顯示‘TAXI 空車’ { numpro1(zhuanshu)。 }}////防瞌睡模塊檢測(cè) // void nosleep() { INT8U j。 while(KEY3==1) { count0()。 taxi()。 for (j = 0。j 32。 j++) //32 次滾動(dòng){ Offset = j。 //從數(shù)據(jù)組中取點(diǎn)陣的偏移值 TR0 = 1。 //啟動(dòng)定時(shí)器,刷新顯示 delay_ms(50)。 //延時(shí) 50ms,在此時(shí)間范圍內(nèi)由定時(shí)器中斷顯示信息,調(diào)節(jié)延時(shí)參數(shù)可以改變滾動(dòng)速度 TR0 = 0。}BAOJ=0。count0()。 taxi()。 for (j = 0。j 32。 j++) //32 次滾動(dòng){48 Offset = j。 //從數(shù)據(jù)組中取點(diǎn)陣的偏移值 TR0 = 1。
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1