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

📄 delay.lst

📁 f340的MP3程序,通过SD卡读入解码器
💻 LST
字号:
C51 COMPILER V8.09   DELAY                                                                 05/19/2011 23:29:40 PAGE 1   


C51 COMPILER V8.09, COMPILATION OF MODULE DELAY
OBJECT MODULE PLACED IN Delay.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE Delay.c LARGE BROWSE DEBUG OBJECTEXTEND

line level    source

   1          #include "intrins.h" 
   2          #include "Delay.h"
   3          #include "string.h"
   4          /***********************************************************************************
   5          * Function: Delay_us;
   6          * Description: 延时程序, 延时时间范围: 0~65535us;
   7          ************************************************************************************/
   8          void Delay_us(unsigned int times)
   9          {
  10   1          unsigned int i;
  11   1      
  12   1              for (i=0; i<times; i++)
  13   1              {
  14   2                      _nop_();        // 调用NOP,延时1us
  15   2                      _nop_();
  16   2                      _nop_();
  17   2                      _nop_();
  18   2                      _nop_();
  19   2                      _nop_();
  20   2                      _nop_();
  21   2              _nop_();        
  22   2                      _nop_();
  23   2              }
  24   1      }
  25          ////////////////////////////////////////////////////////////////////////////////////
  26          /////////////////12M不分频///延时1ms////////////////////////////////////////////////
  27          /*void Delay(unsigned int ms)
  28          {
  29                  unsigned int i;
  30                  while(ms--)
  31                  {
  32                          for(i = 0; i < 1000; i++);
  33                  }
  34          }*/
  35          void delay(unsigned int time) 
  36          {
  37   1       while(time--);
  38   1      }
  39          void Delay_ms(unsigned int times)
  40          {
  41   1          unsigned int i;
  42   1              
  43   1              for (i=0; i<times; i++) 
  44   1                      Delay_us(1000);         // 调用延时函数,延时1ms         
  45   1      }
  46          
  47          /////////////////12M不分频///延时1ms////////////////////////////////////////////////
  48          void delayms(unsigned int ms)
  49          {
  50   1              unsigned int i;
  51   1              while(ms--)
  52   1              {
  53   2                      for(i = 0; i < 1000; i++);
  54   2              }
  55   1      }
C51 COMPILER V8.09   DELAY                                                                 05/19/2011 23:29:40 PAGE 2   

  56          /***********************************************************************************/
  57          // 文件结束
  58          /***********************************************************************************/
  59          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =     95    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   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 + -