新聞中心

EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 用STC12C5A60S2直驅(qū)一個(gè)16*16LED點(diǎn)陣顯示屏

用STC12C5A60S2直驅(qū)一個(gè)16*16LED點(diǎn)陣顯示屏

作者: 時(shí)間:2016-11-29 來(lái)源:網(wǎng)絡(luò) 收藏
看到51hei的壇子有壇友做的16X16LED漢字顯示屏,作為生日禮物表情意,我也想著做一個(gè)!以滿足動(dòng)手愛(ài)好!

用AT89C52的,驅(qū)動(dòng)電路復(fù)雜得不得了,32個(gè)三極管,32個(gè)電阻啊!焊得頭到暈啊!還要個(gè)4-16譯碼電路!!!!!!
幸好有愛(ài)情的力量,為那個(gè)哥們辛苦為感動(dòng)!

本文引用地址:http://m.butianyuan.cn/article/201611/323408.htm

我呢,有STC12C5A60S2這個(gè)單片機(jī)的"神器",比AVR的還好.價(jià)不貴,才7元/片!有AD,PWM,端口四態(tài),可最大驅(qū)動(dòng)20MA電流!60KB的程序FLASH ROM.爽YY啊.一個(gè)簡(jiǎn)單電路就可以做成16X16的LED了. 8X8的雙色是我2元/片淘來(lái)的!只用到了紅色的!
電路簡(jiǎn)潔無(wú)比,就是一個(gè)單片機(jī),四片8*8LED點(diǎn)陣,一個(gè)12M晶振,2個(gè)30P電容,(12M晶振,2個(gè)30P電容,可以省的.,便為了能在線下載,加上去方便下載程序)
電路這么簡(jiǎn)單,也是受到杜洋老師的影響,我這個(gè)還是列驅(qū)動(dòng),實(shí)測(cè)電流35MA,運(yùn)行一個(gè)晚上,芯片安全.就不費(fèi)心思研究杜老師的點(diǎn)驅(qū)動(dòng)了!!!

程序也是學(xué)別人的,改了下就能用,C就是好啊!匯編的話,估計(jì)沒(méi)那么方便!

//  本程序演示 STC12C5A60S2 系列直驅(qū)四個(gè)8*8LED點(diǎn)陣組成16X16點(diǎn)陣 //  //改編:桃源客, 日期: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字符,作流動(dòng)開(kāi)始用. 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,/*"愛(ài)",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,/*"機(jī)",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,/*"愛(ài)",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,/*"數(shù)",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,/*"數(shù)",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,/*"樂(lè)",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 , 宋體 ) */ 
				
            
                
			
							
上一頁(yè) 1 2 下一頁(yè)

評(píng)論


技術(shù)專區(qū)

關(guān)閉