用单片机c51,c语言编0-9计数器程序!谢谢!!!答:include<reg51.h>unsigned char a;unsigned char code table[]={ 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x67};void init(void){EA=1;EX0=1;IT0=1;}void main(void){init();while(1){P0=table[a];}}void EX_0(void) interrupt 0{a++;if(a>9)a=0;} 望采纳 ...
利用51单片机,4个数码管设计一个计时器,要求在数码管上显示的数据从0开...答:0x99,0x92,0x83,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};uint num,a;uchar bai,shi,ge;void init();void delay(uint);void display(ucharbai,ucharshi,ucharge);uint fb();uint fs();uint fg();void main(){ init();while(1){ display(fb(),fs(),fg());} } v...