void display_onechar(){//实现一个字滚动int i=0;int j=0;int k=0;int m=0;int n=0;int change;for(i=0;i<16;i++){//16个状态,文字从无到有移动16次n=0;while(1){m=0;for(k=16-i;k<=16;k++){change=(my_char[0][m]<<8)|my_char[0][m+16];LAT = 0; for(j = 0; j < 16; j++){//选中列R1 = ((~change)>>j)&1; SCK = 0;SCK = 1; }OE = 1; get_row(k-1);//选中行LAT = 1; //关闭锁存OE = 0; m++;}delay_us(40);//调整文字移动速度n++;if(n==1000) break;//保持一个静止的状态} } for(i=0;i<16;i++){//文字从有到无移动16次n=0;while(1){m=0;for(k=i+1;k<=16;k++){change=(my_char[0][k-1]<<8)|my_char[0][k+15];LAT = 0; for(j = 0; j < 16; j++){R1 = ((~change)>>j)&1; SCK = 0;SCK = 1; }OE = 1; get_row(m);LAT = 1; OE = 0; m++;}delay_us(40);n++;if(n==1000) break;} }
}