文件名称:dingshiqi
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2015-07-20
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- z**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
定时器,上电开始计时,LED每秒闪一次,9小时后继电器吸合3秒,然后释放,计时器重新计时。如此循环。-#include reg51.h
typedef unsigned char BYTE
typedef unsigned int WORD
#define SYSclk 6000000L
#define MODE1T //Timer clock mode, commendt this line is 12T mode, uncomment is 1T mode
#ifdef MODE1T
#define T1MS (65536-SYSclk/1000) //1ms timer calculation method in 1T mode, 1000=1000Hz
#else
#define T1MS (65526-SYSclk/12/1000) //1ms timer calculation method in 12T mode
#endif
typedef unsigned char BYTE
typedef unsigned int WORD
#define SYSclk 6000000L
#define MODE1T //Timer clock mode, commendt this line is 12T mode, uncomment is 1T mode
#ifdef MODE1T
#define T1MS (65536-SYSclk/1000) //1ms timer calculation method in 1T mode, 1000=1000Hz
#else
#define T1MS (65526-SYSclk/12/1000) //1ms timer calculation method in 12T mode
#endif
(系统自动生成,下载前可以参看下载内容)
下载文件列表
dingshiqi.c