⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 yanjing12864new.lst

📁 LCD应用系统程序
💻 LST
📖 第 1 页 / 共 4 页
字号:
 281   2        shu=xzi[i+4*c];
 282   2        xieshuju(csl,csr);
 283   2        lie++;
 284   2        }
 285   1        }
 286          
 287          void tuxing(uchar a,uint b,uint c)
 288           {
 289   1        ad=(tp[0]*100*5+tp[1]*10*5+tp[2]*5+tp[3]/2)-125;
 290   1      
 291   1                if(ad<=7)  ye=0xbf,shu=(0x80>>ad);
 292   1           else if(ad<=15) ye=0xbe,shu=(0x80>>(ad-8));
 293   1               else if(ad<=23) ye=0xbd,shu=(0x80>>(ad-16));
 294   1           else if(ad<=31) ye=0xbc,shu=(0x80>>(ad-24));
 295   1           else if(ad<=39) ye=0xbb,shu=(0x80>>(ad-32));
 296   1               else if(ad<=47) ye=0xba,shu=(0x80>>(ad-40));
 297   1               else if(ad<=55) ye=0xb9,shu=(0x80>>(ad-48));
 298   1               else if(ad<=63) ye=0xb8,shu=(0x80>>(ad-56));
 299   1                if(lie==a)
 300   1              {
 301   2              d1=shu;
 302   2              d2=ye;
 303   2              }
C51 COMPILER V7.06   YANJING12864NEW                                                       06/10/2008 11:06:13 PAGE 6   

 304   1              if(lie!=a)
 305   1              {
 306   2               d3=shu;
 307   2               d4=ye;
 308   2               if(ye==d2)
 309   2               {
 310   3                if(shu>d1)
 311   3               {
 312   4               d5=shu;
 313   4               d5=d5>>1;
 314   4               while(d5!=d1)
 315   4               {d5=d5>>1;
 316   5               shu=shu|(shu>>1);}
 317   4               }
 318   3               if(shu<d1)
 319   3               {
 320   4               d5=shu;
 321   4               d5=d5<<1;
 322   4               while(d5!=d1)
 323   4               {d5=d5<<1;shu=shu|(shu<<1);} 
 324   4               }
 325   3              }
 326   2       
 327   2          if(ye<d2)
 328   2               {
 329   3                   for(q=0;q<7;q++) 
 330   3                   {
 331   4                        shu=shu|(shu<<1);
 332   4                        } 
 333   3                        xieshuju(b,c);
 334   3                        ye++;
 335   3                        while(ye<d2) {shu=0xff,xieshuju(b,c),ye++;}
 336   3                        if(ye==d2){
 337   4                                    shu=0x01;
 338   4                                                if(shu<d1)
 339   4                              {
 340   5                               d5=shu;
 341   5                               d5=d5<<1;
 342   5                               while(d5!=d1)
 343   5                               {d5=d5<<1;shu=shu|(shu<<1);} 
 344   5                                }
 345   4                                                }
 346   3             }
 347   2                if(ye>d2)
 348   2               {
 349   3                   for(q=0;q<7;q++) 
 350   3                      {
 351   4                            shu=shu|(shu>>1);
 352   4                           }
 353   3                        xieshuju(b,c);
 354   3                        ye--;
 355   3                        while(ye>d2) {shu=0xff,xieshuju(b,c),ye--;}
 356   3                        if(ye==d2){
 357   4                                    shu=0x80;
 358   4                                                if(shu>d1)
 359   4                                 {
 360   5                               d5=shu;
 361   5                               d5=d5>>1;
 362   5                               while(d5!=d1)
 363   5                               {d5=d5>>1;shu=shu|(shu>>1);} 
 364   5                                  }
 365   4                                               } 
C51 COMPILER V7.06   YANJING12864NEW                                                       06/10/2008 11:06:13 PAGE 7   

 366   3            }
 367   2                }
 368   1              if(lie!=a)
 369   1              {
 370   2               d1=d3;
 371   2               d2=d4;
 372   2               }
 373   1      xieshuju(b,c);
 374   1      delay(200);
 375   1        }
 376          
 377          /*****主函数****/
 378          void main()
 379          
 380          {   bit k1;
 381   1          uchar *ds18b20_rom;
 382   1              uchar k,yy,ll,k2;
 383   1          uint a=2,d=1,i,j,b,jisuan;
 384   1          lcd_init();
 385   1          delay(300);
 386   1      /*while(1)
 387   1      {
 388   1      
 389   1      
 390   1      P2=0x00;
 391   1      while(1);
 392   1      delay(300);
 393   1       }*/
 394   1      r=0xbb;
 395   1      goto abc;
 396   1      goto bbb;
 397   1      aaa:
 398   1           while(sure==0)
 399   1              {
 400   2               if(a==1) goto wendu1;
 401   2               if(a==2) goto donghua;
 402   2               if(a==3) goto shige;
 403   2               if(a==4) goto set;
 404   2               } 
 405   1       eee:
 406   1          r=0xb7;
 407   1          r=0xbb;
 408   1          while(xiayi==1)
 409   1          {
 410   2           goto aaa;
 411   2           }
 412   1          qinglin();
 413   1          while(xiayi==0);
 414   1           a++;
 415   1        if(a==5) a=1;
 416   1        if(a==1) goto bbb;
 417   1        if(a==2) goto ccc;
 418   1        if(a==3) goto fff;
 419   1        if(a==4) goto mmm;
 420   1           
 421   1       bbb:
 422   1          r=0xb7;
 423   1              while(r!=0xbb)
 424   1              {  
 425   2        qinglin();
 426   2        r++; 
 427   2      abc: 
C51 COMPILER V7.06   YANJING12864NEW                                                       06/10/2008 11:06:13 PAGE 8   

 428   2        caidanhanshu(13);
 429   2        delay(100);
 430   2        }
 431   1       goto aaa;
 432   1      
 433   1       ccc:
 434   1          r=0xb7;
 435   1              while(r!=0xbb)
 436   1              {  
 437   2        qinglin();
 438   2        r++; 
 439   2        caidanhanshu(21);
 440   2        delay(100);
 441   2        } 
 442   1        goto aaa;
 443   1      
 444   1      
 445   1      fff:
 446   1        r=0xb7;
 447   1        while(r!=0xbb)
 448   1       {  
 449   2        qinglin();
 450   2        r++; 
 451   2        caidanhanshu(39);
 452   2        delay(100);
 453   2        } 
 454   1        goto aaa; 
 455   1      
 456   1      mmm:
 457   1        r=0xb7;
 458   1        while(r!=0xbb)
 459   1       {  
 460   2        qinglin();
 461   2        r++; 
 462   2        xianshi(r,0x60,13,1,0); 
 463   2        xianshi(r,0x68,14,1,0); 
 464   2        xianshi(r,0x70,15,1,0); 
 465   2        xianshi(r,0x78,16,1,0); 
 466   2        xianshi(r,0x40,11,0,1);
 467   2        xianshi(r,0x48,12,0,1); 
 468   2        xianshi(r,0x50,96,0,1); 
 469   2        xianshi(r,0x58,97,0,1); 
 470   2        delay(100);
 471   2        } 
 472   1        goto aaa; 
 473   1      
 474   1      donghua:
 475   1       qingpin();
 476   1       xianshi(0xb9,0x58,21,0,1);
 477   1       xianshi(0xb9,0x60,22,0,1);
 478   1       xianshi(0xbc,0x58,23,0,1);
 479   1       xianshi(0xbc,0x60,24,0,1);
 480   1       for(j=0;j<=1;j++)
 481   1       {
 482   2        i=0;
 483   2       for(lie=0x55;lie<=0x78;lie++)
 484   2        {
 485   3          for(ye=0xb9;ye<=0xbf;ye++)
 486   3          {
 487   4              
 488   4               if(j==0) shu=tu1[i];
 489   4               if(j==1) shu=tu2[i];
C51 COMPILER V7.06   YANJING12864NEW                                                       06/10/2008 11:06:13 PAGE 9   

 490   4               xieshuju(1,0);
 491   4               i++;
 492   4               }
 493   3         }     
 494   2         if(fanhui==0) goto hhh;
 495   2         delay(300);
 496   2         if(fanhui==0) goto hhh;
 497   2         }
 498   1       goto donghua;
 499   1      hhh:
 500   1         qingpin();
 501   1         goto ccc;
 502   1      wendu1:
 503   1         qingpin();
 504   1         goto bb;
 505   1      /*   r=0xb7;
 506   1              while(r!=0xbb)
 507   1              {  
 508   1        qinglin();
 509   1        r++; 
 510   1        xianshi(r,0x60,98,1,0); 
 511   1        xianshi(r,0x68,99,1,0); 
 512   1        xianshi(r,0x70,100,1,0); 
 513   1        xianshi(r,0x78,101,1,0); 
 514   1        xianshi(r,0x40,13,0,1);
 515   1        xianshi(r,0x48,14,0,1); 
 516   1        xianshi(r,0x50,15,0,1); 
 517   1        xianshi(r,0x58,16,0,1); 
 518   1        delay(100);
 519   1        }*/
 520   1      wendu:   
 521   1          if(fanhui==0)  {qingpin();goto bbb;}
 522   1          while(sure==0)
 523   1              {
 524   2               if(d==1) goto badianweudu;
 525   2               if(d==2) goto tuxingxianshi;
 526   2               } 
 527   1      ee:
 528   1          r=0xb7;
 529   1          r=0xbb;
 530   1          while(xiayi==1)
 531   1          {
 532   2           goto wendu;
 533   2           }
 534   1          qinglin();
 535   1          while(xiayi==0);
 536   1           d++;
 537   1        if(d==3) d=1;
 538   1        if(d==1) goto bb;
 539   1        if(d==2) goto cc;
 540   1      bb:
 541   1          r=0xb7;
 542   1        while(r!=0xbb)
 543   1       {  
 544   2        qinglin();
 545   2        r++; 
 546   2        xianshi(r,0x60,98,1,0); 
 547   2        xianshi(r,0x68,99,1,0); 
 548   2        xianshi(r,0x70,100,1,0); 
 549   2        xianshi(r,0x78,101,1,0); 
 550   2        xianshi(r,0x40,13,0,1);
 551   2        xianshi(r,0x48,14,0,1); 
C51 COMPILER V7.06   YANJING12864NEW                                                       06/10/2008 11:06:13 PAGE 10  

 552   2        xianshi(r,0x50,15,0,1); 
 553   2        xianshi(r,0x58,16,0,1); 
 554   2        delay(100);
 555   2        } 
 556   1       goto wendu;
 557   1      
 558   1       cc:
 559   1             r=0xb7;
 560   1        while(r!=0xbb)
 561   1       {  
 562   2        qinglin();
 563   2        r++; 
 564   2        xianshi(r,0x60,31,1,0); 
 565   2        xianshi(r,0x68,32,1,0); 
 566   2        xianshi(r,0x70,102,1,0); 
 567   2        xianshi(r,0x78,103,1,0); 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -