#include
#include
unsigned char code text[]={ //
//点阵格式:阳码。逐列。顺向。十六进制。
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xEF,0xBF,0xEF,0x7F,0x6E,0xFF,0x88,0x00,0xE6,0xFE,0xFF,0x3D,0x81,0xFB,0xBD,0xE7,
0xBC,0x1F,0xBD,0xFF,0xBD,0xFF,0xBC,0x03,0xBD,0xFD,0x81,0xFD,0xFF,0xE1,0xFF,0xFF,/*"祝",0*/
0xFB,0xFE,0xFB,0xFE,0xFB,0xFD,0xFB,0xFB,0xFB,0xF7,0xFB,0xCF,0xFB,0x3F,0x00,0xFF,
0xFB,0x3F,0xFB,0xCF,0xFB,0xF7,0xFB,0xFB,0xFB,0xFD,0xFB,0xFE,0xFB,0xFE,0xFF,0xFF,/*"大",1*/
0xF7,0xFD,0xCB,0x6D,0xDB,0x6D,0xDB,0x6B,0xDA,0xDB,0xDA,0xD7,0x59,0xB5,0x9A,0x6E,
0xDB,0x01,0xDB,0xDF,0xDB,0xAF,0xDB,0x77,0xDA,0xF7,0xD3,0xFB,0xCF,0xFB,0xFF,0xFF,/*"家",2*/
0xFD,0xFB,0xDD,0xB7,0xD5,0xAD,0x59,0xBE,0x9C,0x01,0xD9,0xBF,0xD5,0xAF,0xDD,0xB6,
0xFF,0xF9,0xC0,0x07,0xDD,0xFF,0xDD,0xFF,0xDC,0x00,0xBD,0xFF,0xFD,0xFF,0xFF,0xFF,/*"新",3*/
0xFF,0xDF,0xFB,0xDF,0xE7,0xDF,0x1C,0x1F,0xDD,0xDF,0xDD,0xDF,0xDD,0xDF,0xDD,0xDF,
0xC0,0x00,0xDD,0xDF,0xDD,0xDF,0xDD,0xDF,0xDD,0xDF,0xDF,0xDF,0xFF,0xDF,0xFF,0xFF,/*"年",4*/
0xFF,0x7F,0xF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,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,/*"!",17*/
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
};
unsigned char ds1=0;
unsigned int i=0,j=0,a=0,b=5,c=0;
void delay(unsigned int x)
{
for(i=0;i
for(j=0;j<10;j++);
}
void ds(unsigned char x1) //向595中写入8位二进制数据
{
for (ds1=0;ds1<8;ds1++)
{
P3_0=(x1&0x80); //取数组的高位
P3_1=0;
_nop_();
_nop_();
P3_1=1; //上升沿,移位寄存器移动
_nop_();
_nop_();
x1=x1<<1; //把8位二进制向左移动
}
}
void main()
{
P2_2=0;
P2_1=1;
while(1) //读取数组的值
{ for(b=0;b<216;b++)
for(c=0;c<3;c++)
for(a=0;a<16;a++)
{
ds(text[(a+b)*2]);
ds(text[(a+b)*2+1]);
P2_0=0;
_nop_();
_nop_();
P2_0=1; //上升沿,存储寄存器输出
_nop_();
_nop_();
P1=a;
delay(20);
}
}
}
为什么只是显示到13个字"恭"字的时候又开始重新开始了呢?各位大神请指教!!谢谢!
|