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

📄 main.lst

📁 开发环境为keil166
💻 LST
📖 第 1 页 / 共 2 页
字号:
  185  1          ///  Initialization of the SYSCON0 Register:
  186  1          ///  ---------------------------------------------------------------------
  187  1      
  188  1          //// this register must be set in the start-up file
  189  1          //// SYSCON0  =  0x0000
  190  1      
  191  1          ///  ---------------------------------------------------------------------
  192  1          ///  Initialization of the SYSCON1 Register:
  193  1          ///  ---------------------------------------------------------------------
  194  1          ///  clock prescaler for system is fpll / 1
  195  1      
  196  1          //// this register must be set in the start-up file
  197  1          //// SYSCON1  =  0x0000
  198  1      
  199  1          ///  ---------------------------------------------------------------------
  200  1          ///  Initialization of the SYSCON3 Register:
  201  1          ///  ---------------------------------------------------------------------
  202  1      
  203  1          //// this register must be set in the start-up file
  204  1          //// SYSCON3  =  0x0000
  205  1      
  206  1          ///  ---------------------------------------------------------------------
  207  1          ///  Initialization of EBC
  208  1          ///  ---------------------------------------------------------------------
  209  1      
  210  1          //// this register must be set in the start-up file
  211  1          //// EBCMOD1  =  0x007F
  212  1      
  213  1          ///  EBC is disabled
  214  1        //// -----------------------------------------------------------------------
  215  1        //// End of Important Settings for the Start-Up File
  216  1        //// -----------------------------------------------------------------------
  217  1      
  218  1      
  219  1        //   -----------------------------------------------------------------------
  220  1        //   Initialization of the Peripherals:
  221  1        //   -----------------------------------------------------------------------
  222  1      
  223  1        //   initializes the Parallel Ports
  224  1        IO_vInit();
  225  1      
  226  1        //   initializes the Asynchronous/Synchronous Serial Interface 0 (ASC0)
  227  1        ASC0_vInit();
  228  1      
  229  1        //   initializes the General Purpose Timer Unit (GPT1)
  230  1        GPT1_vInit();
  231  1      
  232  1        //   initializes the TwinCAN Module (CAN)
  233  1        CAN_vInit();
  234  1      
  235  1        // USER CODE BEGIN (Init,3)
  236  1      
  237  1        // USER CODE END
  238  1      
  239  1        //   globally enable interrupts
  240  1        PSW_IEN        =  1;          
  241  1      
C166 COMPILER V6.04, MAIN                                                                  04/06/2009 22:15:28 PAGE 5   

  242  1      } //  End of function MAIN_vInit
  243         
  244         
  245         //****************************************************************************
  246         // @Function      void MAIN_vUnlockProtecReg(void) 
  247         //
  248         //----------------------------------------------------------------------------
  249         // @Description   This function makes it possible to write one protected 
  250         //                register. After calling of this function and write on the 
  251         //                protected register is the security level set to low 
  252         //                protected mode.
  253         //
  254         //----------------------------------------------------------------------------
  255         // @Returnvalue   None
  256         //
  257         //----------------------------------------------------------------------------
  258         // @Parameters    None
  259         //
  260         //----------------------------------------------------------------------------
  261         // @Date          2009-4-4
  262         //
  263         //****************************************************************************
  264         
  265         // USER CODE BEGIN (UnlockProtecReg,1)
  266         
  267         // USER CODE END
  268         
  269         void MAIN_vUnlockProtecReg(void)
  270         {
  271  1        ubyte ubPASSWORD;
  272  1      
  273  1        if((SCUSLS & 0x1800) == 0x0800)      // if low protected mode
  274  1        {
  275  2      
  276  2          ubPASSWORD = SCUSLS & 0x00FF;
*** WARNING C192 IN LINE 276 OF MAIN.C: '=': value truncated
  277  2          ubPASSWORD = ~ubPASSWORD;
  278  2          SCUSLC = 0x8E00 | ubPASSWORD;      // command 4
  279  2      
  280  2        }  // end if low protected mode
  281  1      
  282  1        if((SCUSLS & 0x1800) == 0x1800)      // if write protected mode
  283  1        {
  284  2          SCUSLC = 0xAAAA;                   // command 0
  285  2          SCUSLC = 0x5554;                   // command 1
  286  2      
  287  2          ubPASSWORD = SCUSLS & 0x00FF;
*** WARNING C192 IN LINE 287 OF MAIN.C: '=': value truncated
  288  2          ubPASSWORD = ~ubPASSWORD;
  289  2      
  290  2          SCUSLC = 0x9600 | ubPASSWORD;      // command 2
  291  2          SCUSLC = 0x0800;                   // command 3; new PASSWOR is 0x00
  292  2      
  293  2          ubPASSWORD = SCUSLS & 0x00FF;
*** WARNING C192 IN LINE 293 OF MAIN.C: '=': value truncated
  294  2          ubPASSWORD = ~ubPASSWORD;
  295  2          SCUSLC = 0x8E00 | ubPASSWORD;      // command 4
  296  2      
  297  2        }  // end if write protected mode
  298  1      
  299  1      } //  End of function MAIN_vUnlockProtecReg
  300         
C166 COMPILER V6.04, MAIN                                                                  04/06/2009 22:15:28 PAGE 6   

  301         
  302         //****************************************************************************
  303         // @Function      void main(void) 
  304         //
  305         //----------------------------------------------------------------------------
  306         // @Description   This is the main function.
  307         //
  308         //----------------------------------------------------------------------------
  309         // @Returnvalue   None
  310         //
  311         //----------------------------------------------------------------------------
  312         // @Parameters    None
  313         //
  314         //----------------------------------------------------------------------------
  315         // @Date          2009-4-4
  316         //
  317         //****************************************************************************
  318         
  319         // USER CODE BEGIN (Main,1)
  320         
  321         // USER CODE END
  322         
  323         void main(void)
  324         {
  325  1        // USER CODE BEGIN (Main,2)
  326  1      unsigned char j=0;
  327  1        // USER CODE END
  328  1      
  329  1        MAIN_vInit();
  330  1      
  331  1        // USER CODE BEGIN (Main,4)
  332  1        P1L=0xff;
  333  1       while(1)
  334  1       {
  335  2          /*CAN接收中断成功 P1L暂时关闭*/
  336  2         if (asc0_rec == 1)
  337  2                {
  338  3                 P1L^=0xff;
  339  3                 asc0_rec=0; 
  340  3                }       
  341  2       }
  342  1        // USER CODE END
  343  1      
  344  1      } //  End of function main
  345         
  346         
  347         
  348         // USER CODE BEGIN (MAIN_General,10)
  349         
  350         // USER CODE END
  351         


MODULE INFORMATION:   INITIALIZED  UNINITIALIZED
  CODE SIZE        =         164     --------
  NEAR-CONST SIZE  =    --------     --------
  FAR-CONST SIZE   =    --------     --------
  HUGE-CONST SIZE  =    --------     --------
  XHUGE-CONST SIZE =    --------     --------
  NEAR-DATA SIZE   =         147     --------
  FAR-DATA SIZE    =    --------     --------
  XHUGE-DATA SIZE  =    --------     --------
C166 COMPILER V6.04, MAIN                                                                  04/06/2009 22:15:28 PAGE 7   

  IDATA-DATA SIZE  =    --------     --------
  SDATA-DATA SIZE  =    --------     --------
  BDATA-DATA SIZE  =    --------     --------
  HUGE-DATA SIZE   =    --------     --------
  BIT SIZE         =    --------     --------
  INIT'L SIZE      =         206     --------
END OF MODULE INFORMATION.


C166 COMPILATION COMPLETE.  3 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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