用单片机设计一个时钟,可显示时和分,可以调时间,也要有闹钟功能,要有设...答:其实不用定时中断也能实现功能:include<reg51.h> 主函数 unsigned char tab[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};定义0-9数组 unsigned int tmp;定义变量 void delay(unsigned int xms)定义延时函数 {unsigned int j,i;for(i=0;i<xms;i++)for(j=0;j<100...
利用51单片机画时钟电路图。要求6位数码管,两位秒闪信号,必须能够进行...答:include <reg52.h> define uchar unsigned char define uint unsigned int uchar code table[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0xbf};//P0口共阳数码管0-9显示编码 uchar code port[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};uchar count;uchar sec;u...