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

📄 rtlclk.lst

📁 c8051f020 实时时钟模块程序 内含IIC模块程序/********************** SYSTEM CLOCK 8M********************************/
💻 LST
字号:
C51 COMPILER V7.06   RTLCLK                                                                07/29/2005 20:22:36 PAGE 1   


C51 COMPILER V7.06, COMPILATION OF MODULE RTLCLK
OBJECT MODULE PLACED IN RTLCLK.OBJ
COMPILER INVOKED BY: C:\Program Files\keil\C51\BIN\C51.EXE RTLCLK.C BROWSE DEBUG OBJECTEXTEND

stmt level    source

   1          #include "c8051f020.h"
   2          #include "RTLCLK.H"
   3          #include "iic.h"
   4          
   5          void Current_Time ( )
   6          {
   7   1                      unsigned char temp1=0,temp2=0;
   8   1      
   9   1                      SmbRec(0xA2,0x00, 16, currenttime);    // read pcf8563 
  10   1                      
  11   1                      
  12   1                              temp1=currenttime[7]&0x10;                      // convert data format
  13   1                              temp2=currenttime[7]&0x0f;
  14   1                              currenttime[7]=temp1+temp2;
  15   1                      
  16   1                              currenttime[6]=currenttime[6]&0x07;
  17   1                              
  18   1                              temp1=currenttime[5]&0x30;
  19   1                              temp2=currenttime[5]&0x0f;
  20   1                              currenttime[5]=10*(temp1>>4)+temp2;
  21   1      
  22   1                      
  23   1                              temp1=currenttime[4]&0x30;
  24   1                              temp2=currenttime[4]&0x0f;
  25   1                              currenttime[4]=10*(temp1>>4)+temp2;
  26   1                              
  27   1                              temp1=currenttime[3]&0x70;
  28   1                              temp2=currenttime[3]&0x0f;
  29   1                              currenttime[3]=10*(temp1>>4)+temp2;
  30   1                              
  31   1                              temp1=currenttime[2]&0x70;
  32   1                              temp2=currenttime[2]&0x0f;
  33   1                              currenttime[2]=10*(temp1>>4)+temp2;
  34   1                              
  35   1      }
  36          
  37          void Set_Time ( )
  38          {
  39   1              
  40   1              SmbSend(0xa2,0x00,16, settime );
  41   1      }
  42            
  43          /*
  44          main(){
  45                              
  46                                  IIC_Config(); 
  47                                  Set_Time();
  48                                  Current_Time ();
  49                    
  50                                   while(1);
  51                                  
  52                          
  53          
  54          }*/

C51 COMPILER V7.06   RTLCLK                                                                07/29/2005 20:22:36 PAGE 2   


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    146    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =     32    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   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 + -