用中断让八位数码管显示04333125
哪位大神帮看下这个代码有什么问题,为什么在protues仿真中显示不了啊#include<reg51.h>
#define uchar unsigned char
uchar i=1;
code uchar tableAll[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
code uchar tableXH[]={0,4,3,3,3,1,2,5} ;
code uchar table_p2[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe} ;
void display()
{
P2=0xff;
P0=tableAll[tableXH[i++]];
P2=table_p2[i++];
if(i==7)
i=0;
}
void intr() interrupt 3
{
TH1=(60536)/256;
TL1=(60536)%256;
display();
}
void main()
{
TMOD=0x10;
TH1=(60536)/256;
TL1=(60536)%256;
P0=0x3f;
P2=0x7f;
EA=1;
ET1=1;
TR1=1;
while(1);
}