用89c51单片机数码管显示HELLO的程序六段数码管上

2022-04-04 体育 103阅读
#include
#defineucharunsignedchar
#defineuintunsignedint
sbitdula=P2^6;
sbitwela=P2^7;
ucharcodetable[]={0x76,0x79,0x38,0x38,0x3f};
ucharcodetable_2[]={0xfe,0xfd,0xfb,0xf7,0xef};
voiddelay(uintt)
{
uintx,y;
for(x=0;x for(y=0;y<110;y++);
}

voidmain()
{
while(1)
{
uchari;
while(1)
{
for(i=0;i<5;i++)
{
wela=1;
P0=table_2[i];
wela=0;
dula=1;
P0=table[i];
dula=0;
delay(1);
}
}

}

}

用C写了个汇编纠结!
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com