单片机51C,主程序为数码管显示,使用外部中断0,每按键一次数字加一_百度...答:include<reg52.h> define uchar unsigned char define uint unsigned int uchar count;uint disnum;sbit dula=P2^6;sbit wela=P2^7;uchar code tabledu[]={0XC0,0XF9,0XA4,0XB0,0X99,0X92,0X82,0XF8,0X80,0X90};display(uchar,uchar,uchar);delay(uchar);void main(){ EA=1;ET1=1;...
用c语言循环语句怎么写一个51单片机的时钟啊,用8个数码管显示时间。答: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];sbit led=P1^0;void delay(...
51单片机如何让一个数码管闪烁而其他数码管一直保持亮的状态不受影响...答:modtable={ {0,0,0,0},{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1} ,{1,1,1,1} } //5种模式4个数码管,所以表格为5*4 //4个0表示4个数码管都可以正常亮 void display(uint m,uchar mode )//4位显示子程序 带某位闪烁功能 //mode=0,都不闪烁 mode=1 千位...