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

📄 main.lst

📁 12864程序51单片机控制12864液晶(程序+仿真电路)
💻 LST
📖 第 1 页 / 共 3 页
字号:
 401   1                              {
 402   2                              GLCD_CS1=0;
 403   2                              GLCD_CS2=1;
 404   2                              show_pattern(gy,gx-64,p,8);
 405   2                              show_pattern(gy,gx-56,p+8,8);
 406   2      
 407   2                              show_pattern(gy+1,gx-64,p+16,8);
 408   2                              show_pattern(gy+1,gx-56,p+24,8);
 409   2                              }
 410   1              gx=gx+16;
 411   1      }
 412          void display_GLCD_string(unsigned char *p,int len)
 413          {
 414   1               int i;
 415   1                      for(i=0;i<len;i++)
 416   1                      display_GLCD_data((p+32*i));
 417   1      }
 418          
 419          void display_GLCD_numberAB(char number)
 420          {
 421   1              int x,y;
 422   1              x=number/10;
 423   1              y=number%10;
 424   1              display_GLCD_data(digit[x]);
*** WARNING C182 IN LINE 424 OF MAIN.C: pointer to different objects
 425   1              display_GLCD_data(digit[y]);
C51 COMPILER V8.05a   MAIN                                                                 12/06/2007 17:11:28 PAGE 8   

*** WARNING C182 IN LINE 425 OF MAIN.C: pointer to different objects
 426   1      }
 427          
 428          void display_GLCD_numberB(char number)
 429          {
 430   1               unsigned int x,y,z,j;          
 431   1              x=(number/1000)%10;
 432   1              y=(number/100)%10;
 433   1                      z=(number/10)%10;
 434   1                      j=number%10;
 435   1              display_GLCD_data(digit[x]);
*** WARNING C182 IN LINE 435 OF MAIN.C: pointer to different objects
 436   1              display_GLCD_data(digit[y]);
*** WARNING C182 IN LINE 436 OF MAIN.C: pointer to different objects
 437   1                      display_GLCD_data(digit[z]);
*** WARNING C182 IN LINE 437 OF MAIN.C: pointer to different objects
 438   1              display_GLCD_data(digit[j]);
*** WARNING C182 IN LINE 438 OF MAIN.C: pointer to different objects
 439   1      }
 440          
 441          void gotoxy(unsigned x,unsigned y)
 442          {
 443   1              gy=y;
 444   1              gx=x;
 445   1      }
 446          
 447          void display_time(time dispaly_time)
 448          {
 449   1              gotoxy(0,4);
 450   1              display_GLCD_numberAB(dispaly_time.hour);
 451   1              display_GLCD_data(comma);
*** WARNING C182 IN LINE 451 OF MAIN.C: pointer to different objects
 452   1              display_GLCD_numberAB(dispaly_time.minute);
 453   1              display_GLCD_data(comma);
*** WARNING C182 IN LINE 453 OF MAIN.C: pointer to different objects
 454   1              display_GLCD_numberAB(dispaly_time.second);
 455   1      }
 456          
 457          void display_time1(int F)
 458          {
 459   1              gotoxy(48,6);        
 460   1              display_GLCD_numberB(F);  
 461   1      }
 462          
 463          
 464          void initTimer (void)
 465          {
 466   1              timer0_tick=0;
 467   1              EA=0; 
 468   1              TMOD=0x11;
 469   1              TH0=-9460/256;
 470   1              TL0=-9460%256;         //初始化计数器初值
 471   1      
 472   1              PT0=1;
 473   1              TR0=1;
 474   1              ET0=1;
 475   1              
 476   1          EA =1;
 477   1      }
 478          
 479          void timer0 (void) interrupt 1
 480          {        
C51 COMPILER V8.05a   MAIN                                                                 12/06/2007 17:11:28 PAGE 9   

 481   1              TR0=0;
 482   1          TH0=-9460/256;
 483   1              TL0=-9460%256;         //初始化计数器初值       
 484   1          TR0=1;
 485   1          timer0_tick++;
 486   1              if (timer0_tick==100)
 487   1         {
 488   2              timer0_tick=0;
 489   2                      /***********************************************************/                    
 490   2                      if(now.second==0)
 491   2                              {
 492   3                                              now.second=59;            
 493   3                              if (now.minute==0) 
 494   3                                      { 
 495   4                                              now.minute=59;                  
 496   4                                                              if (now.hour==0)
 497   4                                                      {
 498   5                                                                              now.hour = 24;
 499   5                                                                      now.minute =00;
 500   5                                                                      now.second =00;                                                                          
 501   5                                                      }else now.hour--;
 502   4                                      }else now.minute--;               
 503   3                              }else  now.second--;                            
 504   2                      
 505   2                      if(Aminute==10000)Aminute=0;
 506   2                              else Aminute++; 
 507   2                        
 508   2        }             
 509   1      }
 510          
 511          
 512          /******************************************************************/ 
 513          /***********************主程序*************************************/
 514          /******************************************************************/
 515          void MAIN (void)
 516          { 
 517   1      
 518   1              unsigned int i,j;               
 519   1              initFlag ();                                                    //端口初始化
 520   1              clear_GLCD();                                                   //清屏
 521   1                   gotoxy(0,0);
 522   1                       display_GLCD_string(QINGPIN,8); 
*** WARNING C182 IN LINE 522 OF MAIN.C: pointer to different objects
 523   1                       gotoxy(0,2);
 524   1                       display_GLCD_string(QINGPIN,8); 
*** WARNING C182 IN LINE 524 OF MAIN.C: pointer to different objects
 525   1                       gotoxy(0,4);
 526   1                       display_GLCD_string(QINGPIN,8); 
*** WARNING C182 IN LINE 526 OF MAIN.C: pointer to different objects
 527   1                       gotoxy(0,6);
 528   1                       display_GLCD_string(QINGPIN,8);                                                
*** WARNING C182 IN LINE 528 OF MAIN.C: pointer to different objects
 529   1      
 530   1                      gotoxy(32,0);                                           //设光标
 531   1              display_GLCD_string(HUANYIN,4);         //显示"欢迎使用"字符串
*** WARNING C182 IN LINE 531 OF MAIN.C: pointer to different objects
 532   1              gotoxy(16,2);                                           //设光标
 533   1              display_GLCD_string(HENFENG,6);         //显示"控制系统"字符串
*** WARNING C182 IN LINE 533 OF MAIN.C: pointer to different objects
 534   1              gotoxy(0,4);                                            //设光标
 535   1              display_GLCD_string(CHUSHI,8);          //显示"初始化"字符串 
*** WARNING C182 IN LINE 535 OF MAIN.C: pointer to different objects
C51 COMPILER V8.05a   MAIN                                                                 12/06/2007 17:11:28 PAGE 10  

 536   1                          
 537   1                      for (i=0;i<1000;i++)                            //延时
 538   1                      for(j=0;j<200;j++);                              
 539   1                      initTimer();                                            //开中断
 540   1              while(1)                                        
 541   1                      {                                       
 542   2                                                                      gotoxy(0,0);                                                    //设光标
 543   2                                                              display_GLCD_string(CHUWU,4);               //显示"严重错误"字符串
*** WARNING C182 IN LINE 543 OF MAIN.C: pointer to different objects
 544   2                                                                      gotoxy(64,0);
 545   2                                                                      display_GLCD_string(XIA,4);
*** WARNING C182 IN LINE 545 OF MAIN.C: pointer to different objects
 546   2              
 547   2                                                                      gotoxy(0,2);                                                    //设光标
 548   2                                                              display_GLCD_string(GUOLI,4);                   //显示"过滤时间"字符串
*** WARNING C182 IN LINE 548 OF MAIN.C: pointer to different objects
 549   2                                                                      gotoxy(64,2);
 550   2                                                              display_GLCD_numberAB(ABCD);                    //显示00数字 
 551   2                                                                      gotoxy(96,2);                                                   //设光标
 552   2                                                              display_GLCD_string(XIAOSHI,2);                 //显示"小时"字符串
*** WARNING C182 IN LINE 552 OF MAIN.C: pointer to different objects
 553   2      
 554   2                                                                      display_time(now);                                              //显示到计时时间
 555   2                                                                              
 556   2                                                              gotoxy(0,6);                                                    //设光标
 557   2                                                      display_GLCD_string(QINGXIE,2);                 //显示"清洗:"字符串 
*** WARNING C182 IN LINE 557 OF MAIN.C: pointer to different objects
 558   2                                                                      display_GLCD_string(comma,1);                   //显示":"字符串                                  
*** WARNING C182 IN LINE 558 OF MAIN.C: pointer to different objects
 559   2                                                                      display_time1(Aminute);                         // 显示电机运行时间
 560   2                                                                      gotoxy(112,6);                                                  //设光标
 561   2                                                      display_GLCD_string(MIAO,1);                    //显示"秒"字符串
*** WARNING C182 IN LINE 561 OF MAIN.C: pointer to different objects
 562   2                      }                                                                                                                                 
 563   1      }  
 564          /*********************************************************************/
 565          /*******************END MAIN******************************************/
 566          /*********************************************************************/


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   1186    ----
   CONSTANT SIZE    =   3648    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =     24      27
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  22 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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