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

📄 timer.lst

📁 This Program Cotains Eeprom Read-write functions, 4 Bit LCD interface routines, Keyboard Interface w
💻 LST
📖 第 1 页 / 共 3 页
字号:
 298   3                                                              off_time_rl3=off_time1_rl3+(10*off_time2_rl3)+(100*off_time3_rl3);
 299   3                                                              ee_byte_to_ee(0x53,off_time1_rl3);      delay(10);
 300   3                                                              ee_byte_to_ee(0x63,off_time2_rl3);      delay(10);
 301   3                                                              ee_byte_to_ee(0x73,off_time3_rl3);delay(10);
 302   3                                                              write_LCD_byte(LCD_CONTROL,0x0C);       
 303   3                                                              screen_no=0;
C51 COMPILER V7.50   TIMER                                                                 03/30/2006 19:28:31 PAGE 6   

 304   3                                                              char_sel=0;
 305   3                                                              write_LCD_line(LINE_1+2,"WELCOME TO");
 306   3                                                              write_LCD_line(LINE_2+4,"ALLIED ENGG.");
 307   3                                                      }
 308   2                                                      if(screen_no!=0)
 309   2                                                      {
 310   3                                                              display_count (ccc3,ccc2,ccc1);
 311   3                                                      }
 312   2                                                      break;
 313   2                              case 0xbf :                     //      SHIFT key
 314   2                                                      
 315   2                                                      if(screen_no!=0)
 316   2                                                      {
 317   3                                                              switch(char_sel)
 318   3                                                              {
 319   4                                                                      case 1: char_sel=2;     break;
 320   4                                                                      case 2: char_sel=3;     break;
 321   4                                                                      case 3: char_sel=1;     break;  
 322   4                                                                      default:char_sel=1; break;
 323   4                                                              }
 324   3                                                      display_count (ccc3,ccc2,ccc1); 
 325   3                                                      }
 326   2                                                      break;
 327   2                              case 0xdf :                     //      INC key
 328   2                                                      if(screen_no!=0)
 329   2                                                      {
 330   3                                                              if(char_sel==3)
 331   3                                                              {
 332   4                                                                      ccc3++;
 333   4                                                                      if(ccc3==10)
 334   4                                                                              ccc3=0;
 335   4                                                      }
 336   3                                                              if(char_sel==2)
 337   3                                                              {
 338   4                                                                      ccc2++;
 339   4                                                                      if(ccc2==10)
 340   4                                                                              ccc2=0;
 341   4                                                      }
 342   3                                                              if(char_sel==1)
 343   3                                                              {
 344   4                                                                      ccc1++;
 345   4                                                                      if(ccc1==10)
 346   4                                                                              ccc1=0;
 347   4                                                                      if(ccc3==0 & ccc2==0 & ccc1==0)
 348   4                                                                              ccc1=1;
 349   4                                                              }
 350   3                                                      display_count (ccc3,ccc2,ccc1);
 351   3                                                      }
 352   2                                                      break;
 353   2                              case 0xef :                     //      RESET key
 354   2                                                      
 355   2                                                      if(screen_no==1)        //      Enter on time
 356   2                                                      {       
 357   3                                                              ee_byte_from_ee(0x0b,&on_time1_rl1);delay(10);
 358   3                                                              ee_byte_from_ee(0x1b,&on_time2_rl1);delay(10);
 359   3                                                              ee_byte_from_ee(0x2b,&on_time3_rl1);delay(10);
 360   3                                                              ccc1=on_time1_rl1;
 361   3                                                              ccc2=on_time2_rl1;
 362   3                                                              ccc3=on_time3_rl1;
 363   3                                                      }
 364   2                                                      else if(screen_no==2)   //      Enter Relay Off Time
 365   2                                                      {       
C51 COMPILER V7.50   TIMER                                                                 03/30/2006 19:28:31 PAGE 7   

 366   3                                                              ee_byte_from_ee(0x4b,&on_time1_rl2);delay(10);
 367   3                                                              ee_byte_from_ee(0x5b,&on_time2_rl2);delay(10);
 368   3                                                              ee_byte_from_ee(0x6b,&on_time3_rl2);delay(10);
 369   3                                                              ccc1=on_time1_rl2;
 370   3                                                              ccc2=on_time2_rl2;
 371   3                                                              ccc3=on_time3_rl2;
 372   3                                                      }
 373   2                                                      else if(screen_no==3)   //      Enter no. of channels
 374   2                                                      {       
 375   3                                                              ee_byte_from_ee(0x7b,&on_time1_rl3);delay(10);
 376   3                                                              ee_byte_from_ee(0x8b,&on_time2_rl3);delay(10);
 377   3                                                              ee_byte_from_ee(0x9b,&on_time3_rl3);delay(10);
 378   3                                                              ccc1=on_time1_rl3;
 379   3                                                              ccc2=on_time2_rl3;
 380   3                                                              ccc3=on_time3_rl3;                                                      
 381   3                                                      }
 382   2                                                      else if(screen_no==4)   //      Enter no. of channels
 383   2                                                      {       
 384   3                                                              ee_byte_from_ee(0xab,&off_time1_rl1);delay(10);
 385   3                                                              ee_byte_from_ee(0xbb,&off_time2_rl1);delay(10);
 386   3                                                              ee_byte_from_ee(0xcb,&off_time3_rl1);delay(10);
 387   3                                                              ccc1=off_time1_rl1;
 388   3                                                              ccc2=off_time2_rl1;
 389   3                                                              ccc3=off_time3_rl1;
 390   3                                                      }
 391   2                                                      else if(screen_no==5)   //      Enter no. of channels
 392   2                                                      {       
 393   3                                                              ee_byte_from_ee(0xdb,&off_time1_rl2);delay(10);
 394   3                                                              ee_byte_from_ee(0xeb,&off_time2_rl2);delay(10);
 395   3                                                              ee_byte_from_ee(0x43,&off_time3_rl2);delay(10);
 396   3                                                              ccc1=off_time1_rl2;
 397   3                                                              ccc2=off_time2_rl2;
 398   3                                                              ccc3=off_time3_rl2;
 399   3                                                      }
 400   2                                                      else if(screen_no==6)   //      Enter no. of channels
 401   2                                                      {       
 402   3                                                              ee_byte_from_ee(0x53,&off_time1_rl3);delay(10);
 403   3                                                              ee_byte_from_ee(0x63,&off_time2_rl3);delay(10);
 404   3                                                              ee_byte_from_ee(0x73,&off_time3_rl3);delay(10);
 405   3                                                              ccc1=off_time1_rl1;
 406   3                                                              ccc2=off_time2_rl1;
 407   3                                                              ccc3=off_time3_rl1;
 408   3                                                      }
 409   2                                                      if(screen_no!=0)
 410   2                                                      display_count (ccc3,ccc2,ccc1);
 411   2                                                      break;
 412   2                              default :   break;
 413   2                      }
 414   1      }
 415          init_timer1_isr() interrupt 3
 416          {
 417   1              TL1=0x2f;
 418   1              TH1=0xf8;
 419   1              temp_time++;
 420   1              if(temp_time>=5)
 421   1              {       
 422   2                      if(in_1_on_flag==1 & relay1==1)t_i1_on++;
 423   2                      if(in_1_off_flag==1)t_i1_off++;
 424   2                      if(in_2_on_flag==1 & relay2==1)t_i2_on++;
 425   2                      if(in_2_off_flag==1)t_i2_off++;
 426   2                      if(in_3_on_flag==1 & relay3==1)t_i3_on++;
 427   2                      if(in_3_off_flag==1)t_i3_off++;
C51 COMPILER V7.50   TIMER                                                                 03/30/2006 19:28:31 PAGE 8   

 428   2                      temp_time=0;
 429   2              }
 430   1              TF1=0;
 431   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   3207    ----
   CONSTANT SIZE    =    122    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =     56      17
   IDATA SIZE       =   ----    ----
   BIT SIZE         =      6       2
END OF MODULE INFORMATION.


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

⌨️ 快捷键说明

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