C51 COMPILER V9.54   MAIN                                                                  05/18/2022 18:40:38 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 2022 SONiX *******************************
   2          * COMPANY:  SONiX
   3          * DATE:   2022/04/27
   4          * IC:     SN8F5835
   5          *____________________________________________________________________________
   6          * REVISION    Date        Author    Description
   7          * 1.0         2021/04/27  Eden      1. First release
   8          *____________________________________________________________________________
   9          *****************************************************************************/
  10          
  11          /*_____ I N C L U D E S _________________________________*/
  12          #define __XRAM_SFR_H__
  13          #include <SN8F5835.h>
  14          #include "ISP.h"
  15          /*_____ F U N C T I O N S _______________________________*/
  16          void GPIO_Initialization(void);
  17          /*_____ D E F I N I T I O N S ___________________________*/
  18          
  19          /*_____ D E C L A R A T I O N S _________________________*/
  20          code uint8_t btabDATA_StorePage[0x20] _at_ 0x3B00;
  21          
  22          uint8_t baryDEMO_Data[32] = {11, 22, 33, 44, 55, 66, 77, 88}; /* byte(unsined char) array */
  23          uint8_t bByteData = 99;
  24          uint8_t bResultData[32] = {11, 22, 99, 44, 55, 66, 77, 88};   /* the result for checking whether ISP worked
             - success or not */
  25          
  26          /*_____ M A C R O S _____________________________________*/
  27          #define OB_IO_OUTPUT_LOW      P00=0;  P0M |=0x01; 
  28          #define OB_IO_OUTPUT_HIGH     P00=1;  P0M |=0x01;
  29          
  30          #define IO_PORT0_OUTPUT_LOW   P0M |= 0xFF;  P0 &= 0x00;
  31          #define IO_PORT1_OUTPUT_LOW   P1M |= 0xFF;  P1 &= 0x00;
  32          #define IO_PORT3_OUTPUT_LOW   P3M |= 0xFF;  P3 &= 0x00;
  33          #define IO_PORT4_OUTPUT_LOW   P4M |= 0xFF;  P4 &= 0x00;
  34          
  35          /**
  36           *  @Brief    main: ISP Test Demo Function
  37           *  @param    None
  38           *  @retval   None
  39           */
  40          void main(void)
  41          { 
  42   1        uint8_t i;
  43   1        /*  Initialize GPIO status  */
  44   1        GPIO_Initialization();  
  45   1        
  46   1        isp_page_write(&btabDATA_StorePage[0], &baryDEMO_Data[0]);  /*  ISP Main Function */
  47   1        isp_byte_write(0x3B02 , bByteData);
  48   1        
  49   1        //ISP_CompareRomData
  50   1        for(i=0; i<sizeof(bResultData); i++)
  51   1        {
  52   2          if(*(uint8_t*) (btabDATA_StorePage+i) != bResultData[i])
  53   2          {
C51 COMPILER V9.54   MAIN                                                                  05/18/2022 18:40:38 PAGE 2   

  54   3            OB_IO_OUTPUT_HIGH /* Data compare failed  */
  55   3          }
  56   2        } 
  57   1        
  58   1        while(1)
  59   1        {
  60   2          WDTR=0x5A;  /* Reset Watchdog timer */
  61   2        }
  62   1      }
  63          
  64          
  65          /**
  66           *  @Brief    Initialize GPIO status
  67           *  @param    None
  68           *  @retval   None
  69           */
  70          void GPIO_Initialization(void)
  71          {
  72   1        /*  Set whole IOs to output low */
  73   1        IO_PORT0_OUTPUT_LOW
  74   1        IO_PORT1_OUTPUT_LOW
  75   1        IO_PORT3_OUTPUT_LOW
  76   1        IO_PORT4_OUTPUT_LOW
  77   1      }
  78          
  79          


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


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