① AT89c51單片機編程實現9–0循環顯示數碼管顯示,求圖求程序
#include<reg51.h>
#defineucharunsignedchar
uchartable[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f};
voiddelay()
{
uchari,j;
for(i=0;i<200;i++)
for(j=0;j<250;j++);
}
main()
{
uchari;
i=9;
while(1)
{
if(i>9)i=9;
P1=table[i];
delay();
i--;
}
}