您的位置 首页 软件

用STC12C5A60S2直驱一个16*16LED点阵显示屏

看到51hei的坛子有坛友做的16X16LED汉字显示屏,作为生日礼物表情意,我也想着做一个!以满足动手爱好!用AT89C52的,驱动电路复杂得不得了,32个

看到51hei的坛子有坛友做的16X16LED汉字显示屏,作为生日礼物表心意,我也想着做一个!以满意着手喜好!

用AT89C52的,驱动电路杂乱得不得了,32个三极管,32个电阻啊!焊得头到晕啊!还要个4-16译码电路!!!!!!
幸好有爱情的力气,为那个哥们辛苦为感动!

我呢,有STC12C5A60S2这个单片机的”神器”,比AVR的还好.价不贵,才7元/片!有AD,PWM,端口四态,可最大驱动20MA电流!60KB的程序FLASH ROM.爽YY啊.一个简略电路就能够做成16X16的LED了. 8X8的双色是我2元/片淘来的!只用到了赤色的!
电路简练无比,便是一个单片机,四片8*8LED点阵,一个12M晶振,2个30P电容,(12M晶振,2个30P电容,能够省的.,便为了能在线下载,加上去便利下载程序)
电路这么简略,也是遭到杜洋教师的影响,我这个仍是列驱动,实测电流35MA,运转一个晚上,芯片安全.就不费心思研讨杜教师的点驱动了!!!

程序也是学他人的,改了下就能用,C便是好啊!汇编的话,估量没那么便利!

//  本程序演示 STC12C5A60S2 系列直驱四个8*8LED点阵组成16X16点阵 //  //改编:桃源客, 日期:2010-9-19 //--------------------------------------------------------------------- //#include  #include  #include "STC12C5A60s2.H" //--------------------------------------------------------------------- typedef    unsigned char   uchar; typedef    unsigned int    uint; //以下字模为PC2LCD2000生成,选"阴码,逆向"方法. uchar code zimo1[1088]={ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0 x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0 x00,0x00,  //留一行空白16X16字符,作活动开端用. 0x20,0x04,0x20,0x04,0x22,0x42,0x22,0x82, 0xFE,0x7F,0x21,0x01,0x21,0x01,0x20,0x10, 0x20,0x10,0xFF,0x08,0x20,0x07,0x22,0x1A, 0xAC,0x21,0x20,0x40,0x20,0xF0,0x00,0x00,/*"我",0*/ /* (16 X 16 , 宋体 ) */ 0x00,0x40,0x40,0x20,0xB2,0xA0,0x96,0x90, 0x9A,0x4C,0x92,0x47,0xF6,0x2A,0x9A,0x2A, 0x93,0x12,0x91,0x1A,0x99,0x26,0x97,0x22, 0x91,0x40,0x90,0xC0,0x30,0x40,0x00,0x00,/*"爱",1*/ /* (16 X 16 , 宋体 ) */ 0x00,0x08,0x00,0x08,0xF8,0x0B,0x28,0x09, 0x29,0x09,0x2E,0x09,0x2A,0x09,0xF8,0xFF, 0x28,0x09,0x2C,0x09,0x2B,0x09,0x2A,0x09, 0xF8,0x0B,0x00,0x08,0x00,0x08,0x00,0x00,/*"单",2*/ /* (16 X 16 , 宋体 ) */ 0x00,0x80,0x00,0x40,0x00,0x30,0xFE,0x0F, 0x10,0x01,0x10,0x01,0x10,0x01,0x10,0x01, 0x10,0x01,0x1F,0x01,0x10,0x01,0x10,0xFF, 0x10,0x00,0x18,0x00,0x10,0x00,0x00,0x00,/*"片",3*/ /* (16 X 16 , 宋体 ) */ 0x08,0x04,0x08,0x03,0xC8,0x00,0xFF,0xFF, 0x48,0x00,0x88,0x41,0x08,0x30,0x00,0x0C, 0xFE,0x03,0x02,0x00,0x02,0x00,0x02,0x00, 0xFE,0x3F,0x00,0x40,0x00,0x78,0x00,0x00,/*"机",4*/ /* (16 X 16 , 宋体 ) */ 0x00,0x00,0x00,0x00,0x00,0x58,0x00,0x38, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*",",5*/ /* (16 X 16 , 宋体 ) */ 0x20,0x04,0x20,0x04,0x22,0x42,0x22,0x82, 0xFE,0x7F,0x21,0x01,0x21,0x01,0x20,0x10, 0x20,0x10,0xFF,0x08,0x20,0x07,0x22,0x1A, 0xAC,0x21,0x20,0x40,0x20,0xF0,0x00,0x00,/*"我",6*/ /* (16 X 16 , 宋体 ) */ 0x00,0x40,0x40,0x20,0xB2,0xA0,0x96,0x90, 0x9A,0x4C,0x92,0x47,0xF6,0x2A,0x9A,0x2A, 0x93,0x12,0x91,0x1A,0x99,0x26,0x97,0x22, 0x91,0x40,0x90,0xC0,0x30,0x40,0x00,0x00,/*"爱",7*/ /* (16 X 16 , 宋体 ) */ 0x10,0x42,0x92,0x42,0x54,0x2A,0x38,0x2E, 0xFF,0x13,0x38,0x1A,0x54,0x26,0x52,0x02, 0x80,0x40,0xF0,0x20,0x1F,0x13,0x12,0x0C, 0x10,0x33,0xF0,0x60,0x10,0x20,0x00,0x00,/*"数",8*/ /* (16 X 16 , 宋体 ) */ 0x02,0x01,0x82,0x00,0xE2,0x7F,0x5E,0x10, 0x42,0x10,0xC2,0x3F,0x00,0x00,0x02,0x04, 0xFA,0x04,0x82,0x04,0x82,0x44,0x82,0x84, 0xFE,0x40,0x80,0x3F,0x00,0x00,0x00,0x00,/*"码",9*/ /* (16 X 16 , 宋体 ) */ 0x00,0x20,0x08,0x60,0x08,0x30,0x08,0x08, 0x08,0x18,0x08,0x24,0x09,0x24,0x0A,0x22, 0x0C,0x41,0x88,0x40,0x48,0x40,0x28,0x40, 0x1C,0x40,0x08,0x40,0x00,0x40,0x00,0x00,/*"之",10*/ /* (16 X 16 , 宋体 ) */ 0x00,0x00,0x18,0x29,0x04,0x29,0x14,0x15, 0x94,0x14,0x94,0x4A,0xD5,0x89,0xB6,0x44, 0x14,0x3F,0x14,0x06,0x94,0x09,0x04,0x09, 0x14,0x10,0x0C,0x30,0x04,0x10,0x00,0x00,/*"家",11*/ /* (16 X 16 , 宋体 ) */ 0x00,0x00,0x00,0x00,0x00,0x58,0x00,0x38, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*",",12*/ /* (16 X 16 , 宋体 ) */ 0x20,0x04,0x20,0x04,0x22,0x42,0x22,0x82, 0xFE,0x7F,0x21,0x01,0x21,0x01,0x20,0x10, 0x20,0x10,0xFF,0x08,0x20,0x07,0x22,0x1A, 0xAC,0x21,0x20,0x40,0x20,0xF0,0x00,0x00,/*"我",13*/ /* (16 X 16 , 宋体 ) */ 0x80,0x00,0x40,0x00,0xF0,0x7F,0x1C,0x00, 0x03,0x00,0xF0,0x7F,0x01,0x00,0x0E,0x00, 0x04,0x00,0x00,0x00,0x04,0x00,0x04,0x20, 0x04,0x40,0xFC,0x3F,0x00,0x00,0x00,0x00,/*"们",14*/ /* (16 X 16 , 宋体 ) */ 0x00,0x04,0x04,0x02,0x04,0x01,0xC4,0x7F, 0x64,0x00,0x9C,0x20,0x87,0x20,0x84,0x20, 0x84,0x20,0xE4,0x3F,0x84,0x20,0x84,0x20, 0x84,0x20,0x84,0x20,0x04,0x20,0x00,0x00,/*"在",15*/ /* (16 X 16 , 宋体 ) */ 0x40,0x80,0x42,0x40,0x44,0x20,0xCC,0x1F, 0x00,0x20,0x08,0x40,0x28,0x50,0x48,0x48, 0x89,0x44,0x0E,0x43,0xCA,0x44,0x38,0x48, 0x08,0x50,0x08,0x40,0x00,0x40,0x00,0x00,/*"这",16*/ /* (16 X 16 , 宋体 ) */ 0x00,0x40,0x00,0x40,0xFF,0x44,0x91,0x44, 0x91,0x44,0x91,0x44,0x91,0x44,0xFF,0x7F, 0x91,0x44,0x91,0x44,0x91,0x44,0x91,0x44, 0xFF,0x44,0x00,0x40,0x00,0x40,0x00,0x00,/*"里",17*/ /* (16 X 16 , 宋体 ) */ 0x00,0x02,0x10,0x02,0x10,0x82,0x10,0x42, 0x10,0x32,0xFE,0x1F,0x10,0x0A,0x10,0x02, 0x10,0x02,0x10,0x06,0xFE,0x0B,0x10,0x32, 0x10,0xE2,0x10,0x42,0x00,0x02,0x00,0x00,/*"共",18*/ /* (16 X 16 , 宋体 ) */ 0x00,0x00,0xFE,0xFF,0x02,0x00,0x12,0x00, 0x92,0x1F,0x92,0x08,0x92,0x08,0x92,0x08, 0x92,0x08,0x92,0x08,0x92,0x1F,0x12,0x40, 0x02,0x80,0xFE,0x7F,0x00,0x00,0x00,0x00,/*"同",19*/ /* (16 X 16 , 宋体 ) */ 0x00,0x08,0x04,0x08,0x04,0x09,0x74,0x09, 0x54,0x09,0x54,0x29,0x55,0x49,0x56,0x89, 0x54,0x7D,0x54,0x0B,0x54,0x0B,0x74,0x09, 0x04,0x08,0x04,0x08,0x00,0x08,0x00,0x00,/*"享",20*/ /* (16 X 16 , 宋体 ) */ 0x80,0x00,0x62,0x80,0x26,0x80,0x2A,0x41, 0x32,0x43,0x22,0x25,0x26,0x29,0x3A,0x11, 0x2B,0x11,0x21,0x2D,0x31,0x23,0x2F,0x40, 0xA5,0xC0,0x60,0x40,0x20,0x00,0x00,0x00,/*"受",21*/ /* (16 X 16 , 宋体 ) */ 0x10,0x42,0x92,0x42,0x54,0x2A,0x38,0x2E, 0xFF,0x13,0x38,0x1A,0x54,0x26,0x52,0x02, 0x80,0x40,0xF0,0x20,0x1F,0x13,0x12,0x0C, 0x10,0x33,0xF0,0x60,0x10,0x20,0x00,0x00,/*"数",22*/ /* (16 X 16 , 宋体 ) */ 0x02,0x01,0x82,0x00,0xE2,0x7F,0x5E,0x10, 0x42,0x10,0xC2,0x3F,0x00,0x00,0x02,0x04, 0xFA,0x04,0x82,0x04,0x82,0x44,0x82,0x84, 0xFE,0x40,0x80,0x3F,0x00,0x00,0x00,0x00,/*"码",23*/ /* (16 X 16 , 宋体 ) */ 0x80,0x00,0x64,0x00,0x24,0x00,0x24,0x3F, 0x3F,0x01,0x24,0x01,0x24,0x01,0xFF,0xFF, 0x24,0x01,0x24,0x11,0x24,0x21,0x3F,0x1F, 0xA4,0x00,0x64,0x00,0x24,0x00,0x00,0x00,/*"带",24*/ /* (16 X 16 , 宋体 ) */ 0x20,0x22,0x30,0x23,0xAC,0x22,0x63,0x12, 0x10,0x12,0x40,0x00,0x20,0x00,0x50,0x7E, 0x4C,0x42,0x43,0x42,0x44,0x42,0x48,0x42, 0x30,0x7E,0x60,0x00,0x20,0x00,0x00,0x00,/*"给",25*/ /* (16 X 16 , 宋体 ) */ 0x20,0x04,0x20,0x04,0x22,0x42,0x22,0x82, 0xFE,0x7F,0x21,0x01,0x21,0x01,0x20,0x10, 0x20,0x10,0xFF,0x08,0x20,0x07,0x22,0x1A, 0xAC,0x21,0x20,0x40,0x20,0xF0,0x00,0x00,/*"我",26*/ /* (16 X 16 , 宋体 ) */ 0x80,0x00,0x40,0x00,0xF0,0x7F,0x1C,0x00, 0x03,0x00,0xF0,0x7F,0x01,0x00,0x0E,0x00, 0x04,0x00,0x00,0x00,0x04,0x00,0x04,0x20, 0x04,0x40,0xFC,0x3F,0x00,0x00,0x00,0x00,/*"们",27*/ /* (16 X 16 , 宋体 ) */ 0x00,0x00,0xF8,0x7F,0x8C,0x10,0x8B,0x10, 0x88,0x10,0xF8,0x3F,0x40,0x00,0x30,0x00, 0x8F,0x00,0x08,0x03,0x08,0x26,0x08,0x40, 0x08,0x20,0xF8,0x1F,0x00,0x00,0x00,0x00,/*"的",28*/ /* (16 X 16 , 宋体 ) */ 0x70,0x00,0x00,0x00,0xFF,0xFF,0x08,0x00, 0xB0,0x80,0x88,0x40,0x88,0x30,0x88,0x0E, 0xFF,0x01,0x88,0x06,0x88,0x08,0x88,0x30, 0xF8,0x60,0x80,0xC0,0x80,0x40,0x00,0x00,/*"快",29*/ /* (16 X 16 , 宋体 ) */ 0x00,0x00,0x00,0x20,0x40,0x18,0xFC,0x0C, 0x44,0x07,0x44,0x12,0x44,0x20,0x46,0x40, 0xFA,0x3F,0x42,0x00,0x43,0x00,0x43,0x02, 0x42,0x0C,0x40,0x38,0x00,0x10,0x00,0x00,/*"乐",30*/ /* (16 X 16 , 宋体 ) */ 0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x5F, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"!",31*/ /* (16 X 16 , 宋体 ) */ 

声明:本文内容来自网络转载或用户投稿,文章版权归原作者和原出处所有。文中观点,不代表本站立场。若有侵权请联系本站删除(kf@86ic.com)https://www.86ic.net/qianrushi/ruanjian/255393.html

为您推荐

联系我们

联系我们

在线咨询: QQ交谈

邮箱: kf@86ic.com

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部