51单片机与ds1302制作时钟
#include
#include
#define uchar unsigned char
#define uint unsigned int
#define dport P0
#define aport P2
#define DataPort P0 //定义数据端口 程序中遇到DataPort 则用P0 替换
#define CtrlPort P2 //定义控制端口
bit ReadRTC_Flag;//定义读DS1302标志
unsigned char code DuanMa[]={0xc0,0xf9,0xa4,0xb0,
0x99,0x92,0x82,0xf8,
0x80,0x90,0x88,0x83,
0xa7,0xa1,0x86,0x8e};// 显示段码值0~F
//unsigned char DuanMa1[9];
1