C51 COMPILER V9.54   MAIN                                                                  05/18/2022 16:10:44 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          
  13          
  14          /*_____ I N C L U D E S _________________________________*/
  15          #define __XRAM_SFR_H__
  16          #include <SN8F5835.h>
  17          #include "ilrc_calibration.h"
  18          /*_____ F U N C T I O N S _______________________________*/
  19          void GPIO_Initialization(void);
  20          void ILRC_SetAutoCalibration(void);
  21          /*_____ D E F I N I T I O N S ___________________________*/
  22          
  23          /*_____ D E C L A R A T I O N S _________________________*/
  24          #define IO_PORT0_OUTPUT_LOW   P0M |= 0xFF;  P0 &= 0x00;
  25          #define IO_PORT1_OUTPUT_LOW   P1M |= 0xFF;  P1 &= 0x00;
  26          #define IO_PORT3_OUTPUT_LOW   P3M |= 0xFF;  P3 &= 0x00;
  27          #define IO_PORT4_OUTPUT_LOW   P4M |= 0xFF;  P4 &= 0x00;
  28          /*_____ M A C R O S _____________________________________*/
  29          
  30          /**
  31           *  @Brief    main: WDT Test Demo Function
  32           *  @param    None
  33           *  @return   None
  34           */
  35          
  36          void main(void)
  37          {
  38   1          GPIO_Initialization();                        /*  GPIO  Initial */  
  39   1          P01 =1;
  40   1          ILRC_SetAutoCalibration();
  41   1          P01 =0;
  42   1          WDTR = 0x5A;
  43   1          while(1)
  44   1          {
  45   2            /*  Set OPTIONS_SN8F5835 -> Watchdog Reset as Enable 
  46   2                Clear Watchdog Timer                            */    
  47   2            WDTR = 0x00;  //0x5A will clear watchdog timer, others will trigger WDT reset
  48   2            P00 =1;
  49   2            P00 =0;
  50   2          }
  51   1      }
  52          
  53          void GPIO_Initialization(void)
  54          {
C51 COMPILER V9.54   MAIN                                                                  05/18/2022 16:10:44 PAGE 2   

  55   1        /*  Set whole IOs to output low */
  56   1        IO_PORT0_OUTPUT_LOW
  57   1        IO_PORT1_OUTPUT_LOW
  58   1        IO_PORT3_OUTPUT_LOW
  59   1        IO_PORT4_OUTPUT_LOW
  60   1        
  61   1      }
  62          
  63          void ILRC_SetAutoCalibration(void)
  64          {
  65   1        /*
  66   1         *  Auto-Calibration Command:
  67   1         *  (1) Enable  ILRC Auto-Calibration Function
  68   1         *  (2) Execute ILRC Calibration
  69   1         *  (3) Waiting For ILRC Calibration Done 
  70   1         */
  71   1          CLKCAL = mskCLKCAL_CALEN;                                           /*  (1) */ 
  72   1          FRQCMD = mskFRQCMD_EXRCUTED_ILRC_AUTO_TRIM;                         /*  (2) */  
  73   1          while(CLKCAL & mskCLKCAL_CALEN);                                    /*  (3) */
  74   1      
  75   1      }


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


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