⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.lst

📁 89c51与ds1302代码显示时间的源程序
💻 LST
字号:
C51 COMPILER V7.50   MAIN                                                                  09/16/2007 08:26:22 PAGE 1   


C51 COMPILER V7.50, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN main.OBJ
COMPILER INVOKED BY: D:\Keil\C51\BIN\C51.EXE main.c BROWSE DEBUG OBJECTEXTEND

line level    source

   1          #include <at89X52.h>
   2          #include "ds1302new.h"
   3          #include "LCD1602.h"
   4          
   5          TDateTime CurrectValue; //定义一个结构体,用于存储日期时间信息
   6          unsigned char *WeekStr[]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
   7          
   8          void main(void)
   9          {       
  10   1              LCD_init();
  11   1              init_ds1302();
  12   1              P2_1=0;
  13   1              GetCurrentDateTime(&CurrectValue);
  14   1              CurrectValue.Year=7;
  15   1              CurrectValue.Month=10;
  16   1              CurrectValue.MonthDay=27;
  17   1              CurrectValue.WeekDay=7;
  18   1              CurrectValue.Hour=15;
  19   1              CurrectValue.Min=42;
  20   1              CurrectValue.Sec=0;
  21   1              SetDateTime(&CurrectValue);
  22   1              p=LCD_PutStr(" DS1302RealTimer \n",-1);
  23   1              p=LCD_PutStr("WWW.BQMCU.COM.CN \n",p);
  24   1              delay_nms(300);
  25   1              p=LCD_PutStr("",-1);
  26   1              while(1){
  27   2                      GetCurrentDateTime(&CurrectValue);
  28   2                      p=0;
  29   2                      p=LCD_PutStr(CurrectValue.DateStr,p);
  30   2                      p=LCD_PutStr(" ",p);
  31   2                      p=LCD_PutStr(WeekStr[CurrectValue.WeekDay-1],p);
  32   2                      p=LCD_PutStr("\n",p);
  33   2                      p=LCD_PutStr(CurrectValue.TimeStr,p);
  34   2                      }
  35   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   1906    ----
   CONSTANT SIZE    =     93    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =     56      46
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -