16×16点阵LED电子显示屏的设计

2024-11-23 03:22:16
推荐回答(5个)
回答1:

/*

24MHZ的晶振,点线扫描地址为:0xFFFF
*/
#include
#include
#include
#include

#define uchar unsigned char
#define uint unsigned int
#define SPEED 6

uchar col, disrow;
uint word;
uchar code HZ[];
uchar BUFF[6];

void loadoneline(void); //装载某行一线点阵数据
void sendoneline(void); //串行发送一行线点阵数据

/****************************主函数***************************/
void main(void)
{

uchar i;
col = 0;
word = 0;
while(1)
{
while(col <16) // 循环16次,点亮并移动一个汉字
{
for(i=0; i {
for(disrow=0;disrow <16;disrow++)//扫描16行
{
loadoneline(); //装载一线点阵数据
sendoneline(); //发送一线点阵数据
XBYTE[0xFFFF]= 0x10 + disrow; // 点亮屏幕
XBYTE[0xFFFF] = 0x20 + disrow; //锁住74LS595
}
}
col++; //列指针递增
}
col = 0;
word= word + 32; // 一个汉字移动后,指向下一个汉字
if(word >= 1600)
word = 0; // 移动50个汉字后,重新开始
}
}

/****************用"字模"等软件提出要显示的字符汉字点阵码*************************/
uchar code HZ[]=
{
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,
//0x08,0x20,0x06,0x30,0x04,0x40,0x3F,0xF8,0x21,0x08,0x3F,0xF8,0x21,0x08,0x21,0x08,
0x3F,0xF8,0x21,0x08,0x01,0x00,0xFF,0xFE,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,/*"单",0*/
0x00,0x40,0x10,0x40,0x10,0x40,0x10,0x44,0x1F,0xFE,0x10,0x00,0x10,0x00,0x10,0x00,
0x1F,0xF0,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x10,0x20,0x10,0x40,0x10,0x80,0x10,/*"片",1*/
0x10,0x00,0x10,0xF8,0x10,0x88,0xFE,0x88,0x10,0x88,0x10,0x88,0x38,0x88,0x34,0x88,
0x54,0x88,0x50,0x88,0x91,0x08,0x11,0x0A,0x12,0x0A,0x12,0x0A,0x14,0x06,0x10,0x00,/*"机",2*/
0x00,0x00,0x0F,0xF0,0x08,0x10,0x0F,0xF0,0x08,0x10,0x0F,0xF0,0x08,0x10,0x0F,0xF0,
0x
}

回答2:

单片机控制吧!
是很简单,只要写字符码就能搞定。。

回答3:

这简单

回答4:

太简单了

回答5:

亲 你也是这个毕业设计么?