我想弄一个循环显示的数码管 但是结果只显示一个 0
#include<reg52.h>unsigned char i=0,a[]={0xc0,0xf9,0xa4,0xb0,
0x99,0x92,0x82,0xf8,
0x80,0x90,0x88,0x83,
0xa7,0xa1,0x86,0x8e };
main()
{
TMOD = 0X01;
TH0 = 0X00;
TL0 = 0X00;
TR0 = 1;
while(1)
{
if(TR0==1)
{TR0 = 0;
P0 = a[i++];
}
if(i==16)
i=0;
}
}