#include <reg52.h>
#include <intrins.h>
sbit DIO=P3^4;
sbit S_CLK=P3^5;
sbit R_CLK=P3^6;
void Dio_Byte(unsigned char dat)
{unsigned char i;
for(i=0;i<8;i++)
{ S_CLK=0;
if(dat&0x01)
DIO=1;
else
{DIO=0;}
S_CLK=1;
dat=dat>>1;
}
}
void main()
{
while(1)
{R_CLK=0;
Dio_Byte(0xfe);
Dio_Byte(0x80);
R_CLK=1;
}
}