#include<reg51.h>
unsigned char code rr_tab[]={0x7e,0xbd,0xdb,0xe7,0x00,0xff };
unsigned int c,s;
main()
{
c=0;
TMOD=0x01;
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
EA=1;
ET1=1;
TR1=1;
while(1)
{
P1= rr_tab[c];
}
}
void timer() interrupt 0 using 2
{s++;
if(s==40)
{
s=0;
c++;
if(c==6)
{c=0;}
}
}