1.静态数码管循环显示#includeiom16v.h#pragmadate:codeconsttable[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};//===============================voiddelay(){unsignedinti,j;for(i=0;i500;i++)for(j=0;j1000;j++);}//=====================================voidmain(){unsignedinta;DDRB=0XFF;PORTB=0XFF;while(1){PORTB=table[a];delay();a++;if(a==10)a=0;}}