C51 COMPILER V8.18   AT45DBXXX                                                             01/12/2011 16:46:26 PAGE 1   


C51 COMPILER V8.18, COMPILATION OF MODULE AT45DBXXX
OBJECT MODULE PLACED IN AT45DBxxx.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE AT45DBxxx.c BROWSE DEBUG OBJECTEXTEND

line level    source

   1          /********************************************************************************************************
   2          *
   3          * File                : AT45DBxxx.c
   4          * Hardware Environment: DVK501 && F320 EX
   5          * Build Environment   : uVision3 V3.80 20100913
   6          * Version             : 
   7          * By                  : Su Wei Feng
   8          *
   9          *                                  (c) Copyright 2005-2010, WaveShare
  10          *                                       http://www.waveshare.net
  11          *                                          All Rights Reserved
  12          *
  13          *********************************************************************************************************/
  14          
  15          #define _DVK501_F320_EX_
  16          
  17          #include <c8051f320.h>
  18          #include <../../../library/ws_clock.h>
  19          #include <../../../library/ws_delay.h>
  20          #include <../../../library/ws_at45dbxxx_port.h>
  21          #include <../../../library/ws_lcd_ST7920_port.h>
  22          
  23          void main(void)
  24          {
  25   1              uchar num;
  26   1              uchar tmp[31];
  27   1              
  28   1              PCA0MD &= ~0x40;     //Clear watchdog timer enable
  29   1              XBR1 = 0x40;
  30   1              clock_external();    
  31   1              delay_ms(100);
  32   1              SPI_Init();
  33   1              st7920LcdInit();
  34   1              showLine(0,0,lcd_buffer,"AT45DBXX Example");
  35   1              showLine(0,1,lcd_buffer,"Program: OK!");
  36   1              showLine(0,2,lcd_buffer,"Verify: OK!");
  37   1              showLine(0,3,lcd_buffer,"Output:");
  38   1              refreshLCD(lcd_buffer); 
  39   1      
  40   1              for(num=0;num<29;num++) 
  41   1              {
  42   2                      write_buffer((uint)num,num);
  43   2                      delay_ms(1);
  44   2              }
  45   1              for(num=0;num<29;num++)
  46   1              {
  47   2                      tmp[num]=read_buffer(num);
  48   2                      delay_ms(1);
  49   2              }
  50   1              for(num=0;num<29;num++)
  51   1              {
  52   2                      showLine(8,3,lcd_buffer,"0x%x2",tmp[num]);
  53   2                      refreshLCD(lcd_buffer); 
  54   2                      delay_ms(1000);
  55   2              }
C51 COMPILER V8.18   AT45DBXXX                                                             01/12/2011 16:46:26 PAGE 2   

  56   1              while(1)
  57   1              {
  58   2              }
  59   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   1365    ----
   CONSTANT SIZE    =     56    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----      77
   IDATA SIZE       =     64    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


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