C51 COMPILER V9.02   MAIN                                                                  12/12/2025 16:42:35 PAGE 1   


C51 COMPILER V9.02, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN .\output\main.obj
COMPILER INVOKED BY: D:\Keil\C51\BIN\C51.EXE source\main.c OMF2 BROWSE DEBUG PRINT(.\lst\main.lst) OBJECT(.\output\main.
                    -obj)

line level    source

   1          
   2          #ifndef _MAIN_C_
   3          #define _MAIN_C_
   4          /*********************************************************************************************************
             -************/
   5          #include "include/ca51f_config.h"               
   6          #include "include/ca51f2sfr.h"
   7          #include "include/ca51f2xsfr.h"
   8          #include "include/gpiodef_f2.h"
   9          #include "include/system_clock.h"
  10          
  11          #include "include/uart.h"
  12          #include "include/delay.h"
  13          #include <intrins.h>
  14          /*********************************************************************************************************
             -************/
  15          unsigned long int Read_32bit_UID(void)                          
  16          {
  17   1              unsigned long int ID;
  18   1              LOCK  = 0x2B;   
  19   1              FSCMD = 0x80;   
  20   1              PTSH = 0x01;                            
  21   1              PTSL = 0x00;                            
  22   1              FSCMD = 0x81;                                           
  23   1              ID = FSDAT;
  24   1              ID *= 256;
  25   1              ID |= FSDAT;
  26   1              ID *= 256;
  27   1              ID |= FSDAT;
  28   1              ID *= 256;
  29   1              ID |= FSDAT;
  30   1              FSCMD = 0;
  31   1              LOCK = 0xAA;
  32   1              return ID;
  33   1      }
  34          void main(void)
  35          {
  36   1              unsigned long int UID;
  37   1      #if (SYSCLK_SRC == PLL)
                      Sys_Clk_Set_PLL(PLL_Multiple);  //设置系统时钟为PLL，PLL_Multiple为倍频倍数
              #endif
  40   1              
  41   1      #ifdef UART0_EN
  42   1              Uart0_Initial(UART0_BAUTRATE);  //初始化UART0
  43   1      #endif
  44   1              
  45   1      #ifdef UART1_EN
                      Uart1_Initial(UART1_BAUTRATE);  //初始化UART1
              #endif
  48   1      
  49   1      #ifdef UART2_EN
                      Uart2_Initial(UART2_BAUTRATE);  //初始化UART2
              #endif
  52   1              
C51 COMPILER V9.02   MAIN                                                                  12/12/2025 16:42:35 PAGE 2   

  53   1              EA = 1;                                                                                                 //开全局中断
  54   1      
  55   1      #ifdef PRINT_EN
  56   1              uart_printf("Read 32bits UID Demo Code\n");
  57   1      #endif
  58   1      
  59   1              UID = Read_32bit_UID();
  60   1              uart_printf ("UID = %ld\n",UID);                //打印UID值
  61   1              while(1)
  62   1              {
  63   2              }
  64   1      
  65   1      }
  66          #endif


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    241    ----
   CONSTANT SIZE    =     38    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----       4
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
   EDATA SIZE       =   ----    ----
   HDATA SIZE       =   ----    ----
   XDATA CONST SIZE =   ----    ----
   FAR CONST SIZE   =   ----    ----
END OF MODULE INFORMATION.


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