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

📄 lcd_menu.lst

📁 改程序代码是运用Keil uVision3软件编写的C程序
💻 LST
📖 第 1 页 / 共 2 页
字号:
 270   3                         
 271   3                         Led_StartLine(cs);
 272   3                         Led_SetPage(page+k,cs);
 273   3                         Led_SetRow(row+16*j,cs);
 274   3                      for(i=0;i <16; i++) 
C51 COMPILER V7.06   LCD_MENU                                                              12/11/2008 13:27:44 PAGE 6   

 275   3                                 {  
 276   4                                    if(Click_Flag==0)
 277   4                          {Send_Data(CHINESE[2*j+k+8][i],cs);}
 278   4                        else
 279   4                                              {Send_Data(CHINESE[2*j+k+24][i],cs);}
 280   4                                    
 281   4                                 }
 282   3                              
 283   3              
 284   3                     
 285   3              }
 286   2      
 287   2      
 288   2       }
 289   1      
 290   1      }  
 291          /*********************************************************************
 292          /   数字判断:ClickNumber(uchar page,uchar row,uchar cs) (半角)       /
 293          /                                                                     /
 294          ********************************************************************/
 295          void ClickNumber(uchar j,bit YN)
 296          {
 297   1         uchar num;
 298   1         num = j;
 299   1      switch (num)
 300   1      {
 301   2        case 0:
 302   2          {
 303   3            if(YN==1)
 304   3              {
 305   4                InputCarNumber1(2,0,1,0);break;
 306   4              }
 307   3            else
 308   3              {
 309   4                InputCarNumber2(2,0,1,0);break;
 310   4              }
 311   3      
 312   3           }
 313   2        case 1:
 314   2              {
 315   3                if(YN==1)
 316   3                      {
 317   4                              InputCarNumber1(2,0,1,1);break; 
 318   4                      }
 319   3              else
 320   3                      {
 321   4                              InputCarNumber2(2,0,1,1);break;
 322   4                      }
 323   3      
 324   3      
 325   3          }
 326   2        case 2:
 327   2               {
 328   3                if(YN==1)
 329   3                      {
 330   4                              InputCarNumber1(2,0,1,2);break;
 331   4                   
 332   4                      }
 333   3              else
 334   3                      {
 335   4                              InputCarNumber2(2,0,1,2);break;
 336   4                      }
C51 COMPILER V7.06   LCD_MENU                                                              12/11/2008 13:27:44 PAGE 7   

 337   3      
 338   3      
 339   3      
 340   3               }
 341   2        case 3:
 342   2                      {
 343   3                if(YN==1)
 344   3                      {
 345   4                              InputCarNumber1(2,0,1,3);break;
 346   4                      }
 347   3              else
 348   3                      {
 349   4                              InputCarNumber2(2,0,1,3);break;
 350   4                      }
 351   3      
 352   3      
 353   3                      }
 354   2        case 4:
 355   2                      {
 356   3                if(YN==1)
 357   3                      {
 358   4                              InputCarNumber1(2,0,1,4);break;
 359   4                      }
 360   3              else
 361   3                      {
 362   4                              InputCarNumber2(2,0,1,4);break;
 363   4                      }
 364   3      
 365   3      
 366   3                      }
 367   2        case 5:
 368   2                      {
 369   3      
 370   3                if(YN==1)
 371   3                      {
 372   4                              InputCarNumber1(2,0,1,5);break;
 373   4                      }
 374   3              else
 375   3                      {
 376   4                              InputCarNumber2(2,0,1,5);break;
 377   4                      }
 378   3      
 379   3                      }
 380   2        case 6:
 381   2                      {
 382   3      
 383   3                        if(YN==1)
 384   3                      {
 385   4                              InputCarNumber1(2,0,1,6);break;
 386   4                      }
 387   3              else
 388   3                      {
 389   4                              InputCarNumber2(2,0,1,6);break;
 390   4                      }
 391   3      
 392   3                      }
 393   2        case 7:
 394   2                      {
 395   3      
 396   3                        if(YN==1)
 397   3                      {
 398   4                              InputCarNumber1(2,0,1,7);break;
C51 COMPILER V7.06   LCD_MENU                                                              12/11/2008 13:27:44 PAGE 8   

 399   4                      }
 400   3              else
 401   3                      {
 402   4                              InputCarNumber2(2,0,1,7);break;
 403   4                      }
 404   3      
 405   3                 }
 406   2        case 8:
 407   2                      {
 408   3      
 409   3                        if(YN==1)
 410   3                      {
 411   4                              InputCarNumber1(2,0,1,8);break;
 412   4                      }
 413   3              else
 414   3                      {
 415   4                              InputCarNumber2(2,0,1,8);break;
 416   4                      }
 417   3      
 418   3                  }
 419   2        case 9:
 420   2                      {
 421   3      
 422   3                        if(YN==1)
 423   3                      {
 424   4                              InputCarNumber1(2,0,1,9);break;
 425   4                      }
 426   3              else
 427   3                      {
 428   4                              InputCarNumber2(2,0,1,9);break;
 429   4                      }
 430   3      
 431   3                  }
 432   2       
 433   2      
 434   2      }
 435   1      
 436   1      }
 437          /*************************************************************
 438          /   选择过程画面:Piture_1/2(bit MQ)                        /
 439          /           0:画面2,1:画面1                                 /
 440          /*************************************************************/
 441          void Piture_1(bit MQ ) 
 442          {
 443   1        delay_20ms();
 444   1      if(MQ==1)
 445   1                {
 446   2                 Chinese(0,0,1,1);
 447   2                }
 448   1      else 
 449   1                {
 450   2             Chinese(0,0,1,0);
 451   2                 }
 452   1        Number(2,0,1);
 453   1        SureKey(6,16,1,1);
 454   1        BlackInput(6,16,2,1);
 455   1        
 456   1      
 457   1      }
 458          /////////////////////////////////////////////
 459          
 460          /*************************************************************
C51 COMPILER V7.06   LCD_MENU                                                              12/11/2008 13:27:44 PAGE 9   

 461          /   图片显示:void Start_Piture(void)                        /
 462          /                                                             /
 463          /*************************************************************/
 464          void Start_Piture(uchar page,uchar row,uchar cs,bit Pture_Flag) 
 465          {
 466   1        uchar *p=&piture1[0];
 467   1        uchar *q=&piture2[0];
 468   1        uchar j,i;
 469   1        
 470   1        Led_Open(cs);
 471   1        
 472   1      for(j=0;j<8;j++)
 473   1              { cs = 1;
 474   2            Led_StartLine(cs);
 475   2            Led_SetPage(page+j,cs);
 476   2            Led_SetRow(row,cs);
 477   2              for(i=0;i<64;i++)
 478   2                 {
 479   3              if(Pture_Flag==0)
 480   3                              {
 481   4                          Send_Data(~*(p++),cs);
 482   4                              }
 483   3              else
 484   3                              {
 485   4                          Send_Data(*(q++),cs);
 486   4                              }
 487   3                 }
 488   2      
 489   2          cs = 2;
 490   2          Led_Open(cs);
 491   2          Led_StartLine(cs);
 492   2          Led_SetPage(page+j,cs);
 493   2          Led_SetRow(row,cs);
 494   2              
 495   2          for(i=0;i<64;i++)
 496   2                 {
 497   3                   if(Pture_Flag==0)
 498   3                              {
 499   4                          Send_Data(~*(p++),cs);
 500   4                              }
 501   3              else
 502   3                              {
 503   4                          Send_Data(*(q++),cs);
 504   4                              }
 505   3                 }
 506   2      
 507   2      
 508   2       
 509   2      
 510   2          }
 511   1      
 512   1      
 513   1      
 514   1      }
 515          /*************************************************************
 516          /   延时10ms:delay_20ms(void)                                /
 517          /                                                             /
 518          /*************************************************************/
 519          void  delay_20ms(void)
 520          {
 521   1       uchar i,j;
 522   1       for(i = 0;i < 200 ;i++) 
C51 COMPILER V7.06   LCD_MENU                                                              12/11/2008 13:27:44 PAGE 10  

 523   1         {
 524   2             for( j = 0;j < 100; j++ );
 525   2             
 526   2         }
 527   1      
 528   1      }
 529          
 530          
 531          void main(void)
 532          {     
 533   1         
 534   1         
 535   1             delay_20ms();
 536   1             delay_20ms();
 537   1             Clear_12864(2);
 538   1             Clear_12864(1);
 539   1             
 540   1      /*     Chinese(0,0,1,0);
 541   1             Number(2,0,1);
 542   1             InputCarNumber1(2,0,1,5);
 543   1             InputCarNumber2(2,0,1,2);
 544   1             SureKey(6,16,1,1);
 545   1             BlackInput(6,16,2,0);
 546   1             ClickNumber(9,1);
 547   1             ClickNumber(9,0);
 548   1            // InputCarNumber1(2,0,1,7);
 549   1            // InputCarNumber2(2,0,1,8);*/
 550   1      
 551   1            Start_Piture(0,0,1,1);
 552   1      
 553   1            while(1){} ;
 554   1      
 555   1        
 556   1      
 557   1           
 558   1      
 559   1      }         
 560                   
 561                 
 562          
 563          
 564          
 565          
 566          
 567           
 568          
 569          
 570          
 571          

C51 COMPILATION COMPLETE.  1 WARNING(S),  28 ERROR(S)

⌨️ 快捷键说明

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