单片机程序怎么打才能让数码管按下一个按钮从0到15按第二个按钮从15到...答:0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};//共阳级数码管码表0-Fsbit keyu=P1^0;sbit keyd=P1^1;uchar dat;main(){ dat=0; while(1) { P2=table[dat]; if(keyu
51单片机数码管,用动态显示0到123怎么编程?答:0-123,需要三位数码管。include<reg51.h>#define uchar unsigned char;uchar distab[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71,0x00}; //0到fuchar number,dat[3],nn=0,cnt=0;;void t0isr() interrupt 1{TH0=(65536-5000)...
51单片机led数码管显示0-99静态程序答://共阴数码管七段码 uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d, 0x07,0x7f,0x6f,0x77};void Delay1ms(uint i) //1ms延时程序 { uint j;for(;i>0;i--){ for(j=0;j<164;j++){;} } } void main(void )//主程序 { while(1){ delay_ms(1000);num++;i...