1
电子说
16x64点阵制作
单片机为51的STC89C58
手工焊接点阵屏工程量实在很大 可以考虑用8x8点阵屏拼接
以下是制作完拍摄的图片
99画的电路图
#include
#define uchar unsigned char
#define uint unsigned int
sbit SH_CP=P2^0;
sbit DS=P2^1;
sbit ST_CP=P2^2;
sbit OE0=P3^3;
sbit OE1=P3^2;
sbit OE2=P3^1;
sbit OE3=P3^0;
uint code tab[ ]=
{
/* (0) (1) 迅(2) 捷(3) 电(4) 器(5) 水(6) 电(7) 暖(8) 维(9) 修(10) 服(11) 务(12) 部(13) (14) 仅(15)
以(16) 此(17) 制(18) 作(19) 纪(20) 念(21) 5(22) 年(23) 的(24) 电(25) 子(26) 生(27) 涯(28) (29) (30) (31)
(32) (33) (34) (35) (36) (37) (38) **/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*“ ”,33*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*“ ”,34*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*“ ”,29*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*“ ”,30*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*“ ”,31*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*“ ”,32*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*“ ”,0*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*“ ”,1*/
0x02,0x02,0x82,0x04,0x73,0xF8,0x20,0x04,0x04,0x02,0x44,0x02,0x44,0x02,0x7F,0xFA,
0x44,0x02,0x44,0x02,0x40,0x02,0x7F,0xC2,0x00,0x22,0x00,0x72,0x00,0x02,0x00,0x00,/*“迅”,2*/
0x10,0x42,0x10,0x81,0xFF,0xFE,0x11,0x00,0x12,0x01,0x44,0x06,0x55,0x38,0x55,0x08,
0x55,0x04,0xFF,0xFC,0x55,0x22,0x55,0x22,0x5F,0x22,0x44,0x22,0x44,0x02,0x00,0x00,/*“捷”,3*/
0x00,0x00,0x00,0x00,0x1F,0xF0,0x12,0x20,0x12,0x20,0x12,0x20,0x12,0x20,0xFF,0xFC,
0x12,0x22,0x12,0x22,0x12,0x22,0x12,0x22,0x1F,0xF2,0x00,0x02,0x00,0x0E,0x00,0x00,/*“电”,4*/
0x02,0x40,0x02,0x40,0xF2,0x7E,0x92,0xA2,0x92,0xA2,0x93,0x22,0xF3,0x3E,0x0E,0x00,
0x03,0x3E,0xF3,0x22,0x92,0xA2,0x9A,0xA2,0x96,0x7E,0xF2,0x60,0x00,0x40,0x00,0x00,/*“器”, 10*/
0x00,0x08,0x08,0x08,0x08,0x10,0x08,0x60,0x09,0x80,0x0E,0x02,0x00,0x01,0xFF,0xFE,
0x04,0x00,0x06,0x00,0x09,0x80,0x10,0x60,0x20,0x30,0x00,0x18,0x00,0x10,0x00,0x00,/*“水”,6*/
0x00,0x00,0x00,0x00,0x1F,0xF0,0x12,0x20,0x12,0x20,0x12,0x20,0x12,0x20,0xFF,0xFC,
0x12,0x22,0x12,0x22,0x12,0x22,0x12,0x22,0x1F,0xF2,0x00,0x02,0x00,0x0E,0x00,0x00,/*“电”,7*/
0x00,0x00,0x3F,0xF0,0x22,0x20,0x22,0x20,0x3F,0xF2,0x01,0x04,0x65,0x1A,0x55,0x62,
0x47,0xE4,0x65,0x54,0x55,0x48,0x85,0x58,0x95,0x64,0xA5,0x46,0x01,0x04,0x00,0x00,/*“暖”,8*/
0x04,0x44,0x1C,0xC4,0xE5,0x44,0x46,0x48,0x08,0x48,0x04,0x00,0x18,0x00,0xFF,0xFF,
0x52,0x44,0x12,0x44,0x52,0x44,0x3F,0xFC,0x12,0x44,0x12,0x44,0x12,0x44,0x00,0x00,/*“维”,9*/
0x04,0x00,0x08,0x00,0x3F,0xFE,0xE0,0x00,0x4F,0xC0,0x04,0x2A,0x19,0x2A,0xF1,0x52,
0x2A,0xD4,0x25,0xA4,0x24,0xA8,0x2A,0x48,0x33,0x50,0x01,0x90,0x01,0x00,0x00,0x00,/*“修”, 20*/
0x00,0x02,0x00,0x0C,0xFF,0xF0,0x89,0x04,0x89,0x02,0xFF,0xFC,0x00,0x00,0x00,0x00,
0xFF,0xFE,0x83,0x84,0x82,0x68,0x92,0x10,0x8A,0x6C,0xF3,0x86,0x00,0x04,0x00,0x00,/*“服”,11*/
0x04,0x01,0x08,0x81,0x08,0x82,0x11,0x42,0x21,0x44,0xF2,0x48,0x4A,0x70,0x45,0xC0,
0x44,0x40,0x4A,0x42,0x52,0x41,0x61,0x7E,0x01,0x00,0x01,0x80,0x01,0x00,0x00,0x00,/*“务”,12*/
0x02,0x00,0x22,0x00,0x32,0x7E,0xAE,0x44,0x62,0x44,0x26,0x44,0x3A,0x44,0x22,0x7E,
0x02,0x00,0x7F,0xFF,0x40,0x00,0x42,0x10,0x46,0x10,0x59,0x08,0x60,0xF0,0x00,0x00,/*“部”,13*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*“ ”,14*/
0x00,0x80,0x03,0x00,0x0C,0x00,0x37,0xFF,0xE0,0x02,0x40,0x02,0x38,0x04,0x27,0x0C,
0x20,0xD8,0x20,0x30,0x20,0xD0,0x27,0x08,0x38,0x0C,0x00,0x06,0x00,0x04,0x00,0x00,/*“仅”,15*/
0x00,0x00,0x00,0x10,0x7F,0xF8,0x00,0x30,0x00,0x60,0x40,0x42,0x38,0x82,0x11,0x04,
0x00,0x08,0x00,0x18,0x00,0x70,0xFF,0xE0,0x00,0x10,0x00,0x0C,0x00,0x06,0x00,0x04,/*“以”, 31*/
0x00,0x04,0x00,0x04,0x0F,0xFC,0x00,0x08,0x00,0x08,0xFF,0xF0,0x04,0x10,0x04,0x10,
0x00,0x00,0xFF,0xFC,0x02,0x02,0x04,0x02,0x04,0x02,0x08,0x02,0x08,0x1E,0x00,0x00,/*“此”,17*/
0x00,0x00,0x0A,0x00,0xF2,0xFC,0x52,0x80,0x12,0x80,0xFF,0xFF,0x12,0x84,0x12,0x86,
0x12,0xFC,0x00,0x00,0x3F,0xF0,0x00,0x02,0x00,0x01,0xFF,0xFE,0x00,0x00,0x00,0x00,/*“制”,18*/
0x01,0x00,0x02,0x00,0x04,0x00,0x1F,0xFF,0xE0,0x00,0x44,0x00,0x18,0x00,0x30,0x00,
0xDF,0xFF,0x12,0x20,0x12,0x20,0x12,0x20,0x16,0x20,0x12,0x60,0x10,0x20,0x00,0x00,/*“作”,19*/
0x04,0x08,0x0E,0x4C,0x34,0xC8,0xC5,0x48,0x06,0x50,0x18,0x50,0x00,0x00,0x43,0xFC,
0x42,0x02,0x42,0x02,0x42,0x02,0x42,0x02,0x42,0x02,0x7E,0x1E,0x00,0x04,0x00,0x00,/*“纪”,20*/
0x00,0x00,0x02,0x02,0x02,0x1C,0x04,0x00,0x0A,0x1E,0x12,0x02,0x22,0x42,0xCA,0x22,
0x26,0x5A,0x12,0x82,0x0B,0x02,0x08,0x0E,0x04,0x10,0x06,0x08,0x04,0x0C,0x00,0x00,/*“念”, 41*/
0x00,0x00,0x1F,0x98,0x10,0x84,0x11,0x04,0x11,0x04,0x10,0x88,0x10,0x70,0x00,0x00,/*“5”,22*/
0x02,0x20,0x04,0x20,0x08,0x20,0x30,0x20,0xC7,0xE0,0x44,0x20,0x44,0x20,0x44,0x20,
0x7F,0xFF,0x44,0x20,0x44,0x20,0x44,0x20,0x44,0x20,0x40,0x20,0x00,0x20,0x00,0x00,/*“年”,23*/
0x00,0x00,0x1F,0xFE,0x31,0x08,0xD1,0x08,0x11,0x08,0x1F,0xFC,0x02,0x00,0x0C,0x00,
0xF1,0x00,0x10,0xC0,0x10,0x64,0x10,0x02,0x10,0x04,0x1F,0xF8,0x00,0x00,0x00,0x00,/*“的”,24*/
0x00,0x00,0x00,0x00,0x1F,0xF0,0x12,0x20,0x12,0x20,0x12,0x20,0x12,0x20,0xFF,0xFC,
0x12,0x22,0x12,0x22,0x12,0x22,0x12,0x22,0x1F,0xF2,0x00,0x02,0x00,0x0E,0x00,0x00,/*“电”,25*/
0x00,0x80,0x00,0x80,0x40,0x80,0x40,0x80,0x40,0x80,0x40,0x82,0x40,0x81,0x47,0xFE,
0x48,0x80,0x50,0x80,0x60,0x80,0x40,0x80,0x00,0x80,0x01,0x80,0x00,0x80,0x00,0x00,/*“子”,26*/
0x00,0x80,0x01,0x02,0x06,0x02,0x78,0x82,0x08,0x82,0x08,0x82,0x08,0x82,0x08,0x82,
0xFF,0xFE,0x48,0x82,0x08,0x82,0x08,0x82,0x19,0x82,0x08,0x86,0x00,0x02,0x00,0x00,/*“生”, 52*/
0x08,0x20,0x86,0x3F,0x61,0xC2,0x0E,0x04,0x00,0x18,0x7F,0xE2,0x41,0x22,0x49,0x22,
0x49,0x22,0x7F,0xFE,0x49,0x22,0x49,0x22,0x49,0x22,0x41,0x22,0x41,0x02,0x00,0x00,/*“涯”, 54*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*“ ”,33*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*“ ”,34*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*“ ”,33*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*“ ”,34*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*“ ”,35*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*“ ”,36*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*“ ”,37*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*“ ”,38*/
};
//顺向、逐列、阴码 MICROSOFT SANS SERIF 字宽32 字高25 MATRIX-8X8-GREEN 右旋90度 左右翻转
// MATRIX-8X8-RED 左旋90度 上下翻转
void delay_ms(unsigned int ms)
{
uchar j;
while(ms--)
for(j=0;j《60;j++);
}
void WriteByte(uchar dat)
{
uchar k;
for(k=0;k《8;k++)
{
dat=dat》》1;
DS=CY;
SH_CP=0;
SH_CP=1;
}
}
void main()
{
uint num,temp,n,m;
while(1)
{
OE0=1;
OE1=1;
OE2=1;
OE3=1;
for(n=0;n《480;n++) //
for(m=0;m《8;m++) //重复显示8次
{
temp=15;// 不加此条,流动飞快
for(num=n;num《16+n;num++)
{
WriteByte(tab[2*num+1]);
WriteByte(tab[2*num+0]);
P1=temp;
ST_CP=0;
ST_CP=1;
delay_ms(1);
temp--;
OE0=0;
}
OE0=1;
for(num=n;num《16+n;num++)
{
WriteByte(tab[2*num+2*16+1]);
WriteByte(tab[2*num+2*16]);
P1=temp;
ST_CP=0;
ST_CP=1;
delay_ms(1);
temp--;
OE1=0;
}
OE1=1;
for(num=n;num《16+n;num++)
{
WriteByte(tab[2*num+4*16+1]);
WriteByte(tab[2*num+4*16]);
P1=temp;
ST_CP=0;
ST_CP=1;
delay_ms(1);
temp--;
OE2=0;
}
OE2=1;
for(num=n;num《16+n;num++)
{
WriteByte(tab[2*num+6*16+1]);
WriteByte(tab[2*num+6*16]);
P1=temp;
ST_CP=0;
ST_CP=1;
delay_ms(1);
temp--;
OE3=0;
}
OE3=1;
}
}
}
全部0条评论
快来发表一下你的评论吧 !