C51 COMPILER V9.54   MAIN                                                                  04/26/2022 17:23:18 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 2021 SONiX *******************************
   3          * COMPANY:  SONiX
   4          * DATE:   2022/04/25
   5          * AUTHOR:   Eden
   6          * IC:     SN8F5835
   7          *____________________________________________________________________________
   8          * REVISION    Date        User    Description
   9          * 1.0         2022/04/25  Eden    1. First release
  10          *____________________________________________________________________________
  11          *****************************************************************************/
  12          
  13          
  14          /*_____ I N C L U D E S _________________________________*/
  15          #define __XRAM_SFR_H__
  16          #include <SN8F5835.h>
  17          #include "buzzer.h"
  18          /*_____ F U N C T I O N S _______________________________*/
  19          void BZ_Initialize2khz(void);
  20          void BZ_Initialize4khz(void);
  21          void GPIO_Initialization(void);
  22          
  23          /*_____ D E F I N I T I O N S ___________________________*/
  24          
  25          
  26          /*_____ D E C L A R A T I O N S _________________________*/
  27          
  28          /*_____ M A C R O S _____________________________________*/
  29          #define    IO_PORT0_OUTPUT_LOW        P0M |= 0xFF;    P0 &= 0x00;
  30          #define    IO_PORT1_OUTPUT_LOW        P1M |= 0xFF;    P1 &= 0xFF;
  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: Buzzer Test Demo Function
  36           *  @param    None
  37           *  @return   None
  38           */
  39          
  40          void main(void)
  41          {
  42   1        /*
  43   1         *  System initial:
  44   1         *  (1) GPIO
  45   1         *  Pwm App Fuction Selcect:
  46   1         *  (2) 2Khz Buzzer Init or 4Khz Buzzer Init
  47   1         */   
  48   1          GPIO_Initialization();                        /*  (1) */
  49   1          BZ_Initialize2khz();                          /*  (2) */
  50   1      //    BZ_Initialize4khz();                        /*  (2) */
  51   1          while(1)
  52   1          {   
  53   2            WDTR = 0x5A;                                /*  Clear Watchdog Timer  */
  54   2          }
C51 COMPILER V9.54   MAIN                                                                  04/26/2022 17:23:18 PAGE 2   

  55   1      }
  56          
  57          /**
  58           *  @Brief    initial GPIO status
  59           *  @param    None
  60           *  @return   None
  61           */
  62          
  63          void GPIO_Initialization(void)
  64          {     
  65   1          IO_PORT0_OUTPUT_LOW
  66   1          IO_PORT1_OUTPUT_LOW
  67   1          IO_PORT3_OUTPUT_LOW
  68   1          IO_PORT4_OUTPUT_LOW
  69   1      }
  70          
  71          /**
  72           *  @Brief    BZ_ExecuteBz2khzInit: 2kHz Buzzer Initial Function
  73           *  @param    None
  74           *  @return   None
  75           */
  76          
  77          void BZ_Initialize2khz(void)
  78          {
  79   1          
  80   1          BZM = mskBZM_BZRATE_DIV16384;               /*  Init 2Khz Buzzer Freq Division  */
  81   1        
  82   1          BZM |=  mskBZM_BZEN;                        /*  Buzzer Enable */
  83   1      }
  84          
  85          /**
  86           *  @Brief    BZ_ExecuteBz4khzInit: 4kHz Buzzer Initial Function
  87           *  @param    None
  88           *  @return   None
  89           */
  90          void BZ_Initialize4khz(void)
  91          {
  92   1          
  93   1          BZM  =  mskBZM_BZRATE_DIV8192;              /*  Init 4Khz Buzzer Freq Division  */
  94   1        
  95   1          BZM |=  mskBZM_BZEN;                        /*  Buzzer Enable */
  96   1      }


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