简介:
DS1302和51单片机设计电子钟数码管显示(未作出防真)
#include<reg51.h>
#define uchar unsigned char
#define uint unsigned int
uchar dis[16]={0,0,0,0,10,10,0,0,7,2,9,0,9,0,0,2};
uchar P2_scan[4]={0xf7,0xfb,0xfd,0xfe}; //位选择 显示扫描
uchar P0_scan[11]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0xff};//数字显示 不带小数点
uchar P0_scan1[11]={0x40,0x79,0x24,0x30,0x19,0x12,0x02,0x78,0x00,0x10,0x7f};//数字显示 带小数点
char clock[7]={4,0,15,10,27,9,9};
uchar tiao,m=0,n=8,S;
bit time=0,p=0;