文件名称:DS1302
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 2kb
- 下载次数:
- 0次
- 提 供 者:
- 秦*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
#define uchar unsigned char
#define unint unsigned int
sbit T_CLK=P1^0 /* 实时时钟的时钟线引脚*/
sbit T_IO=P1^1 /* 实时时钟的数据线*/
sbit T_RST=P2^0 /* 实时时钟的复位线引脚*/
sbit DUAN=P2^6 //74HC573的LE端 LED的段选端
sbit WEI=P2^7 //74HC573的LE端 LED的位选端
unint a[6] //={0,0,0,0,0,0} /*位段的数字*/
uchar code ledk[]=
{
0x3f,/*0*/
0x06,/*1*/
0x5b,/*2*/
0x4f,/*3*/
0x66,/*4*/
0x6d,/*5*/
0x7d,/*6*/
0x07,/*7*/
0x7f,/*8*/
0x6f,/*9*/
0x40,} /*-*/ -# Define uchar unsigned char# define unint unsigned int sbit T_CLK = P1 ^ 0 /* Real-time clock line pin*/sbit T_IO = P1 ^ 1 /* real-time clock data line*/sbit T_RST = P2 ^ 0 segment selector the end sbit WEI /* real-time clock reset line pin*/sbit VOl.41.No.10, = P2 ^ 6 // 74HC573 the LE-end LED = P2 ^ 7 // 74HC573 the LE-end LED Choice end unint a [6] //= {0,0,0,0,0,0} /* digital bit segment*/uchar code ledk [] = {0x3f, /* 0*/0x06, /* 1*/0x5b, /* 2*/0x4f, /* 3*/0x66, /* 4*/0x6d, /* 5*/0x7d, /* 6*/0x07, /* 7*/0x7f, /* 8*/0x6f , /* 9*/0x40,} /*-* /
#define unint unsigned int
sbit T_CLK=P1^0 /* 实时时钟的时钟线引脚*/
sbit T_IO=P1^1 /* 实时时钟的数据线*/
sbit T_RST=P2^0 /* 实时时钟的复位线引脚*/
sbit DUAN=P2^6 //74HC573的LE端 LED的段选端
sbit WEI=P2^7 //74HC573的LE端 LED的位选端
unint a[6] //={0,0,0,0,0,0} /*位段的数字*/
uchar code ledk[]=
{
0x3f,/*0*/
0x06,/*1*/
0x5b,/*2*/
0x4f,/*3*/
0x66,/*4*/
0x6d,/*5*/
0x7d,/*6*/
0x07,/*7*/
0x7f,/*8*/
0x6f,/*9*/
0x40,} /*-*/ -# Define uchar unsigned char# define unint unsigned int sbit T_CLK = P1 ^ 0 /* Real-time clock line pin*/sbit T_IO = P1 ^ 1 /* real-time clock data line*/sbit T_RST = P2 ^ 0 segment selector the end sbit WEI /* real-time clock reset line pin*/sbit VOl.41.No.10, = P2 ^ 6 // 74HC573 the LE-end LED = P2 ^ 7 // 74HC573 the LE-end LED Choice end unint a [6] //= {0,0,0,0,0,0} /* digital bit segment*/uchar code ledk [] = {0x3f, /* 0*/0x06, /* 1*/0x5b, /* 2*/0x4f, /* 3*/0x66, /* 4*/0x6d, /* 5*/0x7d, /* 6*/0x07, /* 7*/0x7f, /* 8*/0x6f , /* 9*/0x40,} /*-* /
(系统自动生成,下载前可以参看下载内容)
下载文件列表
DS1302实时时钟.C