#include<stdio.h>
#include <REG51.H>
void delay(int g);
int port[20] = {0xff,0xff,0xff,0xff,
0xc6,0x86,0xc7,0x86,
0xbf,0xc0,0xde,0x87,
0xbf,0x92,0x91,0x92,
0x92,0xc8,0x86,0x87},i;
void main(){
int d,b,j,k,s;
while(1){
i=0;
for(d=0;d<5;d++)
{
for(b=0;b<4;b++)
{
k=port[i++];
for(j=0;j<8;j++){
s=k;
s=s&0x80;
if(s==0x00)
P1= 0x00;
else
P1=0x1;
P2 = 0x1;
P2=0x00;
s=k;
s=s<<1;
k=s;
}
}
delay(10000);
delay(10000);
}
}
}
void delay(int g)
{
int h;
for(h=0;h<=g;g++)
{
;
}
}
0 comments:
Post a Comment