点阵程序

单片机点阵程序

应用介绍

点阵程序

#include<AT89X52.H>

sbit ST=P3^5;

sbit E1=P3^4;

sbit MR=P3^7;

char cashe[12];

char code wd[12][16]={

{0xFF,0xC0,0xFE,0xFE,0xFE,0xFE,0x80,0xFE,0xFD,0xFD,0xFB,0xF7,0xEF,0xDF,0x3F,0xFF},

{0xFF,0x03,0xFF,0xFF,0xFF,0xFF,0x01,0x7F,0x7F,0x7F,0x7F,0x7F,0x7D,0x7D,0x81,0xFF},/*"无",0*/

/* (16 X 16 , 宋体 )*/

{0xDF,0xDF,0xDF,0xCF,0x57,0x58,0x5F,0xDF,0xDE,0xDE,0xDE,0xDD,0xDD,0xDB,0xDB,0xD7},

{0x7F,0x6F,0x73,0x77,0x7F,0x01,0x5F,0x5F,0xDF,0xDF,0xDF,0xDF,0xDD,0xDD,0xE1,0xFF},/*"忧",1*/

/* (16 X 16 , 宋体 )*/

{0xFE,0xFE,0xFE,0xC0,0xDE,0xDE,0xC0,0xDE,0xDE,0xDE,0xC0,0xDE,0xFE,0xFE,0xFF,0xFF},

{0xFF,0xFF,0xFF,0x07,0xF7,0xF7,0x07,0xF7,0xF7,0xF7,0x07,0xF7,0xFD,0xFD,0x01,0xFF},/*"电",2*/

/* (16 X 16 , 宋体 )*/

{0xFF,0xC0,0xFF,0xFF,0xFF,0xFE,0xFE,0xFE,0x00,0xFE,0xFE,0xFE,0xFE,0xFE,0xFA,0xFD},

{0xFF,0x0F,0xDF,0xBF,0x7F,0xFF,0xFF,0xFB,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*"子",3*/

/* (16 X 16 , 宋体 )*/

{0xFF,0x83,0xBB,0xAB,0xAA,0xAA,0xA9,0xAB,0xAB,0xAA,0xEE,0xD7,0xDB,0xBB,0x7F,0xFF},

{0x7F,0x3F,0x7F,0x01,0xFD,0xFD,0xBD,0xBD,0x5D,0xED,0x05,0xED,0xFD,0xFD,0xEB,0xF7},/*"购",4*/

/* (16 X 16 , 宋体 )*/

{0xEF,0xEF,0xAF,0xAE,0x82,0xAD,0x6B,0xEB,0xE6,0xCD,0x2B,0xEF,0xEE,0xED,0xEB,0xFF},

{0x7F,0x7F,0x7F,0x03,0xAB,0xAB,0x6B,0x6B,0xDB,0xDB,0xBB,0x7B,0xFB,0xFB,0xD7,0xEF},/*"物",5*/

/* (16 X 16 , 宋体 )*/

};

void del(int i)//============================//延时程序

{while(i--);}

aline() ////=======================发送一行的显示程序

{

char i=0;

TI=0;

for(i=0;i<12;i++)

{SBUF=cashe[i];while(~TI);TI=0;} //将缓存中的信息转存入595的存储器中,到此不显示

}

main()

{

int m=0,n=0;

TI=0;

SM0=0;

SM1=0;

E1=0;

while(1)

for(m=0;m<16;m++)      //共有16行  循环16次显示这16行  串行的595送出行的数据

{ //由74hc154选中要显示的行

for(n=0;n<12;n++)         //这个for循环用来向缓存数组中装载要显示的内容

{cashe[11-n]=wd[n][m];}  //将第m个字的第n行信息装载  ,因为595串接 数据第一个进去的会在最后一个595中,最后进去的会在第一个595中

    aline();     //将缓存中的一行信息载入595缓存中

ST=0;ST=1; //595产生上升沿 输出595锁存的数据

P2=m;  //选中要显示的行输出数据

      

del(100);//延时一段时间,以造成视觉暂存效应

  }

}

文件列表(部分)

名称 大小 修改日期
16X192点阵程序.DSN26.14 KB2019-06-24
16X192点阵程序.PWI0.36 KB2019-06-24
chengxu1.92 KB2019-06-24
chengxu.c0.95 KB2019-06-24
chengxu.hex0.49 KB2019-06-24
chengxu.lnp0.06 KB2019-06-24
chengxu.LST1.50 KB2019-06-24
chengxu.M511.14 KB2019-06-24
chengxu.OBJ1.75 KB2019-06-24
chengxu.Opt0.51 KB2019-06-24
chengxu.plg0.34 KB2019-06-24
chengxu.Uv20.87 KB2019-06-24
chengxu.__i0.04 KB2019-06-24
chengxu_Opt.Bak0.52 KB2019-06-24
chengxu_Uv2.Bak0.00 KB2019-06-24
STARTUP.A511.73 KB2019-06-24
STARTUP.LST1.70 KB2019-06-24
STARTUP.OBJ0.43 KB2019-06-24
Last Loaded 16X192点阵程序.DBK26.14 KB2019-06-24
ASC.PTL0.13 KB2019-06-24
Gb2312.PTL9.92 KB2019-06-24
notice.txt1.10 KB2019-06-24
PCtoLCD2002.exe83.03 KB2019-06-24
PCtoLCD2002.INI0.34 KB2019-06-24
RTL60.BPL211.26 KB2019-06-24
VCL60.BPL391.02 KB2019-06-24
取模设置.bmp66.04 KB2019-06-24
keil0.00 KB2019-06-24
取字模0.00 KB2019-06-24
0002、16X192点阵程序0.00 KB2019-06-24

立即下载

相关下载

[点阵程序] 单片机点阵程序

评论列表 共有 0 条评论

暂无评论

微信捐赠

微信扫一扫体验

立即
上传
发表
评论
返回
顶部