LED点阵屏程序.doc_第1页
LED点阵屏程序.doc_第2页
LED点阵屏程序.doc_第3页
LED点阵屏程序.doc_第4页
LED点阵屏程序.doc_第5页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

#include #include #include #define uchar unsigned char#define uint unsigned int #define PA XBYTE0x0000#define PB XBYTE0x0001#define PC XBYTE0x0002#define COM XBYTE0x0003 sbit Switch_74LS154 =P30;uchar data Row_Data32;uchar code Word_Set_OF_16x16320= /*海 CBAA3 */0x10,0x60,0x02,0x0C,0xC0,0x10,0x08,0xF7,0x14,0x54,0x94,0x14,0xF4,0x04,0x00,0x00,0x04,0x04,0x7C,0x03,0x00,0x01,0x1D,0x13,0x11,0x55,0x99,0x51,0x3F,0x11,0x01,0x00,/*上 CC9CF */0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x00,0x00,0x40,0x40,0x40,0x40,0x40,0x40,0x7F,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,/*生 CC9FA */0x80,0x40,0x30,0x1E,0x10,0x10,0x10,0xFF,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x40,0x40,0x42,0x42,0x42,0x42,0x42,0x7F,0x42,0x42,0x42,0x42,0x42,0x40,0x40,0x00,/*明 CC3F7 */0x00,0xFC,0x44,0x44,0x44,0xFC,0x00,0x00,0xFE,0x22,0x22,0x22,0x22,0xFE,0x00,0x00,0x00,0x0F,0x04,0x04,0x04,0x8F,0x40,0x30,0x0F,0x02,0x02,0x42,0x82,0x7F,0x00,0x00,/*月 CD4C2 */0x00,0x00,0x00,0xFE,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0xFE,0x00,0x00,0x00,0x80,0x40,0x30,0x0F,0x02,0x02,0x02,0x02,0x02,0x02,0x42,0x82,0x7F,0x00,0x00,0x00,/*天 CCCEC */0x40,0x40,0x42,0x42,0x42,0x42,0x42,0xFE,0x42,0x42,0x42,0x42,0x42,0x40,0x40,0x00,0x80,0x80,0x40,0x20,0x10,0x0C,0x03,0x00,0x03,0x0C,0x10,0x20,0x40,0x80,0x80,0x00,/*涯 CD1C4 */0x10,0x60,0x02,0x8C,0x00,0xFE,0x82,0x92,0x92,0x92,0xFE,0x92,0x92,0x92,0x82,0x00,0x04,0x04,0x7E,0x81,0x60,0x1F,0x40,0x48,0x48,0x48,0x7E,0x48,0x48,0x48,0x40,0x00,/*共 CB9B2 */0x00,0x00,0x10,0x10,0x10,0xFF,0x10,0x10,0x10,0x10,0xFF,0x10,0x10,0x10,0x00,0x00,0x00,0x04,0x84,0x44,0x24,0x17,0x04,0x04,0x04,0x04,0x17,0x24,0x44,0x84,0x04,0x00,/*此 CB4CB */0x00,0x00,0xF8,0x00,0x00,0xFF,0x20,0x20,0x00,0xFF,0x40,0x20,0x10,0x08,0x00,0x00,0x20,0x60,0x3F,0x20,0x10,0x1F,0x10,0x10,0x00,0x3F,0x40,0x40,0x40,0x40,0x78,0x00,/*时 CCAB1 */0x00,0xFC,0x84,0x84,0x84,0xFC,0x00,0x10,0x10,0x10,0x10,0x10,0xFF,0x10,0x10,0x00,0x00,0x3F,0x10,0x10,0x10,0x3F,0x00,0x00,0x01,0x06,0x40,0x80,0x7F,0x00,0x00,0x00 ;void Delay( uint k ) uchar i; while ( k- ) for(i=0;i120;i+);void Led_Display_Control() interrupt 1 uchar i; TH0=(65536-1000)/256; TL0=(65536-1000)%256; Switch_74LS154=1; i=(P1+1) & 0x0f; PA =Row_Datai; PB =Row_Datai+16; P1=i; Switch_74LS154 = 0; void main () uchar i,k,offset,rollup,h=1,j=1,v=1,p=1; COM =0x80; TMOD =0x01; TH0 =( 65536-1000)/256; TL0 = (65536-1000)%256; IE = 0x82; while(p-) for(k=0;k10;k+) for(rollup=0;rollup16;rollup+) for(i=0;i32;i+) if(rolluprollup|Word_Set_OF_16x16k*32+i+16(rollup-8)|Word_Set_OF_16x16k*32+i+32(16-rollup); TR0=1;Delay(100);TR0=0; while(v-) for(k=0;k10;k+) for(i=0;i32;i+) Row_Datai=0x00; for(i=0;i16;i+) Row_Datai=Word_Set_OF_16x16k*32+i;Row_Datai+16=Word_Set_OF_16x16k*32+i+16; TR0=1; Delay(50); TR0=0; P1=0xff; Switch_74LS154=1; Delay(400); while(h-) for(k=0;k10;k+) for(offset=0;offset16;offset+) for(i=0;i=16) Row_Datai+16=Word_Set_OF_16x16k*32+offset+i+32; Row_Datai=Word_Set_OF_16x16k*32+offset+i+16; else Row_Datai=Word_Set_OF_16x16k*32+offset+i; Row_Datai+16=Word_Set_OF_16

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论