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

📄 ctl_muen_240128.lst

📁 液晶MGLS2401128TA的控制程序
💻 LST
📖 第 1 页 / 共 2 页
字号:
 243   2      show_pixel(jj,ii,mode);
 244   2      
 245   2      }
 246   1      }
 247          //----------the function is -----------//
 248          void draw_empty_Square(unsigned char x1,unsigned char y1,unsigned char x2,unsigned char y2,bit mode)
 249          {
 250   1      show_line(x1,y1,x2,y1,mode);
 251   1      show_line(x2,y1,x2,y2,mode);
 252   1      show_line(x1,y2,x2,y2,mode);
 253   1      show_line(x1,y1,x1,y2,mode);
 254   1      }
 255          //-----------draw the ascii anti----//
 256          void ASCII_Anti(unsigned char x,unsigned char y)
 257          {
 258   1      unsigned char temp;
 259   1      unsigned int startaddr;
 260   1      unsigned char ii;
 261   1      startaddr=y*30+x;
 262   1      for(ii=0;ii<16;ii++)
 263   1      {
 264   2      write_2_code((unsigned char)(startaddr),(unsigned char)(startaddr>>8),0x24);
 265   2      
 266   2      write_code(0xc5);
 267   2      temp=read_from();
 268   2      temp=~temp;
 269   2      write_1_code(temp,0xc0);
 270   2      
 271   2      startaddr+=30;
 272   2      }
 273   1      }
 274          
 275          //---------the function is chang the chinese to anti----------//
 276          void chinese_anti(unsigned char x,unsigned char y)
 277          {
 278   1      ASCII_Anti(x,y);
 279   1      ASCII_Anti(x+1,y);
 280   1      }
 281          
 282          
 283          void login(void)
 284          {
 285   1      unsigned char ii;
 286   1      unsigned char x1;
 287   1      delay(100);
 288   1      delay(100);
 289   1      lcm_start();
 290   1      cls_lcm();
 291   1      draw_empty_Square(40,10,200,30,1);
 292   1      draw_empty_Square(45,30,195,100,1);
 293   1      draw_empty_Square(53,60,187,75,1);
 294   1      chinese_show(11,12,1,0);
 295   1      chinese_show(17,12,1,1);
 296   1      x1=56;
 297   1      for(ii=0;ii<10;ii++)
 298   1      {
 299   2      delay(200);delay(200);delay(200);
 300   2      draw_fill_Square(x1,63,x1+11,73,1);
 301   2      x1+=13;
 302   2      delay(200);delay(200);delay(200);
 303   2      }
C51 COMPILER V7.08   CTL_MUEN_240128                                                       08/31/2005 02:48:49 PAGE 6   

 304   1      delay_1ms(500);
 305   1      cls_lcm();
 306   1      //-------show the start menu----------//
 307   1      draw_empty_Square(1,0,239,20,1);
 308   1      chinese_show(1,2,1,2);
 309   1      chinese_show(3,2,1,3);
 310   1      chinese_show(7,2,1,4);
 311   1      chinese_show(9,2,1,5);
 312   1      }
 313          
 314          
 315          //-----------text the function--------------------//
 316          void text(void)
 317          {
 318   1      TMOD=0X01;
 319   1      TH0=0X3C;
 320   1      TL0=0XB0;
 321   1      EA=1;
 322   1      ET0=1;
 323   1      
 324   1      id=0; 
 325   1      login();
 326   1      
 327   1       TR0=1;
 328   1      while(1)
 329   1      {
 330   2      switch(key)
 331   2      {
 332   3      
 333   3      case key_right:
 334   3      switch(id)
 335   3      {
 336   4      case 0:
 337   4      case 2:
 338   4      id=8;
 339   4      
 340   4      //---del id=0
 341   4      chinese_show(1,2,1,2);
 342   4      chinese_show(3,2,1,3);
 343   4      draw_fill_Square(0,22,52,104,0);
 344   4      //---biuld id=8
 345   4      chinese_show(7,2,0,4);
 346   4      chinese_show(9,2,0,5);
 347   4      draw_empty_Square(52,22,102,42,1);
 348   4      //-------creat the menu list
 349   4      chinese_show(menu_lis[9].x1,menu_lis[9].y1,1,menu_lis[9].chinese_id[0]);
 350   4      chinese_show(menu_lis[9].x2,menu_lis[9].y2,1,menu_lis[9].chinese_id[1]);
 351   4      break;
 352   4      
 353   4      case 8:
 354   4      
 355   4      
 356   4      //----del id=8
 357   4      chinese_show(7,2,1,4);
 358   4      chinese_show(9,2,1,5);
 359   4      draw_fill_Square(52,22,104,44,0);
 360   4      //----built  id =0
 361   4      chinese_show(1,2,0,2);
 362   4      chinese_show(3,2,0,3);
 363   4      draw_empty_Square(0,22,50,102,1);
 364   4      //----ceat the chinese
 365   4      chinese_show(menu_lis[1].x1,menu_lis[1].y1,1,menu_lis[1].chinese_id[0]);
C51 COMPILER V7.08   CTL_MUEN_240128                                                       08/31/2005 02:48:49 PAGE 7   

 366   4      chinese_show(menu_lis[1].x2,menu_lis[1].y2,1,menu_lis[1].chinese_id[1]);
 367   4      
 368   4      chinese_show(menu_lis[2].x1,menu_lis[2].y1,1,menu_lis[2].chinese_id[0]);
 369   4      chinese_show(menu_lis[2].x2,menu_lis[2].y2,1,menu_lis[2].chinese_id[1]);
 370   4      
 371   4      chinese_show(menu_lis[3].x1,menu_lis[3].y1,1,menu_lis[3].chinese_id[0]);
 372   4      chinese_show(menu_lis[3].x2,menu_lis[3].y2,1,menu_lis[3].chinese_id[1]);
 373   4      id=1;
 374   4      break;
 375   4      case 1:
 376   4      id=5;
 377   4      
 378   4      draw_empty_Square(52,22,102,63,1);
 379   4      //--- id =1
 380   4      chinese_show(menu_lis[1].x1,menu_lis[1].y1,1,menu_lis[1].chinese_id[0]);
 381   4      chinese_show(menu_lis[1].x2,menu_lis[1].y2,1,menu_lis[1].chinese_id[1]);
 382   4      //-------- id =4
 383   4      
 384   4      chinese_show(menu_lis[4].x1,menu_lis[4].y1,0,menu_lis[4].chinese_id[0]);
 385   4      chinese_show(menu_lis[4].x2,menu_lis[4].y2,0,menu_lis[4].chinese_id[1]);
 386   4      chinese_show(menu_lis[5].x1,menu_lis[5].y1,1,menu_lis[5].chinese_id[0]);
 387   4      chinese_show(menu_lis[5].x2,menu_lis[5].y2,1,menu_lis[5].chinese_id[1]);
 388   4      
 389   4      
 390   4      break;
 391   4      
 392   4      case 5:
 393   4      id=3;
 394   4      draw_empty_Square(104,42,155,63,1);
 395   4      //--- id =5
 396   4      chinese_show(menu_lis[5].x1,menu_lis[5].y1,1,menu_lis[5].chinese_id[0]);
 397   4      chinese_show(menu_lis[5].x2,menu_lis[5].y2,1,menu_lis[5].chinese_id[1]);
 398   4      //-------- id =7
 399   4      
 400   4      chinese_show(menu_lis[7].x1,menu_lis[7].y1,0,menu_lis[7].chinese_id[0]);
 401   4      chinese_show(menu_lis[7].x2,menu_lis[7].y2,0,menu_lis[7].chinese_id[1]);
 402   4      
 403   4      
 404   4      break;
 405   4      
 406   4      case 3:
 407   4      id=0;
 408   4      draw_empty_Square(52,65,102,85,1);
 409   4      //--- id =5
 410   4      chinese_show(menu_lis[3].x1,menu_lis[3].y1,1,menu_lis[3].chinese_id[0]);
 411   4      chinese_show(menu_lis[3].x2,menu_lis[3].y2,1,menu_lis[3].chinese_id[1]);
 412   4      //-------- id =7
 413   4      
 414   4      chinese_show(menu_lis[6].x1,menu_lis[6].y1,0,menu_lis[6].chinese_id[0]);
 415   4      chinese_show(menu_lis[6].x2,menu_lis[6].y2,0,menu_lis[6].chinese_id[1]);
 416   4      
 417   4      
 418   4      break;
 419   4      default :break;
 420   4      
 421   4      }
 422   3      
 423   3      
 424   3      break;
 425   3      
 426   3      case key_left:
 427   3      
C51 COMPILER V7.08   CTL_MUEN_240128                                                       08/31/2005 02:48:49 PAGE 8   

 428   3      break;
 429   3      case key_up:
 430   3      
 431   3      
 432   3      break;
 433   3      case key_down:
 434   3      
 435   3      
 436   3      break;
 437   3      
 438   3      
 439   3      /*case 0:
 440   3      chinese_show(7,2,1,4);
 441   3      chinese_show(9,2,1,5);
 442   3      draw_empty_Square(52,22,102,42,0);
 443   3      chinese_anti(1,2);
 444   3      chinese_anti(3,2);
 445   3      draw_empty_Square(0,22,50,102,1);
 446   3      
 447   3      break;
 448   3      
 449   3      case 1:
 450   3      chinese_show(1,2,1,2);
 451   3      chinese_show(3,2,1,3);
 452   3      draw_empty_Square(0,22,50,102,0);
 453   3      chinese_anti(7,2);
 454   3      chinese_anti(9,2);
 455   3      draw_empty_Square(52,22,102,42,1);
 456   3      
 457   3      
 458   3      break;
 459   3      */
 460   3      default :break;
 461   3      }
 462   2      
 463   2      }
 464   1      
 465   1      
 466   1      }
 467          
 468          void t0(void) interrupt 1 using 2
 469          {
 470   1      count_time++;
 471   1      if(count_time==15)
 472   1      {
 473   2      count_time=0;
 474   2      key++;
 475   2      if(key>10)key=0;
 476   2      }
 477   1      
 478   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   2435    ----
   CONSTANT SIZE    =    436    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =      4      60
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----       7
END OF MODULE INFORMATION.

C51 COMPILER V7.08   CTL_MUEN_240128                                                       08/31/2005 02:48:49 PAGE 9   


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

⌨️ 快捷键说明

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