各种花样的数字led灯点阵加上下左右柱形滚动组合

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

/****************************************************************************** ***********

*

*

*LED点阵实验(流动显示1 2 3 4 5 6 7 8 9) *

*说明通过P0 和P2 作为点阵接口

*

*要求学员掌握LED点阵的工作原理和各点阵脚的定义及接法,具体接线请参考接线说明*

*我们采用的LED点阵式是低功耗,在做实验时可以用单片机脚直接驱动

*

******************************************************************************* ***********/

#include

unsigned char code taba[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};

unsigned char code tabb[]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};

unsigned char code digittaba[73][8]={

{0X00,0X00,0X00,0X00,0X08,0X00,0X00,0X00}, //0

{0X00,0X00,0X00,0X14,0X22,0X14,0X00,0X00},

{0X00,0X00,0X3E,0X41,0X41,0X41,0X3E,0x00},

{0X18,0X08,0X00,0X00,0X00,0X00,0X00,0X00}, //1

{0X08,0X18,0X08,0X00,0X00,0X00,0X00,0X00},

{0X08,0X08,0X18,0X08,0X00,0X00,0X00,0X00},

{0X08,0X08,0X08,0X18,0X08,0X00,0X00,0X00},

{0X08,0X08,0X08,0X08,0X18,0X08,0X00,0X00},

{0X1C,0X08,0X08,0X08,0X08,0X18,0X08,0X00},

{0X00,0X00,0X00,0X21,0X7F,0X01,0X00,0X00},

{0X00,0X00,0X10,0X10,0X10,0X10,0X10,0X00}, //2

{0X00,0X00,0XE0,0XA0,0XA0,0XA0,0X20,0X00},

{0X00,0X00,0X38,0X28,0X28,0X28,0XC8,0X00},

{0X00,0X00,0X4E,0X8A,0X8A,0X8A,0X72,0X00},

{0X00,0X00,0X27,0X45,0X45,0X45,0X39,0X00},

{0X00,0X00,0X00,0X1c,0X1c,0X1c,0X00,0X00}, //

{0X00,0X00,0X2e,0X28,0X3e,0X0a,0X3a,0X00},

{0X00,0X4F,0X48,0X48,0X7F,0X09,0X09,0X79},

{0X00,0X4F,0X48,0X48,0X7F,0X09,0X09,0X79},

{0XFF,0XFF,0XD5,0XD5,0X0D5,0XC1,0Xff,0XFF}, //hei 3 {0XFF,0XFF,0XD5,0X2D5,0XD5,0XC1,0Xff,0XFF},

{0XFF,0XFF,0XD5,0XD5,0XD5,0XC1,0Xff,0XFF},

{0X00,0X00,0X22,0X49,0X49,0X49,0X36,0X00}, //liang 3 {0X08,0X10,0X20,0X40,0X00,0X00,0X00,0X00}, //4

{0X08,0X18,0X28,0X48,0X08,0X08,0X08,0X00},

{0X08,0X18,0X28,0X48,0X7F,0X08,0X08,0X00},

{0x00,0x00,0x72,0x51,0x51,0x51,0x4e,0x00}, //5

{0X00,0X00,0X20,0X40,0X40,0X40,0X20,0X00}, //6

{0X00,0X00,0X30,0X40,0X40,0X00,0X00,0X00},

{0X00,0X00,0X38,0X40,0X40,0X00,0X00,0X00},

{0X00,0X00,0X3c,0X40,0X00,0X00,0X00,0X00},

{0X00,0X00,0X3E,0X00,0X00,0X00,0X00,0X00},

{0X00,0X00,0X1E,0X01,0X00,0X00,0X00,0X00},

{0X00,0X00,0X0E,0X01,0X01,0X00,0X00,0X00},

{0X00,0X00,0X06,0X01,0X01,0X01,0X00,0X00},

{0X00,0X00,0X02,0X01,0X01,0X01,0X02,0X00},

{0X00,0X00,0X00,0X01,0X01,0X01,0X06,0X00},

{0X00,0X00,0X00,0X00,0X01,0X09,0X06,0X00},

{0X00,0X00,0X00,0X00,0X08,0X09,0X06,0X00},

{0X00,0X00,0X00,0X08,0X08,0X08,0X06,0X00},

{0X00,0X00,0X00,0X08,0X08,0X09,0X06,0X00},

{0X00,0X00,0X00,0X08,0X09,0X09,0X06,0X00},

{0X00,0X00,0X00,0X09,0X09,0X09,0X06,0X00},

{0X00,0X00,0X02,0X09,0X09,0X09,0X06,0X00},

{0X00,0X00,0X06,0X09,0X09,0X09,0X06,0X00},

{0X00,0X00,0X0E,0X09,0X09,0X09,0X06,0X00},

{0X00,0X00,0X1E,0X09,0X09,0X09,0X06,0X00},

{0X00,0X00,0X3E,0X09,0X09,0X09,0X06,0X00},

{0X00,0X00,0X3E,0X49,0X09,0X09,0X06,0X00},

{0X00,0X00,0X3E,0X49,0X49,0X09,0X06,0X00},

{0X00,0X00,0X3E,0X49,0X49,0X49,0X06,0X00},

{0X00,0X00,0X3E,0X49,0X49,0X49,0X26,0X00},

{0X00,0X00,0X00,0X40,0X00,0X4A,0X20,0X00}, //7 {0X00,0X00,0X40,0X00,0X40,0X05,0X50,0X00},

{0X00,0X00,0X40,0X40,0X40,0X4F,0X70,0X00},

相关文档
最新文档