16X64点阵屏显示

发布者:幸福自在最新更新时间:2016-09-20 来源: eefocus关键字:16X64  点阵屏显示 手机看文章 扫描二维码
随时随地手机看文章
16X64点阵屏显示 - fxxklp2@126 - 阿康的博客
 

 

#include
#define uchar unsigned char 
#define uint unsigned int
sbit shp=P1^0;
sbit stp=P1^1;
sbit ds=P1^2;
uchar i,j,k;
uchar code table[][32]={
      {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,0x84,0x26,0x7E,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
      },
      {
        0x01,0x00,0x21,0x08,0x11,0x0C,0x09,0x10,0x09,0x20,0x01,0x04,0xFF,0xFE,0x04,0x40,
       0x04,0x40,0x04,0x40,0x04,0x40,0x08,0x40,0x08,0x42,0x10,0x42,0x20,0x3E,0x40,0x00
      },
      {
        0x10,0x80,0x10,0x80,0x51,0x04,0x51,0xFE,0x52,0x00,0x54,0x80,0x58,0x60,0x50,0x24,
        0x57,0xFE,0x54,0x44,0x54,0x44,0x54,0x44,0x54,0x44,0x14,0x44,0x17,0xFC,0x14,0x04
      }
};
void delay(uint t)
{
  uchar m,k;
  for(m=0;m      for(k=0;k<20;k++);
}
void sendled(uchar kk)
{
 uchar q,temp;
  temp=kk;
   for(q=0;q<8;q++)
      { shp=0;
        ds=temp&0x80; 
        shp=1;
        temp=temp<<1;
      }
}
void display(uchar *data1,uchar *data2,uchar *data3,uchar *data4)
{
   for(i=0;i<16;i++)
       {  sendled(data4[2*i]);sendled(data4[2*i+1]);
          sendled(data3[2*i]);sendled(data3[2*i+1]);
          sendled(data2[2*i]);sendled(data2[2*i+1]);
          sendled(data1[2*i]);sendled(data1[2*i+1]);
          stp=0;
          delay(1);
          P2=i;
          stp=1;
          delay(20);
       } 
}
void main()
{
  
  while(1)
     {  
       display(table[0],table[1],table[2],table[3]);
     }
}


关键字:16X64  点阵屏显示 引用地址:16X64点阵屏显示

上一篇:单片机制作简易定时器
下一篇:4X4键盘测试程序

小广播
添点儿料...
无论热点新闻、行业分析、技术干货……
设计资源 培训 开发板 精华推荐

最新单片机文章
何立民专栏 单片机及嵌入式宝典

北京航空航天大学教授,20余年来致力于单片机与嵌入式系统推广工作。

换一换 更多 相关热搜器件
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved