C51 COMPILER V9.54   MAIN                                                                  04/27/2022 11:47:28 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          /******************** (C) COPYRIGHT 2021 SONiX *******************************
   2          * COMPANY:  SONiX
   3          * DATE:   2022/04/22
   4          * IC:     SN8F5835
   5          *____________________________________________________________________________
   6          * REVISION    Date        Author    Description
   7          * 1.0         2021/04/27  Eden      1. First release
   8          *____________________________________________________________________________
   9          *****************************************************************************/
  10          /*_____ I N C L U D E S _________________________________*/
  11          #define __XRAM_SFR_H__
  12          #include <SN8F5835.h>
  13          #include "crc.h"
  14          
  15          /*_____ F U N C T I O N S _______________________________*/
  16          void GPIO_Initialization(void);
  17          
  18          /*_____ D E F I N I T I O N S ___________________________*/
  19          
  20          /*_____ D E C L A R A T I O N S _________________________*/
  21          extern uint16_t code CRC_CHECK_DATA;
  22          
  23          /*_____ M A C R O 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          
  29          #define OB_IO_OUTPUT_LOW      P00=0;  P0M |=0x01; 
  30          #define OB_IO_OUTPUT_HIGH     P00=1;  P0M |=0x01;
  31          
  32          
  33          /**
  34           *  @Brief    main: CRC Test Demo Function
  35           *  @param    None
  36           *  @retval   None
  37           */
  38          
  39          void main(void)
  40          {
  41   1        uint8_t bCRC16_DataBuffer[10];
  42   1        uint16_t dbCRC16_OneByte_Result;
  43   1        uint16_t i;
  44   1        uint8_t idata *Addrptr;
  45   1          
  46   1        /*  Initialize GPIO status  */
  47   1        GPIO_Initialization();
  48   1        
  49   1        /*  Initialize and Configurate CRC data */
  50   1        Addrptr = &bCRC16_DataBuffer;
  51   1        
  52   1        for(i = 0x0; i<sizeof(bCRC16_DataBuffer); i++)
  53   1        {
  54   2          bCRC16_DataBuffer[i] = i;
C51 COMPILER V9.54   MAIN                                                                  04/27/2022 11:47:28 PAGE 2   

  55   2        }
  56   1        
  57   1        /*  For example, one byte calculate with CRC CRC16-CCITT */
  58   1        /*  (1) CRC mode configuration 
  59   1            (2) CRC seed initialization */
  60   1        CRCM = mskCRCM_CRC16 | mskCRCM_ENABLE;              /* (1)  */
  61   1        CRCM |= mskCRCM_RESET;                              /* (2)  */
  62   1          
  63   1        /* Accumulate RAM buffer 10 byte by using for loop one byte CRC calculation */
  64   1        for (i = 0x0; i < sizeof(bCRC16_DataBuffer); i++)
  65   1        {
  66   2          CRCDATL = *(Addrptr + i);
  67   2          while ((CRCM & mskCRCM_BUSY) != 0x00);
  68   2        }
  69   1        dbCRC16_OneByte_Result = (CRCDATH << 8) | CRCDATL;  
  70   1          
  71   1        while(1);
  72   1      
  73   1      }
  74          
  75          
  76          /**
  77           *  @Brief    Initialize GPIO status
  78           *  @param    None
  79           *  @retval   None
  80           */
  81          void GPIO_Initialization(void)
  82          {
  83   1        /*  Set whole IOs to output low */
  84   1          IO_PORT0_OUTPUT_LOW
  85   1          IO_PORT1_OUTPUT_LOW
  86   1          IO_PORT3_OUTPUT_LOW
  87   1          IO_PORT4_OUTPUT_LOW    
  88   1      }
  89          


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


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