多给点分或许有人给 找的1632你参考一下吧
#include <reg51h>
//字形码按列取模
char code table[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x04,0x00,0x02,0x00,0x01,0xC0,0x00,0x70,0x00,0x20,0x40,0x00,0x80,0xFF,0x7F,
0x00,0x00,0x10,0x00,0x20,0x00,0xC0,0x00,0x80,0x01,0x00,0x07,0x00,0x02,0x00,0x00,/"小",0/
0x88,0x01,0x68,0x00,0xFF,0x7F,0x28,0x00,0x48,0x40,0x00,0x42,0x10,0x22,0x20,0x19,
0xFF,0x07,0x00,0x00,0xFF,0x3F,0x80,0x40,0x20,0x43,0x18,0x46,0x08,0x70,0x00,0x00,/"桃",0/
0x00,0x00,0x00,0x00,0x00,0x58,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/",",1/
0x08,0x20,0xF8,0x3F,0x08,0x21,0x00,0x01,0x00,0x01,0x08,0x21,0xF8,0x3F,0x08,0x20,/"H",2/
0x00,0x20,0x00,0x3C,0xC0,0x23,0x38,0x02,0xE0,0x02,0x00,0x27,0x00,0x38,0x00,0x20,/"A",3/
0x08,0x20,0xF8,0x3F,0x08,0x21,0x08,0x01,0x08,0x01,0x08,0x01,0xF0,0x00,0x00,0x00,/"P",4/
0x08,0x20,0xF8,0x3F,0x08,0x21,0x08,0x01,0x08,0x01,0x08,0x01,0xF0,0x00,0x00,0x00,/"P",5/
0x08,0x00,0x38,0x00,0xC8,0x20,0x00,0x3F,0xC8,0x20,0x38,0x00,0x08,0x00,0x00,0x00,/"Y",6/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/" ",7/
0x08,0x20,0xF8,0x3F,0x30,0x20,0xC0,0x00,0x00,0x07,0x08,0x18,0xF8,0x3F,0x08,0x00,/"N",8/
0x08,0x20,0xF8,0x3F,0x88,0x20,0x88,0x20,0xE8,0x23,0x08,0x20,0x10,0x18,0x00,0x00,/"E",9/
0xF8,0x03,0x08,0x3C,0x00,0x07,0xF8,0x00,0x00,0x07,0x08,0x3C,0xF8,0x03,0x00,0x00,/"W",10/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/" ",11/
0x08,0x00,0x38,0x00,0xC8,0x20,0x00,0x3F,0xC8,0x20,0x38,0x00,0x08,0x00,0x00,0x00,/"Y",12/
0x08,0x20,0xF8,0x3F,0x88,0x20,0x88,0x20,0xE8,0x23,0x08,0x20,0x10,0x18,0x00,0x00,/"E",13/
0x00,0x20,0x00,0x3C,0xC0,0x23,0x38,0x02,0xE0,0x02,0x00,0x27,0x00,0x38,0x00,0x20,/"A",14/
0x08,0x20,0xF8,0x3F,0x88,0x20,0x88,0x00,0x88,0x03,0x88,0x0C,0x70,0x30,0x00,0x20,/"R",15/
0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x33,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,/"!",16/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //显示空屏,如果只有一个字或将字全部移出必须设置一个空屏幕
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
void delay(int c)
{
int i,j;
for(i=0;i<c;i++)
for(j=0;j<10;j++)
;
}
void main()
{
unsigned char i,j; //i:每个字的显示循环;j每个字的显示码除以2
unsigned int b=0; //显示偏移控制,char类型最多只能显示14个汉字+一个空白位字符
unsigned char a; //控制移动间隔时间
while(1)
{
j=0;
if(a>1) //移动间隔时间;取值0--255
{
a=0;
b+=2;
if(b>=500) //显示到最后一个字,回头显示,判断值=字数32
{
b=0;
}
}
P3=1;
for(i=0;i<16;i++)
{
P1=i;
P0=table[j+b];
P2=table[j+b+1];
delay(5);
P0=0x00;
P2=0x00;
j+=2;
}
P3=0;
for(i=0;i<16;i++)
{
P1=i;
P0=table[j+b];
P2=table[j+b+1];
delay(5);
P0=0x00;
P2=0x00;
j+=2;
}
a++;
}
}
void rwe ()
{
temp = num[z][i2];
io_595();
temp = num[z][i2+1];
io_595();
i = i%16;
}
在这里,temp是16位的,num虽然定义是16位的,但实际有效数据是8位的,
改成一下试试:
void rwe ()
{
temp = num[z][i2];
temp<<=8;
temp += num[z][i2+1];
io_595();
i = i%16;
}
以上就是关于能不能给一个单片机控制16*64点阵的C程序 行是用154控制,列是用595控制 急需全部的内容,包括:能不能给一个单片机控制16*64点阵的C程序 行是用154控制,列是用595控制 急需、51单片机 16X16点阵 代码程序出问题了,请求帮助、谢谢!!!、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)