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

  55   1          GPIO_Initialization();                        /*  (1) */ 
  56   1          TIMER3_Initialization();                      /*  (2) */
  57   1      
  58   1      
  59   1          while(1)
  60   1          {
  61   2            WDTR = 0x5A;                                /*  Clear Watchdog Timer  */
  62   2          }
  63   1      }
  64          
  65          /**
  66           *  @Brief    TIMER3_ExecuteTimerInit: Timer3 Initial Function
  67           *  @param    None
  68           *  @return   None
  69           */
  70          
  71          void TIMER3_Initialization(void)
  72          {
  73   1        /*
  74   1         *  (1) Set First Time Timer High Counter 
  75   1         *  (2) Set First Time Timer Low Counter  
  76   1         *  (3) Set Re-load Timer High Counter  
  77   1         *  (4) Set Re-load Timer Low Counter 
  78   1         *  
  79   1         */ 
  80   1          T3CL  |=  (T3C_VALUE&0x00FF);                   /*  (1) */
  81   1          T3CH  |=  (T3C_VALUE&0xFF00)>>8;                /*  (2) */
  82   1          T3RL  |=  (T3R_VALUE&0x00FF);                   /*  (3) */
  83   1          T3RH  |=  (T3R_VALUE&0xFF00)>>8;                /*  (4) */
  84   1          T3M |=  mskT3M_T3_DIV128;                     
  85   1          T3M |=  mskT3M_T3CKS;                         
  86   1          IEN2  |=  mskIEN2_ET3;                          
  87   1          EAL = 1;                                      
  88   1          T3M |=  mskT3M_T3EN;                            
  89   1      
  90   1      }
  91          
  92          /**
  93           *  @Brief    initial GPIO status
  94           *  @param    None
  95           *  @return   None
  96           */
  97          void GPIO_Initialization(void)
  98          {
  99   1          IO_PORT0_OUTPUT_LOW
 100   1          IO_PORT1_OUTPUT_LOW
 101   1          IO_PORT3_OUTPUT_LOW
 102   1          IO_PORT4_OUTPUT_LOW       
 103   1      }
 104          
 105          
 106          /**
 107           *  @Brief    ISR_Timer3: Timer3 ISR Function
 108           *  @param    None
 109           *  @return   None
 110           */
 111          void ISR_Timer3(void) interrupt ISRTimer3 using 3
 112          {
 113   1          OB_TEST_PIN ^=  1;                                /*  Timer3 ISR Test Pin Toggle  */ 
 114   1      }


C51 COMPILER V9.54   MAIN                                                                  05/10/2022 10:22:22 PAGE 3   

MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =     70    ----
   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)
