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

📄 timer.c

📁 这是用W77E58编写的控制GSM模块
💻 C
字号:
#include <w77e58.h>
#include "global.h"
#include "util.h"
#include "timer.h"




//*****************************
//延时n x 100ns
void delay(unsigned char xdata d)  //在源程序开头定义是否用w77e58或22。1184M晶振
{
     unsigned char j;
     do{ d--;

       //110592 & 89c52
      #ifndef cpuw77e58
        #ifndef xtal221184
        j=21;              //k=38 cpu80320  100us k=21 cpu 8052
        #else
        j=42;
        #endif
     #else
        #ifndef xtal221184
        j=38;
        #else
        j=76;
        #endif
     #endif

       do {j--;} while(j!=0);
    }while(d!=0);
}



void delay_ms(unsigned char xdata d)
{
       do {delay(10);} while(d-- != 0);
         
}

⌨️ 快捷键说明

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