C51 COMPILER V9.54   MAIN                                                                  12/03/2024 15:15:45 PAGE 1   


C51 COMPILER V9.54, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN .\Objects\main.obj
COMPILER INVOKED BY: C:\Keil_v5\C51\BIN\C51.EXE main.c OPTIMIZE(8,SPEED) BROWSE INCDIR(.\public) DEBUG OBJECTEXTEND PRIN
                    -T(.\Listings\main.lst) OBJECT(.\Objects\main.obj)

line level    source

   1          #include "main.h"
   2          #include "key.h"
   3          
   4          extern uint8_t KEY;
   5          extern uint8_t TEMP;   
   6          uint8_t IDLE_FLG = 0;
   7          void main(void)
   8          {
   9   1              System_Init();  
  10   1              while(1)
  11   1              {
  12   2                      if(IDLE_FLG == 1)
  13   2                      {
  14   3                              IDLE_FLG = 0;                   
  15   3                              Change_To_IDLE();
  16   3                      }
  17   2              }               
  18   1      }
  19          
  20          void System_Init(void)
  21          {
  22   1              IO_CLR();
  23   1      //      lcd_off();
  24   1              lcd_alloff();
  25   1              key_init();
  26   1              Change_To_IDLE();
  27   1      }
  28          
  29          void Change_To_IDLE(void)
  30          {       
  31   1              ALFSEL1 &= ~(0x80);   //关闭红外
  32   1              REMCON &= ~(0x01);
  33   1              IEN2 &= ~0x08;
  34   1              PWM0CON = 0x00; 
  35   1              
  36   1              BORCON |= 0x01; //使能BOR
  37   1              WDTCON &= 0xFD; //禁止WDT       
  38   1              
  39   1              CLKEN0 = 0x00;
  40   1              CLKEN1 = 0x40; //仅使能LCD时钟
  41   1              SYSCON &= 0x3F;    //系统时钟分频清零
  42   1              SYSCON |= (3 << 6); //设置系统时钟不分频
  43   1              SYSCON |= 0x02;
  44   1              while((CLKSTAT & 0x04) == 0);
  45   1              SYSCON &= 0xBF;  //系统时钟四分频
  46   1              CLKCFG |= 0x80; 
  47   1              SYSCON &= 0xFE;   //禁止IHRC
  48   1              IEN2 |= 0x01; //打开外部中断使能
  49   1              PCON |= 0x01;    //打开IDLE
  50   1      }
  51          
  52          
  53          
  54          
C51 COMPILER V9.54   MAIN                                                                  12/03/2024 15:15:45 PAGE 2   

  55          
  56          
  57          
  58          
  59          
  60          
  61          
  62          
  63          
  64          
  65          
  66          
  67          
  68          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =     81    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =      1    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


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