新聞中心

EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > 51單片機(jī)驅(qū)動16*16點陣顯示生日快樂程序

51單片機(jī)驅(qū)動16*16點陣顯示生日快樂程序

作者: 時間:2016-11-30 來源:網(wǎng)絡(luò) 收藏
自己親手做的一個點陣屏 仿真+實物,送給女朋友的生日禮物單片機(jī)+液晶顯示帶仿真文件


妞都狠喜歡這個了,顯示生日快樂4個字然后還有心型,還有i love you,全部源碼和仿真文件的下載地址是:http://www.51hei.com/bbs/dpj-18851-1.html

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

下面是部分源碼預(yù)覽:
#include
#include
#define din P3_2
#define load P3_3
#define clk P3_4
#define uchar unsigned char
#define uint unsigned int
unsigned char code dispcode[]={0x7e,0x30,0x6d,0x79,0x33,0x5b,0x5f,0x70,0x7f,0x7b,0x01};
uchar buf[]={0,0,0,0,0,0,0,0};
SYSTEMTIME time1;
unsigned char code tab1[]={
0x0F,0x00,0x1F,0x80,0x3F,0xC0,0x7F,0xE0,
0x7F,0xF0,0x7F,0xF8,0x3F,0xFC,0x1F,0xFE,
0x1F,0xFE,0x3F,0xFC,0x7F,0xF8,0x7F,0xF0,
0x7F,0xE0,0x3F,0xC0,0x1F,0x80,0x0F,0x00,//心型圖

0x00,0x80,0x01,0x02,0x06,0x02,0x78,0x82,
0x08,0x82,0x08,0x82,0x08,0x82,0x08,0x82,
0xFF,0xFE,0x48,0x82,0x08,0x82,0x08,0x82,
0x19,0x82,0x08,0x86,0x00,0x02,0x00,0x00,/*"生",2*/

0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFC,
0x42,0x08,0x42,0x08,0x42,0x08,0x42,0x08,
0x42,0x08,0x42,0x08,0x42,0x08,0x7F,0xFC,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"日",3*/

0x0E,0x00,0x00,0x00,0xFF,0xFF,0x10,0x00,
0x0D,0x01,0x11,0x02,0x11,0x0C,0x11,0x70,
0xFF,0x80,0x11,0x60,0x11,0x10,0x11,0x0C,
0x1F,0x06,0x01,0x03,0x01,0x02,0x00,0x00,/*"快",4*/

0x00,0x00,0x00,0x04,0x02,0x18,0x3F,0x30,
0x22,0xE0,0x22,0x48,0x22,0x04,0x62,0x02,
0x5F,0xFC,0x42,0x00,0xC2,0x00,0xC2,0x40,
0x42,0x30,0x02,0x1C,0x00,0x08,0x00,0x00,/*"樂",5*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x3F,0x8C,0x7F,0xDE,
0x7F,0xDE,0x3F,0x8C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//!

0x00,0x00,0x42,0xFE,0x42,0x02,0x7E,0x00,
0x42,0xFE,0x42,0x82,0x00,0xFE,0x00,0x00,
0x00,0xFC,0x00,0x02,0x7E,0xFC,0x02,0x00,
0x02,0xFE,0x02,0x92,0x7E,0x92,0x00,0x00,//I LOVE U

0xE0,0x07,0x8F,0xF1,0x98,0x19,0x30,0x0C,
0x64,0x46,0x48,0x22,0x44,0x12,0x40,0x12,
0x40,0x12,0x44,0x12,0x48,0x22,0x64,0x46,
0x30,0x0C,0x98,0x19,0x8F,0xF1,0xE0,0x07,//笑臉
};
unsigned char code tab2[]={ 0x0f,0x0e,0x0d,0x0c,0x0b,0x0a,0x09,0x08,
0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00};
uchar code tab3[]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01,0x03,0x06,
0x0c,0x18,0x30,0x60,0xe0,0x70,0x38,0x1c,0x0e,0x07,
0x0f,0x1f,0x3e,0x7c,0xf8,0xfc,0x7e,0x3f,0x7f,0xfe,
0xff,0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f,0x3f,
0x9f,0xcf,0xe7,0xf3,0xf9,0xfc,0xf8,0xf1,0xe3,0xc7,
0x8f,0x1f,0x0f,0x87,0xc3,0xe1,0xf0,0xe0,0xc1,0x83,
0x07,0x03,0x81,0xc0,0x80,0x01,0x00,
0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00,0x01,0x03,
0x07,0x0f,0x1f,0x3f,0x7f,0xff,0xe7,0xc3,0x81,0x00,
0x81,0xc3,0xe7,0xff,0xfe,0xfd,0xfb,0xf7,0xef,0xdf,
0xbf,0x7f,0x7e,0x7d,0x7b,0x77,0x6f,0x5f,0x3f,0x3e,
0x3d,0x3b,0x37,0x2f,0x1f,0x1e,0x1d,0x1b,0x17,0x0f,
0x0e,0x0d,0x0b,0x07,0x06,0x05,0x03,0x02,0x01,0x00,
0x55,0xaa,0x55,0xaa,0x00,0xff,0x00,0xff,0x00,0xff,};
sbit KAI=P1^4;
sbit KAI2=P1^5;
void delay(uint time);
uint j=0,q=0;
uchar r,t=0,num=0;
void csh()
{
load=1;
clk=1;
din=1;
}


上一頁 1 2 下一頁

評論


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

關(guān)閉