找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 10258|回复: 4
收起左侧

LED点阵左移程序(汉字显示)的问题

[复制链接]
ID:1 发表于 2008-8-27 01:09 | 显示全部楼层 |阅读模式

请帮我写一下LED点阵左移程序(汉字显示)!源程序在下面!请高手帮帮忙!请高手帮我看看!!!!!!!!!!!
//同
0x00,0x3F,0x3F,0x28,0x29,0x29,0x29,0x29,0x29,0x29,0x28,0x7F,0x7F,0x20,0x00,0x00,
0x00,0xFE,0xFE,0x00,0xF0,0xF0,0x20,0x20,0xF0,0xF4,0x06,0xFE,0xFC,0x00,0x00,0x00,
//一
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,
//个
0x01,0x01,0x03,0x06,0x0C,0x18,0x73,0x73,0x18,0x0C,0x06,0x02,0x03,0x01,0x01,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
//世
0x04,0x04,0x3F,0x3F,0x04,0x04,0x7F,0x7F,0x04,0x04,0x7F,0x7F,0x04,0x04,0x04,0x00,
0x00,0x00,0xFE,0xFE,0x02,0x02,0xF2,0xF2,0x22,0x22,0xF2,0xF2,0x06,0x06,0x02,0x00,
//界
0x00,0x00,0x00,0x3E,0x3E,0x2B,0x2B,0x3E,0x3E,0x2B,0x2B,0x7E,0x7E,0x20,0x00,0x00,
0x00,0x22,0x22,0x66,0xCC,0xF8,0x70,0x00,0x00,0x7E,0xFE,0xC0,0x60,0x60,0x40,0x00,
//同
0x00,0x3F,0x3F,0x28,0x29,0x29,0x29,0x29,0x29,0x29,0x28,0x7F,0x7F,0x20,0x00,0x00,
0x00,0xFE,0xFE,0x00,0xF0,0xF0,0x20,0x20,0xF0,0xF4,0x06,0xFE,0xFC,0x00,0x00,0x00,
//一
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,
//个
0x01,0x01,0x03,0x06,0x0C,0x18,0x73,0x73,0x18,0x0C,0x06,0x02,0x03,0x01,0x01,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
//梦
0x00,0x11,0x13,0x16,0x7F,0x7F,0x14,0x12,0x16,0x7F,0x7F,0x1C,0x16,0x13,0x01,0x00,
0x00,0x02,0x12,0x12,0x32,0xFA,0xDE,0x44,0x4C,0x58,0x70,0x60,0x40,0x00,0x00,0x00,
//想
0x08,0x09,0x0B,0x7F,0x7F,0x0B,0x09,0x3F,0x3F,0x2A,0x2A,0x2A,0x7F,0x7F,0x20,0x00,
0x80,0x84,0x1C,0xD8,0xFC,0x3E,0x22,0xF2,0xDA,0x8A,0x8E,0xAE,0xB0,0x98,0x08,0x00,
取模方式为纵向取模,字节正序,每个字由32个字节构成,其中每个字的两行代码中 上下相对的两个字节为一列!即一个扫描码!从左至右共16个扫描码!点阵扫描方式为列扫描,
             /**********单字显示********/
   for(j=0;j<10;j++)
   {
    for(k=0;k<230;k++)
    {
     for(i=0;i<16;i++)
     {
      P1=i;//0~15为4-16译码器的的16个状态!
      P2=tab[i+j*32];//上半屏8位的数据
      delay(1);
      P3=tab[i+16+j*32];//下半屏8位的数据
      delay(1);
     }
    }
   }
这是单个字显示的程序!请高手帮我写一下LED点阵左移程序!小弟技术有限!实在想不出了!期待高手的回复!谢谢!
[此贴子已经被作者于2008-8-27 1:12:26编辑过]
回复

使用道具 举报

ID:1 发表于 2008-8-27 01:10 | 显示全部楼层
我帮群里一人问的,各位知道的 回复下啊
回复

使用道具 举报

ID:4611 发表于 2008-8-28 00:55 | 显示全部楼层

谢谢楼主的帮助!本人已将问题解决!问题的关键在于字模的排序!方法是将每个字的上半行合并成一个数组 命名为 tabs[],下半行合并成一个数组 命名为tabx[],希望能给以后研究点阵的朋友们一些帮助和参考!再次感谢楼主!

回复

使用道具 举报

ID:66501 发表于 2014-11-13 15:44 | 显示全部楼层
掘墓高手,专挖古墓,一挖一个坑,坑坑见墓。。
回复

使用道具 举报

ID:141497 发表于 2017-4-23 14:26 | 显示全部楼层
谢谢,我在写左移程序,给我提供了一个编程思路。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表