#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
uchar s1,s2,m1,m2,h1,h2,miao,fen,shi,count,flag;
sbit dula=P2^6;
sbit wela=P2^7;
sbit tiaoshi=P3^4;
sbit key_s=P3^5;
sbit key_f=P3^6;
sbit key_m=P3^7;
uchar code table[]={
0x3f,0x06,0x5b,0x4f,
0x66,0x6d,0x7d,0x07,
0x7f,0x6f,0x77,0x7c,
0x39,0x5e,0x79,0x71};
display(uchar,uchar,uchar,uchar,uchar,uchar);
delay(uchar);
void main()
{
EA=1;
ET1=1;
TMOD=0x10;
TH1=(65536-50000)/256;
TL1=(65536-50000)%256;
TR1=1;
P3=0xff;
shi=12;
while(1)
{
while(P3!=0xff)
{
if(tiaoshi==0)
{
delay(100);
if(tiaoshi==0)
TR1=~TR1;
3、时钟数码管显示--可调时
最新推荐文章于 2023-12-26 14:11:47 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)