# define uint unsigned int
# define uchar unsigned char
uchar code weixuan []={0xfe,0xfd,0xff,0xff,0xff,0xff,0xff,0xff};
uchar code duanxuan []={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
uchar xianshi [10];
uint m,n;
void delay (uint i)
{
uint j=30;
for (;i>0;i--)
for (;j>0;j--);
}
void main ()
{
uint i,j;
TMOD=0x01; //确定工作方式
EA=1; //开总中断
ET0=1; //开定时计数器0中断
TR0=1; //打开定时器0
TH0=(65536-50000)/256; //给定时器赋初值
TL0=(65536-50000)%256;
xianshi [0]=duanxuan [n%100/10];
xianshi [1]=duanxuan [n%10];
xianshi [2]=0x00;
xianshi [3]=0x00;
xianshi [4]=0x00;
xianshi [5]=0x00;
xianshi [6]=0x00;
xianshi [7]=0x00;
for (i=0;i<8;i++)
{
P1=weixuan [i];
P0=xianshi [i];
delay (1);
P0=0x00;
}
}
void time0 () interrupt 1
{
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
m++;
if (m==20)
{
m=0;
n++;
}
}
如题,还需要怎么修改,我感觉中断没有使n的值加一