51单片机电子钟编程,三个按钮分别控制小时分钟和秒,有图有分析答:一点鼓励都没有,给一个程序供参考吧。#include<reg51.h>#define uchar unsigned charuchar code ledtab[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x40};//0-9unsigned char sec=0,min=0,hour=12,scanled;unsigned char key,flashbit,mode,time; unsigned char disdat...
单片机外部中断控制数码管电子时钟。答:数码管用8位一体的,共阴的。仿真图如下 程序如下 include<reg51.h> define uchar unsigned char define uint unsigned int sbit k1=P3^1; //第一个按键,选择设置 uchar code distab[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x40};//共阴数码管段码表 uchar dis...