C51 COMPILER V9.54   MAIN                                                                  05/18/2022 16:19:29 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 Source\main.c OPTIMIZE(8,SPEED) BROWSE DEBUG OBJECTEXTEND PRINT(.\Listin
                    -gs\main.lst) TABS(2) OBJECT(.\Objects\main.obj)

line level    source

   1          
   2          /******************** (C) COPYRIGHT 2022 SONiX *******************************
   3          * COMPANY:  SONiX
   4          * DATE:   2022/04/20
   5          * IC:     SN8F5835
   6          *____________________________________________________________________________
   7          * REVISION    Date        Author    Description
   8          * 1.0         2022/04/20   Eden     1. First release
   9          *____________________________________________________________________________
  10          *****************************************************************************/
  11          
  12          /*_____ I N C L U D E S _________________________________*/
  13          #define __XRAM_SFR_H__
  14          #include <SN8F5835.h>
  15          #include "ilrc_calibration.h"
  16          #include "timer.h"
  17          /*_____ F U N C T I O N S _______________________________*/
  18          
  19          void ILRC_SetAutoCalibration(void);
  20          void GPIO_Initialization(void);
  21          void TIMER0_Initialization(void);
  22          /*_____ D E F I N I T I O N S ___________________________*/
  23          
  24          
  25          /*_____ D E C L A R A T I O N S _________________________*/
  26          
  27          /*_____ M A C R O S _____________________________________*/
  28          
  29          #define    IO_PORT0_OUTPUT_LOW        P0M |= 0xFF;    P0 &= 0x00;
  30          #define    IO_PORT1_OUTPUT_LOW        P1M |= 0xFF;    P1 &= 0x00;
  31          #define    IO_PORT3_OUTPUT_LOW        P3M |= 0xFF;    P3 &= 0x00;
  32          #define    IO_PORT4_OUTPUT_LOW        P4M |= 0xFF;    P4 &= 0x00;
  33          
  34          /**
  35           *  @Brief    main: ILRCCalibration Test Demo Function
  36           *  @param    None
  37           *  @return   None
  38           */
  39          
  40          void main(void)
  41          {
  42   1        /*
  43   1         *  (1) GPIO Initial
  44   1         *  (2) ILRC Auto-Trim  Function
  45   1         *  
  46   1         */
  47   1          GPIO_Initialization();                                            /*  (1) */  
  48   1          P00 =1; 
  49   1          ILRC_SetAutoCalibration();                                        /*  (2) */
  50   1          P00 =0; 
  51   1          TIMER0_Initialization();
  52   1          while(1);     
  53   1      }
  54          /**
C51 COMPILER V9.54   MAIN                                                                  05/18/2022 16:19:29 PAGE 2   

  55           *  @Brief    initial GPIO status
  56           *  @param    None
  57           *  @return   None
  58           */
  59          void GPIO_Initialization(void)
  60          {
  61   1          IO_PORT0_OUTPUT_LOW
  62   1          IO_PORT1_OUTPUT_LOW
  63   1          IO_PORT3_OUTPUT_LOW
  64   1          IO_PORT4_OUTPUT_LOW       
  65   1      }
  66          
  67          /**
  68           *  @Brief    ILRC_Setautocalibration: ILRCCalibration Auto Trim Function
  69           *  @param    None
  70           *  @return   None
  71           */
  72          
  73          void ILRC_SetAutoCalibration(void)
  74          {
  75   1        /*
  76   1         *  Auto-Calibration Command:
  77   1         *  (1) Enable  ILRC Auto-Calibration Function
  78   1         *  (2) Execute ILRC Calibration
  79   1         *  (3) Waiting For ILRC Calibration Done 
  80   1         */
  81   1          CLKCAL = mskCLKCAL_CALEN;                                           /*  (1) */ 
  82   1          FRQCMD = mskFRQCMD_EXRCUTED_ILRC_AUTO_TRIM;                         /*  (2) */
  83   1          while(CLKCAL & mskCLKCAL_CALEN);                                    /*  (3) */
  84   1      }
  85          void TIMER0_Initialization(void)
  86          {
  87   1        /*
  88   1         *  (1) Set Timer0 Mode2 (8-bit Auto-Reload Timer) And ILRC As Timer0 Source
  89   1         *  (2) Set TL0 Overflow Value
  90   1         *  (3) Set TH0 Overflow Value
  91   1         *    
  92   1         */   
  93   1          TMOD |= (mskTMOD_T0_MODE2 | mskTMOD_T0CT);      /*  (1) */
  94   1          TH0 = TH0_VALUE;                                /*  (2) */
  95   1          TL0 = TH0_VALUE;                                /*  (3) */  
  96   1          TCON0 |= (mskTCON0_T0EXT_losc | mskTCON0_T0_DIV1);              
  97   1          IEN0 |= mskIEN0_ET0;                    
  98   1          EAL = 1;                                  
  99   1          TCON |= mskTCON_TR0;  
 100   1      }
 101          void ISR_Timer0(void) interrupt ISRTimer0 using 3
 102          {
 103   1          P01 ^=  1;                            /*  Timer0 ISR Test Pin Toggle  */ 
 104   1      }
 105          
 106          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =     83    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
C51 COMPILER V9.54   MAIN                                                                  05/18/2022 16:19:29 PAGE 3   

END OF MODULE INFORMATION.


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