• PUDN用户
    了解作者
  • C/C++
    开发工具
  • 36KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 7
    下载次数
  • 2009-11-28 09:38
    上传日期
16*16点阵显示汉字,可以左移,可以调节速度等
2.rar
  • 2
  • 1.DSN
    104.6KB
  • STARTUP.A51
    6.2KB
  • STARTUP.OBJ
    750B
  • LED_dis.OBJ
    7.5KB
  • LED_dis.LST
    8.9KB
  • LED_dis.c
    4.8KB
  • LED_dis.M51
    8.4KB
  • LED_dis_Opt.Bak
    1KB
  • LED_dis
    7.5KB
  • LED_dis.plg
    412B
  • LED_dis_Uv2.Bak
    0B
  • LED_dis.hex
    4.1KB
  • STARTUP.LST
    10.5KB
  • LED_dis.Uv2
    2.1KB
  • LED_dis.lnp
    47B
  • LED_dis.Opt
    1KB
内容介绍
/******************************************************************************** 工程名称:16*16点阵扫描显示汉字 创建日期:2009-11-21 说明:16*16点阵的的列(即阴极)通过4-16译码器接P1低四位,上8行接P0口, P1.7-P1.0接点阵的第1-8行,下8行接P2口,P2.7-P2.0接点阵的9-16行 按键接在P3.1 ********************************************************************************/ #include<reg51.h> #include<string.h> #define uchar unsigned char #define row P1 //行选线,P1低四位,列 #define line0 P0//上8行IO #define line1 P2//下8行IO; sbit Con_Speed=P3^1; uchar count=10;//count控制左移速度 uchar j=0,left;//left表示左移 uchar code date1[][32]= {//"福"字模 0x20,0x00,0x17,0xFC,0x10,0x00,0x03,0xF8,0xFA,0x08,0x0A,0x08,0x13,0xF8,0x38,0x00, 0x57,0xFC,0x94,0x44,0x14,0x44,0x17,0xFC,0x14,0x44,0x14,0x44,0x17,0xFC,0x14,0x04, //"州"字模 0x10,0x04,0x10,0x84,0x10,0x84,0x10,0x84,0x54,0xA4,0x52,0x94,0x51,0x8C,0x90,0x84, 0x10,0x84,0x10,0x84,0x10,0x84,0x10,0x84,0x10,0x84,0x20,0x84,0x40,0x04,0x00,0x04, //大字模 0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x04,0xFF,0xFE,0x01,0x00,0x02,0x80, 0x02,0x80,0x02,0x40,0x04,0x40,0x04,0x20,0x08,0x10,0x10,0x0E,0x60,0x04,0x00,0x00, //学字模 0x22,0x08,0x11,0x08,0x11,0x10,0x00,0x20,0x7F,0xFE,0x40,0x02,0x80,0x04,0x1F,0xE0, 0x00,0x40,0x01,0x84,0xFF,0xFE,0x01,0x00,0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00, //物字模 0x11,0x00,0x11,0x00,0x51,0x00,0x51,0x04,0x7B,0xFE,0x54,0xA4,0x90,0xA4,0x1C,0xA4, 0x31,0x24,0xD1,0x44,0x12,0x44,0x12,0x44,0x14,0x84,0x10,0x84,0x11,0x28,0x10,0x10, //理字模 0x00,0x08,0x13,0xFC,0xFA,0x48,0x22,0x48,0x23,0xF8,0x22,0x48,0xFA,0x48,0x23,0xF8, 0x20,0x40,0x20,0x50,0x23,0xF8,0x3C,0x40,0xE0,0x40,0x40,0x44,0x0F,0xFE,0x00,0x00, //与字模 0x10,0x00,0x10,0x00,0x10,0x08,0x1F,0xFC,0x10,0x00,0x10,0x00,0x10,0x08,0x1F,0xFC, 0x00,0x08,0x00,0x08,0x00,0x48,0xFF,0xE8,0x00,0x08,0x00,0x08,0x00,0x50,0x00,0x20, //信字模 0x08,0x80,0x08,0x44,0x0F,0xFE,0x10,0x00,0x10,0x08,0x37,0xFC,0x50,0x00,0x90,0x08, 0x17,0xFC,0x10,0x00,0x13,0xF8,0x12,0x08,0x12,0x08,0x12,0x08,0x13,0xF8,0x12,0x08, //息字模 0x02,0x00,0x04,0x10,0x1F,0xF8,0x10,0x10,0x10,0x10,0x1F,0xF0,0x10,0x10,0x1F,0xF0, 0x10,0x10,0x10,0x10,0x1F,0xF0,0x02,0x00,0x51,0x84,0x50,0x92,0x90,0x12,0x0F,0xF0, //工字模 0x00,0x00,0x00,0x08,0x7F,0xFC,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00, 0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x04,0xFF,0xFE,0x00,0x00,0x00,0x00, //程字模 0x00,0x00,0x05,0xFC,0xF9,0x04,0x11,0x04,0x11,0x04,0xFF,0x04,0x11,0xFC,0x38,0x00, 0x37,0xFE,0x50,0x20,0x50,0x20,0x91,0xFC,0x10,0x20,0x10,0x20,0x17,0xFE,0x10,0x00, //学字模 0x22,0x08,0x11,0x08,0x11,0x10,0x00,0x20,0x7F,0xFE,0x40,0x02,0x80,0x04,0x1F,0xE0, 0x00,0x40,0x01,0x84,0xFF,0xFE,0x01,0x00,0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00, //院字模 0x00,0x80,0x78,0x40,0x4F,0xFE,0x54,0x02,0x58,0x14,0x63,0xF8,0x50,0x00,0x48,0x08, 0x4F,0xFC,0x48,0xA0,0x68,0xA0,0x50,0xA0,0x40,0xA2,0x41,0x22,0x42,0x1E,0x44,0x00, //欢字模 0x00,0x80,0x00,0x80,0xFC,0x80,0x04,0xFC,0x45,0x04,0x46,0x48,0x28,0x40,0x28,0x40, 0x10,0x40,0x28,0x40,0x24,0xA0,0x44,0xA0,0x81,0x10,0x01,0x08,0x02,0x0E,0x0C,0x04, //迎字模 0x00,0x00,0x41,0x80,0x26,0x7C,0x14,0x44,0x04,0x44,0x04,0x44,0xF4,0x44,0x14,0xC4, 0x15,0x44,0x16,0x54,0x14,0x48,0x10,0x40,0x10,0x40,0x28,0x46,0x47,0xFC,0x00,0x00, //您字模 0x09,0x00,0x09,0x00,0x13,0xFC,0x12,0x04,0x34,0x48,0x59,0x40,0x91,0x50,0x12,0x4C, 0x14,0x44,0x11,0x40,0x10,0x80,0x02,0x00,0x51,0x84,0x50,0x92,0x90,0x12,0x0F,0xF0, //!字模 0x00,0x00,0x01,0x80,0x03,0xC0,0x03,0xC0,0x03,0xC0,0x03,0xC0,0x03,0xC0,0x01,0x80, 0x01,0x80,0x01,0x80,0x00,0x00,0x01,0x80,0x03,0xC0,0x01,0x80,0x00,0x00,0x00,0x00, }; void Delay_100us(uchar j)//延时100us; { uchar i; for(;j>0;j--) for(i=0;i<10;i++) ; } void Delay_10ms(void)//延时10ms { uchar i,j; for(i=0;i<250;i++) for(j=0;j<200;j++) ; } void Key_Scan(void)//按键控制左移速度 { if(Con_Speed==0) Delay_10ms(); if(Con_Speed==0) { if(count>40) count=10; else count+=5; } while(!Con_Speed)//等待按键弹起 ; } void display(void)//16*16点阵显示函数 { uchar i,m,temp; uchar seg[]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; for(j=0;j<17;j++) { Key_Scan(); for(left=0;left<=16;left++) { for(m=0;m<count;m++)//左移速度控制 { if(j==16) temp=0; else temp=j+1; for(i=0;i<16;i++) { if(left<8) { line0=(date1[j][2*i]<<left)|(date1[j][2*i+1]>>(8-left)); line1 = (date1[j][2*i+1]<<left)|(date1[temp][2*i]>>(8-left)); } else { line0=(date1[j][2*i+1]<<(left-8))|(date1[temp][2*i]>>(16-left)); line1=(date1[temp][2*i]<<(left-8))|(date1[temp][2*i+1]>>(16-left)); } row=seg[i]; Delay_100us(10); line0=0; line1=0; } } } } } void main(void) { line0=0xff; line1=0xff; row=0x0f; while(1) { display(); } }
评论
    相关推荐
    • 点阵广告屏.zip
      实现了电子广告牌的各种功能,内含proteus仿真文件和kiel编程文件
    • 点阵.rar
      可以实现静态显示 左移显示 右移显示 上移显示
    • 单片机C52/16*16点阵左移
      这是一个16*16的点阵显示屏程序,可调速和左移,有原理图,希望大家喜欢
    • LED点阵左移显示程序.zip
      ◎说明: 1 无线射频,手机电路,电视家电,信号处理,电源电路等电路图应有尽有。 2 PCB使用教程,PCB使用技巧,PCB布线规则,PCB layout经验资料丰富精彩。 3 各类电子课件,电子教材,测量仪表,嵌入式技术,制造...
    • 16x64点阵显示
      本设计基于51单片机对点阵的开发,用8个74HC595芯片来进行行驱动,用两片74LS138芯片进行列驱动,程序用C语言编写,其中设计了三种图案,利用srand和rand函数产生随机数,使三种图案随机展示,每种图案的显示次数...
    • 16X16点阵显示屏,实现左移
      基于AT89C52单片机控制的16X16点阵屏,可实现左移效果
    • P10点阵左移驱动程序
      P10单元板的驱动源码,有左移程序和解释,里面有不少可供参考~~ 51单片机的 易读 可移植性很强 希望可以帮到你们
    • 16*64点阵左移程序
      51单片机驱动16*64点阵4字屏点阵左移显示,里面有仿真文件可直接仿真,采用74HC154+595驱动,内附有取模软件!
    • 点阵模块测试程序.zip
      16*16点阵左移。这时一个简单的LED点阵16*16的测试程序
    • C51单片机双字中文点阵设计.rar
      AT89C51单片机双字中文点阵设计与仿真