• 大小: 127KB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2021-06-26
  • 语言: 其他
  • 标签:

资源简介

在PROTEUS中仿真实现16*16点阵显示汉字

资源截图

代码片段和文件信息

#include“reg52.h“
#define uc unsigned char
#define uint unsigned int
#define speed 5
uc coldisrow;
uint word;
uc code HZ[];
uc BUFF[10];
void loadoneline(void);
void sendoneline(void);
void delay(uint);


void delay(uint a)
{
while(a)
{a--;}
}

uc twoonebyte(uc h1uc h2)
{ uc temptempcol;
if(col<8) tempcol=col;
else tempcol=col-8;
temp=(h1<>(8-tempcol));
// temp=255-temp;
return temp;
}


void loadoneline(void)
{ uc s;
for(s=0;s<5;s++)
{ BUFF[2*s]=HZ[word+32*s+2*disrow];
BUFF[2*s+1]=HZ[word+1+32*s+2*disrow];
}
}


void sendoneline(void)
{ char s;
uc inc;
if(col<8) inc=0;
else inc=1;
for(s=7+inc;s>=0+inc;s--)
{ SBUF=twoonebyte(BUFF[s]BUFF[s+1]);
while(!TI);
TI=0;
}
}

main()
{ uc i;
col=0;word=0;
while(1)
{ while(col<16)
{ for(i=0;i { for(disrow=0;disrow<16;disrow++)
{ loadoneline();
sendoneline();
P1=0x10+disrow;//disrow是干什么的?   给74HC138的输入提供数据
delay(20);
P1=0x20+disrow;//

}
// P1=0X10;
}
col++;
}
col=0;word=word+32;
if(word>=832) word=0;
}
}





uc code HZ[]=
{
0X000X000X000X000X000X000X000X000X000X000X000X000X000X000X000X00
0X000X000X000X000X000X000X000X000X000X000X000X000X000X000X000X00

0X000X000X000X000X000X000X000X000X000X000X000X000X000X000X000X00
0X000X000X000X000X000X000X000X000X000X000X000X000X000X000X000X00

0x010x000x010x000x020x800x040x400x080x200x120x180x210x8E0xC00x84
0x000x000x1F0xF00x000x200x000x200x000x400x000x400x000x800x010x00/*“今“0*/

0x000x000x3F0xFC0x010x000x010x000x010x000x010x000x7F0xFE0x010x00
0x010x000x020x800x020x400x040x200x080x180x100x0E0x200x040x400x00/*“天“1*/

0x000x000x0F0xF00x080x100x0F0xF00x080x100x0F0xF00x000x000xFF0xFE
0x010x000x090x000x090xF80x090x000x150x000x230x000x400xFE0x000x00/*“是“2*/

0x040x400x060x200x0C0x180x180x0C0x200x240x480x300x040x200x040x40
0x020x400x010x800x010x800x020x400x040x200x180x180x200x0E0xC00x04/*“父“3*/

0x020x000x010x000x3F0xFC0x080x200x040x300x040x400x7F0xFE0x010x00
0x010x000x3F0xFC0x010x000x110x200x190x180x210x0C0x450x080x020x00/*“亲“4*/

0x040x200x040x200xFF0xFE0x040x200x040x200x000x000x3F0xF80x020x08
0x020x080x020x080x020x080x020x280x020x100x020x000x020x000x020x00/*“节“5*/

0x000x000x000x000x000x000x000x000x000x000x000x000x600x600x200xC0/*““6*/
0x000x000x000x000x000x000x000x000x000x000x000x000x600x600x200xC0

0x3F0xFE0x210x000x270xF80x240x080x270xF80x240x080x270xF80x200x40
0x220x480x2C0xC40x200x400x4A0x840x4A0x420x9A0x120x010xF00x000x00/*“愿“7*/

0x000x000x3F0xFC0x010x000x010x000x010x000x010x000x7F0xFE0x010x00
0x010x000x020x800x

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      90942  2009-06-21 21:28  最新点阵屏\点阵屏\16v16点阵.BMP

     文件     104412  2009-06-21 20:45  最新点阵屏\点阵屏\16v16点阵.DSN

     文件       1078  2009-06-29 09:09  最新点阵屏\点阵屏\16v16点阵.PWI

     文件        653  2009-05-15 17:42  最新点阵屏\点阵屏\f.PWI

     文件     104412  2009-06-21 11:50  最新点阵屏\点阵屏\Last Loaded 16v16点阵.DBK

     文件       5815  2009-06-21 21:00  最新点阵屏\点阵屏\led

     文件       6768  2009-06-21 21:00  最新点阵屏\点阵屏\led.c

     文件       3918  2009-06-21 21:00  最新点阵屏\点阵屏\led.hex

     文件      10963  2009-06-21 21:00  最新点阵屏\点阵屏\led.LST

     文件       7548  2009-06-21 21:00  最新点阵屏\点阵屏\led.M51

     文件       5931  2009-06-21 21:00  最新点阵屏\点阵屏\led.OBJ

     文件       1684  2009-06-21 21:27  最新点阵屏\点阵屏\led.Opt

     文件        195  2009-06-21 21:28  最新点阵屏\点阵屏\led.plg

     文件       2038  2009-06-21 11:09  最新点阵屏\点阵屏\led.Uv2

     文件       1683  2009-06-21 11:50  最新点阵屏\点阵屏\led_Opt.Bak

     文件       2157  2009-06-20 21:53  最新点阵屏\点阵屏\led_Uv2.Bak

     文件       5115  2009-06-20 22:45  最新点阵屏\点阵屏\STARTUP.A51

     文件      11679  2009-06-21 21:00  最新点阵屏\点阵屏\STARTUP.LST

     文件        749  2009-06-21 21:00  最新点阵屏\点阵屏\STARTUP.OBJ

     文件      63463  2009-06-21 10:43  最新点阵屏\点阵屏.rar

     目录          0  2009-06-29 09:09  最新点阵屏\点阵屏

     目录          0  2009-06-22 19:38  最新点阵屏

----------- ---------  ---------- -----  ----

               431203                    22


评论

共有 条评论

相关资源