16-x-16-dot-matrix-display-screen.rar

  • HWPeng
    了解作者
  • C/C++
    开发工具
  • 29KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 2
    下载次数
  • 2014-04-01 18:27
    上传日期
16乘16点阵显示屏,通过算法实现多种效果文字图案
16-x-16-dot-matrix-display-screen.rar
  • 16×16
  • 1616.Opt
    1.6KB
  • STARTUP.A51
    6.2KB
  • STARTUP.OBJ
    749B
  • main.OBJ
    11.9KB
  • 1616.M51
    14.8KB
  • 1616_Opt.Bak
    1.6KB
  • 1616_Uv2.Bak
    2.2KB
  • 1616
    10.7KB
  • 1616.plg
    168B
  • 1616.lnp
    56B
  • main.LST
    14.7KB
  • STARTUP.LST
    13.7KB
  • main.c
    8.7KB
  • 1616.hex
    5.8KB
  • 1616.Uv2
    2.2KB
内容介绍
#include<reg52.h> #define uchar unsigned char #define uint unsigned int sbit SDA=P1^0; //数据位 sbit SCK=P1^3; //时钟位 sbit RCKx=P1^2; //时钟信号 sbit EN=P1^1; //使能 sbit CLEAR=P1^4; //同步清除 sbit ybit=P1^5; //74LS164输入位 sbit KEY2=P1^6; sbit KEY1=P1^7; //按键1 sbit KEY3=P2^0; sbit KEY4=P2^1; sbit KEY5=P2^2; uchar speed=10; uchar count=0; bit flg=1; uchar clk=0; code uint chartab[16]={0x0000,0x8CA6,0x92A9,0x92AF,0x92A8,0xEC46,0x0000,0x8809,0x8B69,0x8C99,0x7419,0x2419,0x2229,0x2146,0x2080,0x0000}; //"loveyou" code uint chartab[19][16]={0xFFBF,0xDFBB,0xE407,0xF7AF,0xFF9B,0xF801,0x0F7F,0xEEF7,0xEC03,0xEAF7,0xE6F7,0xEE07,0xEAF7,0xE6F7,0xEE07,0xFEF7, //"诸" 0xDFDF,0xDFD7,0xDFDB,0xD801,0x03DF,0xDBDF,0xDBDB,0xD85B,0xDB57,0xDB57,0xC36F,0x196F,0xBACF,0xFBB5,0xF775,0xEFF9, //“城” 0xFDFF,0xFEFF,0xFFFB,0x0001,0xFEFF,0xFEF7,0xC003,0xDEF7,0xDEF7,0xDEF7,0xDEF7,0xDEF7,0xDED7,0xDEEF,0xFEFF,0xFEFF, //“市” 0xFDFF,0xFEF7,0x8003,0xF7DF,0xFBBF,0xFD7F,0xFEFF,0xF93F,0xE7CF,0xDFD1,0x37DB,0xF7DF,0xF7DF,0xF7DF,0xEFDF,0xDFDF, //“齐” 0xFDFF,0xFDFF,0xFDFF,0xFDF7,0x8003,0xFDF7,0xFDF7,0xFDF7,0xFDF7,0xFDF7,0xFDF7,0xFBF7,0xFBF7,0xF777,0xF7AF,0x8FDF, //“力” 0xFDFF,0xBDF7,0xCC03,0xEBFF,0x7807,0x97FF,0xD80F,0xFFEF,0xEFEF,0xDFEF,0x1FEF,0xDFEF,0xDFEF,0xDFF5,0xDFF5,0xDFF9, //“汽” 0xFDFF,0xFDF7,0x8003,0xFBFF,0xF6FF,0xEEFF,0xDEDF,0xC00F,0xFEFF,0xFEFB,0x0001,0xFEFF,0xFEFF,0xFEFF,0xFEFF,0xFEFF, //“车” 0xFF77,0x8377,0xBB77,0xB6F7,0xB6F7,0xAC01,0xB2F7,0xB6F7,0xBAB7,0xBAD7,0xBAD7,0x96F7,0xAEF7,0xBEF7,0xBED7,0xBEEF, //“附” 0xEFBF,0xEFBF,0xEDBF,0xDDB7,0xDC03,0x9BBF,0x5BBF,0xD7BF,0xDFBB,0xC001,0xDFBF,0xDFBF,0xDFBF,0xDFBF,0xDFBF,0xDFBF, //“件” 0xFBFB,0xDBFB,0xDAFB,0xC05B,0xDBDB,0xBB5B,0x001B,0xFBDB,0xC05B,0xDB5B,0xDB5B,0xDB7B,0xD97B,0xDAFB,0xFBEB,0xFBF7, //“制” 0xFFBF,0xBDBF,0xCDAF,0xEC07,0xFBBF,0xFFBB,0x0801,0xEFF7,0xEC03,0xEDF7,0xEDF7,0xEDF7,0xEC07,0xD7F9,0xB803,0xFFFF, //“造” 0xFDFF,0xFDFB,0x0001,0xFBFF,0xFBEF,0xF007,0xF7EF,0xE7EF,0xD00F,0xB7EF,0x77EF,0xF00F,0xF7EF,0xF7EF,0xF7AF,0xF7DF, //“有” 0xFFF7,0x8203,0xBAF7,0xB6F7,0xB607,0xAEF7,0xB6F7,0xB607,0xBAFB,0xBA77,0xBAAF,0x96DF,0xAEEF,0xBEB1,0xBE7B,0xBEFF, //“限” 0xFFFF,0xFF7F,0xFB7F,0xFBBF,0xF7BF,0xF7DF,0xEEEF,0xDEF1,0x3DFB,0xFDFF,0xFBFF,0xF7BF,0xEFDF,0xE00F,0xFFEF,0xFFFF, //“公” 0xFFF7,0xC003,0xFFF7,0xFFB7,0x0017,0xFFF7,0xFF77,0xC037,0xDF77,0xDF77,0xDF77,0xDF77,0xC077,0xDF77,0xFFD7,0xFFEF, //“司” 0xFF7F,0xFF7F,0x037F,0xFB03,0xBAFB,0xB9B7,0xD7BF,0xD7BF,0xEFBF,0xD7BF,0xDB5F,0xBB5F,0x7EEF,0xFEF7,0xFDF1,0xF3FB, //“欢” 0xFFFF,0xBE7B,0xD981,0xEBBB,0xFBBB,0xFBBB,0x0BBB,0xEB3B,0xEABB,0xE9AB,0xEBB7,0xEFBF,0xEFBF,0xD7B9,0xB803,0xFFFF, //“迎” 0xF6FF,0xF6FF,0xEC03,0xEDFB,0xCBB7,0xA6BF,0x6EAF,0xEDB3,0xEBBB,0xEEBF,0xEF7F,0xFDFF,0xAE7B,0xAF6D,0x6FED,0xF00F, //“您” 0xFFBF,0xDFBB,0xE407,0xF7AF,0xFF9B,0xF801,0x0F7F,0xEEF7,0xEC03,0xEAF7,0xE6F7,0xEE07,0xEAF7,0xE6F7,0xEE07,0xFEF7,};//“诸” code uint chartabx[7][16]={0xdffb,0xe7fb,0xf6db,0x00db,0xfddb,0xbddb,0xdddb,0xebdb,0xebdb,0xf7db,0xf7db,0xebdb,0xddfb,0xbcfb,0x7eeb,0xfff7, 0xFEFF,0xFEFF,0xFEFB,0x0001,0xFEFF,0xFEFF,0xFEEF,0xC007,0xFFFF,0xFDFF,0xEE7F,0xAF7B,0xAFED,0x6FED,0xF00F,0xFFFF, 0xF7FF,0xB407,0xB6EF,0xB75F,0xB7BF,0xB75F,0xB4E1,0xE00B,0xEFEF,0xEEEF,0xEEEF,0xEEEF,0xEDEF,0xFD3F,0xF3CF,0xCFF7, 0xFF87,0xC07F,0xEEEF,0xF6DF,0x8001,0xBDFD,0x7DFB,0x8007,0xFBFF,0xF80F,0xF5DF,0xF6BF,0xEF7F,0xEE9F,0xDDE3,0xF3F7, 0xEFBF,0xEFDB,0xEC01,0xEFFF,0x0203,0xDAFB,0xDA03,0xDBFF,0xD801,0xB5FD,0xD603,0xEFDF,0xD7DF,0xBBDF,0x7B5F,0xFFBF, 0xEFBF,0xEFDB,0xEC01,0xEFFF,0x0203,0xDAFB,0xDA03,0xDBFF,0xD801,0xB5FD,0xD603,0xEFDF,0xD7DF,0xBBDF,0x7B5F,0xFFBF, 0xdffb,0xe7fb,0xf6db,0x00db,0xfddb,0xbddb,0xdddb,0xebdb,0xebdb,0xf7db,0xf7db,0xebdb,0xddfb,0xbcfb,0x7eeb,0xfff7,}; idata uint NumTab[16]={0x03,0x9f,0x25,0x0d,0x99,0x49,0x41,0x1f,0x01,0x09,0x11,0xc1,0x63,0x85,0x61,0x71}; //uint a[16]={0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xE7FF,0x99FF,0x99FF,0xE1FF,0x99FF,0x99FF,0x98FF,0xC0FF,0xFFFF,0xFFFF};//字母码“a” //uint b[16]={0xFFFF,0xFFFF,0xFFFF,0x9FFF,0x9FFF,0x9FFF,0x93FF,0x81FF,0x9DFF,0x9CFF,0x9CFF,0x9CFF,0x9DFF,0x83FF,0xFFFF,0xFFFF};//字母码“b” //uint c[16]={0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xE3FF,0xC9FF,0x99FF,0x9FFF,0x9FFF,0x9FFF,0xDDFF,0xC3FF,0xFFFF,0xFFFF};//字母码“c” //uint d[16]={0xFFFF,0xFFFF,0xFFFF,0xF9FF,0xFDFF,0xFDFF,0xE5FF,0xC9FF,0x9DFF,0x9DFF,0x9DFF,0x9DFF,0x99FF,0xC0FF,0xFFFF,0xFFFF};//字母码“d” //uint e[16]={0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xE7FF,0xC9FF,0x9DFF,0x80FF,0x81FF,0x9FFF,0xDDFF,0xE3FF,0xFFFF,0xFFFF};//字母码“e” //uint f[16]={0xFFFF,0xFFFF,0xFFFF,0xF0FF,0xECFF,0xEFFF,0x83FF,0x83FF,0xEFFF,0xEFFF,0xEFFF,0xEFFF,0xEFFF,0x83FF,0xFFFF,0xFFFF};//字母码“f” //uint g[16]={0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1A00,0x3700,0x6600,0x6600,0x3C00,0x6800,0x3E00,0x6700,0x4200,0x3E00}; //uint h[16]={0xFFFF,0xFFFF,0xFFFF,0x9FFF,0x9FFF,0x9FFF,0x93FF,0x81FF,0x9DFF,0x9DFF,0x9DFF,0x9DFF,0x9DFF,0x08FF,0xFFFF,0xFFFF}; //uint i[16]={0xFFFF,0xFFFF,0xFFFF,0xE7FF,0xF7FF,0xFFFF,0xC7FF,0xC7FF,0xE7FF,0xE7FF,0xE7FF,0xE7FF,0xE7FF,0xC1FF,0xFFFF,0xFFFF}; //uint j[16]={0xFFFF,0xFFFF,0xFFFF,0xF9FF,0xF9FF,0xFFFF,0xF1FF,0xF1FF,0xF9FF,0xF9FF,0xF9FF,0xF9FF,0xF9FF,0xF9FF,0xDBFF,0xC3FF}; //uint k[16]={0xFFFF,0xFFFF,0xDFFF,0x9FFF,0x9FFF,0x9FFF,0x99FF,0x99FF,0x97FF,0x87FF,0x87FF,0x93FF,0x99FF,0x88FF,0xFFFF,0xFFFF}; //uint l[16]={}; //uint m[16]={}; //uint n[16]={}; //uint o[16]={}; //uint p[16]={}; //uint q[16]={}; //uint r[16]={}; //uint s[16]={}; //uint t[16]={}; //uint u[16]={}; //uint v[16]={}; //uint w[16]={}; //uint x[16]={}; //uint y[16]={}; //uint z[16]={}; void delay(uint t) { uchar i; for(t;t>0;t--) { for(i=0;i<4;i++); } } void clr(void) { CLEAR=0; delay(5); CLEAR=1; } void off(void) { EN=1; } void on(void) { EN=0; } void showx(void) { RCKx=1; delay(2); RCKx=0; clk=clk+1; if(!(clk-16)) { clk=0; } } void sdbit(uchar a) { SDA=a; SCK=1; SCK=0; } void sdbyte(uint d) { uchar i; uint dat=0x00; clr(); for(i=0;i<16;i++) { dat=d&0x001; sdbit(dat); d>>=1; } } void DisNum (uint num,uint n) //10进制显示子程序(带延时) { uint num1; //定义第一位 uint num2; //定义第二位 uint num3; //定义第三位 uint num4; //定义第四位 num4=(num/1000); //第四位:千位 num3=(num%1000)/100; //第三位:百位 num2=(num%100)/10; //第二位:十位 num1=num%10; //第一位:个位 for(n;n>0;n--) //循环显示 { P0=0x00; P0=NumTab[num1]; //P1口:段码 //P2=0x0E; //P2口:位码 P3=0x01; delay(100); //延时 P0=0x00; //清零消鬼影 P0=NumTab[num2]; //P2=0x0D; P3=0x02; delay(100); P0=0x00; P0=NumTab[num3]; //P2=0x0B; P3=0x04; delay(100); P0=0x00; P0=NumTab[num4]; //P2=0x07; P3=0x08; delay(100); } } void main (void) { uint i; uint j; uint k; uchar n; uint tmp; idata uint chartab1[16]; idata uint chartab2[16]; while(1) { if(KEY3) { if(j>15) { j=0; n++; } if(n>17) n=0; if((j==0)||(!flg)) { for(k=0;k<16;k++) { chartab1[k]=chartab[n][k]; chartab2[k]=chartab[n+1][k]; } } flg=1; } else { if(j>15) { j=0; n++; } if(n>5) n=0; if((j==0)||flg) { for(k
评论
    相关推荐
    • DoT.rar
      MUSIC谱分解算法,For the MUSIC decomposition pseudospectrum PMUSIC(θ) where M = 6, d = λ/2, Set the vertical scale to be ?30 to 5 dB and horizontal scale to be ?85? to 85?.
    • DOT.zip
      vhdl code for DOT matrix
    • dot.rar
      ADAPTIVETHRESHOLD An adaptive thresholding algorithm that se
    • dot.zip
      c语言控制51单片机在16*16的点阵屏上显示文字
    • DOT.rar
      能用的1个MT4指标,大家放心使用,免费下载
    • immutability_dot.rar
      skinsharp皮肤设计软件,专业的易语言版本
    • dot.rar
      Tests regular expressions containing.
    • dot.rar
      從上到下掃描顯示綠色或紅色,同時亮的話顯示橘色
    • dot.zip
      VideoComm视频通信控件适用于VC++,VB,dot Net平台,C++Builder,Delphi,易语言,网页应
    • dot.rar
      2001年的程序设计大赛的题目我觉得比较难没有做出来!