#include<reg52.h>
#define uchar unsigned char
uchar hang[16]={0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0xfc,0x0d,0xfe,0x0f};
sbit R=P1^0;
sbit CLK=P1^3;
sbit STB=P1^2;
sbit OE=P1^4;
char code HZ[];
char HC[8];
uchar zhuwei[8]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};
void delay(int z) //延时函数
{
int x,y;
for(x=0;x<z;x++)
for(y=0;y<110;y++);
}
void WriteByte(char dat)//写一个字节数据
{
char i;
for(i=0;i<8;i++)
{
dat=dat>>1;
R=CY;
CLK=0;
CLK=1;
}
}
void main()//主函数
{
int num;
uchar a,b,c,d;
OE=0;
while(1)
{
uchar zi;
int xh;
for(zi=0;zi<3;zi++)
{
for(xh=0;xh<200;xh++)
{
for(num=0;num<16;num++)
{
for(b=0;b<4;b++)
{
HC[2*b]=(HZ[2*num+128*zi+32*b]);
HC[2*b+1]=(HZ[2*num+1+128*zi+32*b]);
}
for(a=0;a<8;a++)
{
WriteByte(HC[a]);
}
P0=hang[num];
STB=1;
STB=0;
}
}
}
for(zi=0;zi<3;zi++)
{
for(xh=0;xh<200;xh++)
{
for(num=0;num<16;num++)
{
for(b=0;b<4;b++)
{
HC[2*b]=(HZ[2*num+128*zi+32*b]);
HC[2*b+1]=(HZ[2*num+1+128*zi+32*b]);
}
for(a=0;a<8;a++)
{
WriteByte(HC[a]);
}
P0=hang[num];
STB=1;
STB=0;
}
}
OE=1;
delay(500);
OE=0;
for(xh=0;xh<200;xh++)
{
for(num=0;num<16;num++)
{
for(b=0;b<4;b++)
{
HC[2*b]=(HZ[2*num+128*zi+32*b]);
HC[2*b+1]=(HZ[2*num+1+128*zi+32*b]);
}
for(a=0;a<8;a++)
{
WriteByte(HC[a]);
}
P0=hang[num];
STB=1;
STB=0;
}
}
}
for(zi=0;zi<3;zi++)
{
for(d=0;d<16;d++)
{
for(xh=0;xh<10;xh++)
{
for(num=0;num<16;num++)
{
for(b=0;b<4;b++)
{
HC[2*b]=(HZ[2*num+128*zi+32*b]);
HC[2*b+1]=(HZ[2*num+1+128*zi+32*b]);
}
if(num<=d)
for(a=0;a<8;a++)
{
WriteByte(HC[a]);
}
else
for(a=0;a<8;a++)
{
WriteByte(0xff);
}
P0=hang[num];
STB=1;
STB=0;
}
}
}
for(xh=0;xh<100;xh++)
{
for(num=0;num<16;num++)
{
for(b=0;b<4;b++)
{
HC[2*b]=(HZ[2*num+128*zi+32*b]);
HC[2*b+1]=(HZ[2*num+1+128*zi+32*b]);
}
for(a=0;a<8;a++)
{
WriteByte(HC[a]);
}
P0=hang[num];
STB=1;
STB=0;
}
}
}
for(zi=0;zi<3;zi++)
{
for(d=0;d<16;d++)
{
for(xh=0;xh<10;xh++)
{
for(num=0;num<16;num++)
{
for(b=0;b<4;b++)
{
HC[2*b]=(HZ[2*num+128*zi+32*b]);
HC[2*b+1]=(HZ[2*num+1+128*zi+32*b]);
}
if(num<=d)
for(a=0;a<8;a++)
{
WriteByte(HC[a]);
}
else if(num==d+1)
for(a=0;a<8;a++)
{
WriteByte(0x00);
}
else
for(a=0;a<8;a++)
{
WriteByte(0xff);
}
P0=hang[num];
STB=1;
STB=0;
}
}
}
for(xh=0;xh<100;xh++)
{
for(num=0;num<16;num++)
{
for(b=0;b<4;b++)
{
HC[2*b]=(HZ[2*num+128*zi+32*b]);
HC[2*b+1]=(HZ[2*num+1+128*zi+32*b]);
}
for(a=0;a<8;a++)
{
WriteByte(HC[a]);
}
P0=hang[num];
STB=1;
STB=0;
}
}
}
for(zi=0;zi<3;zi++)
{
for (c=0;c<8;c++)
{
for(xh=0;xh<10;xh++)
{
for(num=0;num<16;num++)
{
for(b=0;b<4;b++)
{
HC[2*b]=(HZ[2*num+128*zi+32*b]);
HC[2*b+1]=(HZ[2*num+1+128*zi+32*b]);
}
for(a=0;a<8;a++)
{
WriteByte(HC[a]|zhuwei[c]);
}
P0=hang[num];
STB=1;
STB=0;
}
}
}
for(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