#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
}
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写了个汇编纠结!