熱門: 51單片機(jī) | 24小時(shí)必答區(qū) | 單片機(jī)教程 | 單片機(jī)DIY制作 | STM32 | Cortex M3 | 模數(shù)電子 | 電子DIY制作 | 音響/功放 | 拆機(jī)樂園 | Arduino | 嵌入式OS | 程序設(shè)計(jì)
![]() |
發(fā)布時(shí)間: 2014-12-12 19:35
正文摘要:51單片機(jī)128×64液晶顯示多功能萬年歷采用12864液晶屏顯示,DS18B20采集溫度,DS1302芯片實(shí)時(shí)記錄時(shí)間(單片斷電仍可以正常計(jì)時(shí)),按鍵調(diào)整溫度及陽歷農(nóng)歷的切換,蜂鳴器整點(diǎn)報(bào)時(shí)。51單片機(jī)128×64液晶顯示多功能 ... |
感謝樓主的無私分享。 |
這根本不配套吧,感覺,圖和下載的文件感覺不是一個(gè)呢,明顯不對 |
真漂亮,PCB做的也好 |
感謝樓主的無私分享。 |
謝謝@!資料不是很全 |
真逗 附件跟你描述的一樣嗎? 管理也不關(guān)一下 |
怎樣才能下載資料 |
熱轉(zhuǎn)印線路板做完像篩子,有辦法解決嗎? |
12864是不帶字庫的嗎 |
不錯(cuò)不錯(cuò),學(xué)習(xí)。。。。。。。。。。。。。。。。。。。 |
先看看 |
學(xué)習(xí)學(xué)習(xí) |
受教了 學(xué)習(xí)到了 |
能顯示大數(shù)字就好了 |
看起來不錯(cuò) |
積分少,資料不全不敢下載,以免浪費(fèi)了![]() |
看起來不錯(cuò),就是資料不全啊 |
謝謝分享 |
頂頂頂 |
下面是源碼: #include <reg52.h> #define uchar unsigned char #define uint unsigned int uchar fen,shi,miao,miao1,fen1,fen2,shi1,shi2,count,tt; uchar code mm[]={0x14,0x00,};//秒點(diǎn)數(shù)組 uchar code TAB[]= { 0x7F,0x41,0x7F,0x00,//0 0x42,0x7F,0x40,0x00,//1 0x79,0x49,0x4F,0x00,//2 0x49,0x49,0x7F,0x00,//3 0x0F,0x08,0x7F,0x00,//4 0x4F,0x49,0x79,0x00,//5 0x7F,0x49,0x79,0x00,//6 0x01,0x01,0x7F,0x00,//7 0x7F,0x49,0x7F,0x00,//8 0x4F,0x49,0x7F,0x00,//9 };//數(shù)字組 uchar code lie[]= { 0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f, }; //列掃描 uchar code TAB2[]={ /*-- 空白區(qū) --*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*-- 文字: 李 --*/ /*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=16x16 --*/ 0x00,0x80,0x00,0x80,0x3F,0xFE,0x01,0xC0,0x02,0xA0,0x0C,0x90,0x70,0x8C,0x27,0xFB, 0x01,0x00,0x00,0x80,0x7F,0xFE,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xA0,0x00,0x40, /*-- 文字: 斯 --*/ /*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=16x16 --*/ 0x30,0x44,0x0E,0x44,0x02,0xFF,0x02,0x44,0x02,0x7C,0x7E,0x44,0x12,0x44,0x12,0x7C, 0x12,0x44,0x12,0x44,0x12,0xFF,0x12,0x00,0x11,0x24,0x11,0x46,0x10,0xC1,0x10,0x00, /*-- 文字: 羽 --*/ /*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=16x16 --*/ 0x00,0x00,0x3F,0x7E,0x20,0x40,0x20,0x40,0x22,0x44,0x24,0x48,0x24,0x48,0x20,0x60, 0x28,0x50,0x24,0x48,0x23,0x46,0x20,0x40,0x20,0x40,0x20,0x40,0x28,0x50,0x10,0x20, /*-- 文字: 小 --*/ /*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=16x16 --*/ 0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x02,0x90,0x04,0xB0,0x08,0x98,0x18,0x88, 0x30,0x84,0x60,0x82,0x20,0x81,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xA0,0x00,0x40, /*-- 文字: 寶 --*/ /*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=16x16 --*/ 0x00,0x40,0x00,0x80,0x7F,0xFE,0x20,0x02,0x10,0x01,0x1F,0xFC,0x00,0x80,0x00,0x80, 0x00,0x80,0x1F,0xF8,0x02,0x80,0x04,0x80,0x0C,0x80,0x04,0x80,0x7F,0xFE,0x00,0x00, /*-- 文字: 貝 --*/ /*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=16x16 --*/ 0x00,0x00,0x0F,0xF8,0x08,0x08,0x08,0x08,0x08,0x88,0x08,0x88,0x08,0x88,0x08,0x88, 0x08,0x88,0x08,0x88,0x08,0x88,0x01,0x40,0x06,0x20,0x18,0x18,0x10,0x06,0x00,0x00, /*-- 文字: 我 --*/ /*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=16x16 --*/ 0x02,0x60,0x0A,0x1C,0x12,0x10,0x12,0x10,0x02,0x10,0x7F,0xFF,0x02,0x10,0x12,0x10, 0x14,0x70,0x0C,0x1C,0x04,0x13,0x0A,0x10,0x49,0x90,0x50,0x10,0x60,0x14,0x40,0x08, /*-- 文字: 愛 --*/ /*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=16x16 --*/ 0x1F,0x00,0x09,0xFC,0x08,0x48,0x04,0x90,0x7F,0xFC,0x40,0x44,0x00,0x42,0x3F,0xFC, 0x00,0x20,0x0F,0xE0,0x04,0x30,0x02,0xD0,0x03,0x08,0x0C,0xC6,0x70,0x31,0x20,0x0C, /*-- 文字: 你 --*/ /*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=16x16 --*/ 0x00,0x90,0x01,0x90,0x20,0x88,0x7F,0xC8,0x20,0x44,0x12,0x2C,0x02,0x16,0x0A,0x45, 0x12,0xC4,0x12,0x44,0x22,0x24,0x62,0x24,0x22,0x14,0x02,0x84,0x01,0x04,0x00,0x00, /*-- 空白區(qū) --*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, }; uchar code lie2[]={ 0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80, }; /****************** 延時(shí)程序 *****************/ void delay(uint k) { uint i,j; for(i=k;i>0;i--) for(j=110;j>0;j--); } /****************** 顯示程序 *****************/ void disp8_1(uchar m) { uint e; for(e=0;e<4;e++) { P0=lie[e]; P1=lie[e+8]; P2=TAB[m*4+e]; delay(1); P2=0x00; //消影 } } void disp8_2(uchar n) { uint f; for(f=0;f<4;f++) { P0=lie[f+4]; P1=lie[f+8+4]; P2=TAB[n*4+f]; delay(1); P2=0x00; //消影 } } void disp8_3(uchar o) { uint g; for(g=0;g<4;g++) { P0=lie[g+9]; P1=lie[g+8+9]; P2=TAB[o*4+g]; delay(1); P2=0x00; //消影 } } void disp8_4(uchar p) { uint h; for(h=0;h<4;h++) { P0=lie[h+13]; P1=lie[h+8+13]; P2=TAB[p*4+h]; delay(1); P2=0x00; //消影 } } void disp8_5(uchar q) { uint h; for(h=0;h<2;h++) { P0=lie[h+7]; P1=lie[h+7+8]; P2=mm[q]; //秒點(diǎn) delay(1); P2=0x00; //消影 } } void disp_wz() { uint a,b,c; P2=0x01; for(a=0;a<152;a++) //掃描全幅 { for(b=0;b<8;b++) //移動(dòng)速度 { for(c=0;c<8;c++) //掃描1幀 { P2=lie2[c]; P1=~TAB2[2*c+2*a]; P0=~TAB2[2*c+1+2*a]; delay(1); P1=0xff; //消影 P0=0xff; //消影 } } } tt=0;//開始顯示時(shí)鐘 } /****************** 初始化程序 *****************/ inti() { tt=0; shi=1; fen=3; miao=0; miao1=0; shi1=shi/10;//分離時(shí) shi2=shi%10; fen1=fen/10;//分離分 fen2=fen%10; P1=0xff; TMOD=0x01; TH0=(65536-45872)/256; TL0=(65536-45872)%256; EA=1; ET0=1; TR0=1; } /****************** 主程序 *****************/ void main() { inti(); while(1) { if(tt<=20) { disp8_1(shi2);//顯示小時(shí) disp8_2(shi1);//顯示小時(shí) disp8_3(fen2);//顯示分鐘 disp8_4(fen1);//顯示分鐘 disp8_5(miao);//秒點(diǎn)顯示 } else { disp_wz(); } } } /****************** 中斷程序 *****************/ void timer0() interrupt 1 { shi1=shi%10;//分離時(shí) shi2=shi/10; fen1=fen%10;//分離分 fen2=fen/10; TH0=(65536-45872)/256; TL0=(65536-45872)%256; count++; if(count==10) { count=0; tt++; miao++; miao1++; if(miao==2){miao=0;} if(miao1==120) { miao1=0; fen++; if(fen==60) { fen=0; shi++; if(shi==24){shi=0;} } } } } |
Powered by 單片機(jī)教程網(wǎng)