C51 COMPILER V9.54   MAIN                                                                  04/27/2022 18:12:29 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 bISPsuccess;
  43   1        /*  Initialize GPIO status  */
  44   1        GPIO_Initialization();  
  45   1        
  46   1        /*  ISP Program with checksum verification  */
  47   1        bISPsuccess = ISP_WritePage_ChecksumVerify(&btabDATA_StorePage[0], &baryDEMO_Data[0]);  
  48   1        
  49   1        while(1)
  50   1        {
  51   2          WDTR=0x5A;  /* Reset Watchdog timer */
  52   2          if(bISPsuccess == 0)
  53   2          {
C51 COMPILER V9.54   MAIN                                                                  04/27/2022 18:12:29 PAGE 2   

  54   3            OB_IO_OUTPUT_HIGH   /* ISP Failed condition */
  55   3          }   
  56   2        }
  57   1      }
  58          
  59          
  60          /**
  61           *  @Brief    Initialize GPIO status
  62           *  @param    None
  63           *  @retval   None
  64           */
  65          void GPIO_Initialization(void)
  66          {
  67   1        /*  Set whole IOs to output low */
  68   1        IO_PORT0_OUTPUT_LOW
  69   1        IO_PORT1_OUTPUT_LOW
  70   1        IO_PORT3_OUTPUT_LOW
  71   1        IO_PORT4_OUTPUT_LOW
  72   1      }
  73          
  74          


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