視頻鏈接:https://www.bilibili.com/video/BV1Hv4y1f7Uq
#include
#include
#define uchar unsigned char
#define uint unsigned int
uchar ROG[64];
uchar ROG_buff[64];
uchar l_num=0;
uchar w_num;
int time;
bit flag;
uchar play_mode;
uchar stay_flag;
uchar hang[]=
{
0x00,0x01,0x00,0x02,0x00,0x04,0x00,0x08,0x00,0x10,0x00,0x20,0x00,0x40,0x00,0x80,
0x01,0x00,0x02,0x00,0x04,0x00,0x08,0x00,0x10,0x00,0x20,0x00,0x40,0x00,0x80,0x00,
};
uchar code lie[]=
{
0xFE,0xFF,0xFE,0xFF,0xFE,0xFF,0xFE,0xFF,0xFE,0xFF,0x00,0x01,0xFE,0xFF,0xFE,0xFF,
0xFD,0x7F,0xFD,0x7F,0xFB,0xBF,0xFB,0xBF,0xF7,0xDF,0xEF,0xEF,0xDF,0xF7,0x3F,0xF9,/*"大",0*/
0xFD,0xFF,0xFE,0xFF,0x80,0x01,0xBF,0xFD,0x7F,0xFB,0x80,0x03,0xFD,0xFF,0xF2,0xF7,
0x8E,0x6F,0xFD,0x5F,0xF3,0x3F,0x8E,0x5F,0xF9,0x67,0xE7,0x79,0x1D,0x7F,0xFE,0xFF,/*"家",1*/
0xEF,0xFF,0xEF,0x03,0xEF,0xFB,0xEF,0xF7,0x03,0xEF,0xDB,0xDF,0xDB,0xDF,0xDA,0x01,
0xDB,0xDF,0xB7,0xDF,0xD7,0xDF,0xEF,0xDF,0xD7,0xDF,0xBB,0xDF,0x7B,0x5F,0xFF,0xBF,/*"好",2*/
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xCF,0xFF,0xCF,0xFF,0xEF,0xFF,0xDF,0xFF,0xFF,0xFF,/*",",3*/
0xFB,0xBF,0xF1,0xAF,0x87,0xB7,0xF7,0xB7,0xF7,0xBF,0x00,0x01,0xF7,0xBF,0xF7,0xBB,
0xF5,0xBB,0xF3,0xB7,0xE7,0xCF,0x97,0xDD,0xF7,0xAD,0xF7,0x75,0xD4,0xF9,0xEF,0xFD,/*"我",4*/
0xE0,0x0F,0xEF,0xEF,0xEF,0xEF,0xE0,0x0F,0xEF,0xEF,0xEF,0xEF,0xE0,0x0F,0xFF,0xFF,
0x00,0x01,0xFE,0xFF,0xEE,0xFF,0xEE,0x07,0xEE,0xFF,0xD6,0xFF,0xBA,0xFF,0x7C,0x01,/*"是",5*/
0xF7,0xFF,0xE2,0x03,0x0E,0xFB,0xEE,0xFB,0xEE,0xFB,0x02,0x03,0xEF,0xFF,0xCF,0xFF,
0xC6,0x01,0xAB,0xDF,0xAB,0xDF,0x6E,0x03,0xEF,0xDF,0xEF,0xDF,0xEC,0x01,0xEF,0xFF,/*"程",6*/
0xEF,0xBF,0xEF,0xDF,0xDC,0x01,0x85,0xFD,0xB3,0xFB,0xB6,0x07,0xB7,0xFF,0xB7,0xFF,
0x84,0x01,0xB7,0x6F,0xB7,0x6F,0xB7,0x6F,0xB6,0xED,0x86,0xED,0xB5,0xF1,0xFB,0xFF,/*"皖",7*/
};
sbit sh0=P1^0;
sbit ds0=P1^1;
sbit st0=P1^2;
sbit sh1=P1^3;
sbit ds1=P1^4;
sbit st1=P1^5;
uchar i;
void delay(uchar z)
{
for(z;z>0;z--)
for(i=110;i>0;i--);
}
void send0(uchar temp0)
{
for(i=0;i8;i++)
{
sh0=0;
ds0=temp0&0x80;
temp0=temp0<1;
sh0=1;
}
}
void send1(uchar temp1)
{
for(i=0;i8;i++)
{
sh1=0;
ds1=temp1&0x80;
temp1=temp1<1;
sh1=1;
}
}
void Send_All(int A1,int A2,int B1,int B2)
{
send0(A1);
send1(B1);
st0=0;
st1=0;
st0=1;
st1=1;
send0(A2);
send1(B2);
st0=0;
st1=0;
st0=1;
st1=1;
}
void Show_One(uchar num)
{
uchar i=0,j,n;
for(j=0;j32;j++)
{
send0(hang[j]);
send1(lie[num*32+j]);
n++;
if(n==2)
{
st0=0;
st1=0;
st0=1;
st1=1;
n=0;
}
}
}
void Show_SX(uchar num)
{
uchar i=0,j,n;
int m,anw;
if(num==1){anw = 16;}
else{anw = num * 32;}
for(j=0;j32;j++)
{
send0(hang[j]);
send1(lie[j+m]);
n++;
while(stay_flag);
if(n==2)
{
st0=0;
st1=0;
st0=1;
st1=1;
n=0;
}
delay(1);
}
delay(1);
m+=2;
if(m==anw)m=0;
}
void Show_ZY(uchar num)
{
uchar i=0,j,n;
for(j=0;j32;j++)
{
send0(hang[j]);
send1(lie[num*32+j]);
n++;
if(n==2)
{
st0=0;
st1=0;
st0=1;
st1=1;
n=0;
}
}
}
void Show_data()
{
uchar i=0,j,n;
for(j=0;j32;j++)
{
send0(hang[j]);
send1(ROG[j]);
n++;
if(n==2)
{
st0=0;
st1=0;
st0=1;
st1=1;
n=0;
}
}
}
void Control(uchar num)
{
uchar i,j,m;
num = num*2;
time ++;
if(time == 5)
{
time = 0;
if(j==7)
{
j = 0;
if(l_num(8-j);
ROG[2*i+1] = ROG_buff[2*i+1]>(8-j);
}
}
while(stay_flag);
Show_data();
}
void main()
{
uchar m;
for(m=0;m64;m++)
{
ROG_buff[m] = 0xff;
}
while(1)
{
//Show_One(3);
// Control(7);
Show_SX(7);
}
}
#include
#include
#define uchar unsigned char
#define uint unsigned int
uchar ROG[64];
uchar ROG_buff[64];
uchar l_num=0;
uchar w_num;
int time;
bit flag;
uchar play_mode;
uchar stay_flag;
uchar hang[]=
{
0x00,0x01,0x00,0x02,0x00,0x04,0x00,0x08,0x00,0x10,0x00,0x20,0x00,0x40,0x00,0x80,
0x01,0x00,0x02,0x00,0x04,0x00,0x08,0x00,0x10,0x00,0x20,0x00,0x40,0x00,0x80,0x00,
};
uchar code lie[]=
{
0xFE,0xFF,0xFE,0xFF,0xFE,0xFF,0xFE,0xFF,0xFE,0xFF,0x00,0x01,0xFE,0xFF,0xFE,0xFF,
0xFD,0x7F,0xFD,0x7F,0xFB,0xBF,0x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0xEC,0x01,0xEF,0xFF,/*"程",6*/
0xEF,0xBF,0xEF,0xDF,0xDC,0x01,0x85,0xFD,0xB3,0xFB,0xB6,0x07,0xB7,0xFF,0xB7,0xFF,
0x84,0x01,0xB7,0x6F,0xB7,0x6F,0xB7,0x6F,0xB6,0xED,0x86,0xED,0xB5,0xF1,0xFB,0xFF,/*"皖",7*/
};
sbit sh0=P1^0;
sbit ds0=P1^1;
sbit st0=P1^2;
sbit sh1=P1^3;
sbit ds1=P1^4;
sbit st1=P1^5;
uchar i;
void delay(uchar z)
{
for(z;z>0;z--)
for(i=110;i>0;i--);
}
void send0(uchar temp0)
{
for(i=0;i8;i++)
{
sh0=0;
ds0=temp0&0x80;
temp0=temp0<1;
sh0=1;
}
}
void send1(uchar temp1)
{
for(i=0;i8;i++)
{
sh1=0;
ds1=temp1&0x80;
temp1=temp1<1;
sh1=1;
}
}
void Send_All(int A1,int A2,int B1,int B2)
{
send0(A1);
send1(B1);
st0=0;
st1=0;
st0=1;
st1=1;
send0(A2);
send1(B2);
st0=0;
st1=0;
st0=1;
st1=1;
}
void Show_One(uchar num)
{
uchar i=0,j,n;
for(j=0;j32;j++)
{
send0(hang[j]);
send1(lie[num*32+j]);
n++;
if(n==2)
{
st0=0;
st1=0;
st0=1;
st1=1;
n=0;
}
}
}
void Show_SX(uchar num)
{
uchar i=0,j,n;
int m,anw;
if(num==1){anw = 16;}
else{anw = num * 32;}
for(j=0;j32;j++)
{
send0(hang[j]);
send1(lie[j+m]);
n++;
while(stay_flag);
if(n==2)
{
st0=0;
st1=0;
st0=1;
st1=1;
n=0;
}
delay(1);
}
delay(1);
m+=2;
if(m==anw)m=0;
}
void Show_ZY(uchar num)
{
uchar i=0,j,n;
for(j=0;j32;j++)
{
send0(hang[j]);
send1(lie[num*32+j]);
n++;
if(n==2)
{
st0=0;
st1=0;
st0=1;
st1=1;
n=0;
}
}
}
void Show_data()
{
uchar i=0,j,n;
for(j=0;j32;j++)
{
send0(hang[j]);
send1(ROG[j]);
n++;
if(n==2)
{
st0=0;
st1=0;
st0=1;
st1=1;
n=0;
}
}
}
void Control(uchar num)
{
uchar i,j,m;
num = num*2;
time ++;
if(time == 5)
{
time = 0;
if(j==7)
{
j = 0;
if(l_num(8-j);
ROG[2*i+1] = ROG_buff[2*i+1]>(8-j);
}
}
while(stay_flag);
Show_data();
}
void main()
{
uchar m;
for(m=0;m64;m++)
{
ROG_buff[m] = 0xff;
}
while(1)
{
//Show_One(3);
// Control(7);
Show_SX(7);
}
}
審核編輯:湯梓紅
聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請聯(lián)系本站處理。
舉報投訴
-
嵌入式
+關(guān)注
關(guān)注
5082文章
19123瀏覽量
305143 -
Proteus
+關(guān)注
關(guān)注
79文章
1692瀏覽量
106573 -
點陣
+關(guān)注
關(guān)注
6文章
194瀏覽量
72503 -
點陣顯示
+關(guān)注
關(guān)注
0文章
18瀏覽量
8329
發(fā)布評論請先 登錄
相關(guān)推薦
16x16點陣原理圖
16x16點陣原理圖 16 16點陣采用了74HC138 ,74HC74等芯片。[此貼子已經(jīng)被作者于2008-10-27 11:4
發(fā)表于 10-27 11:38
Proteus 8 Professional制作16x16點陣屏詳細(xì)教程
自己制作了個Proteus 8 Professional制作16x16點陣屏詳細(xì)教程,也許對大家有用O(∩_∩)O!
發(fā)表于 11-30 19:52
單片機(jī)16x16點陣顯示漢字程序
單片機(jī)16x16點陣顯示漢字程序,51單片機(jī) 16X192點陣程序動態(tài)顯示任意漢字程序參考源代碼
發(fā)表于 07-14 07:10
10.1.9 一個16×16點陣漢字顯示
Proteus之一個16×16點陣漢字顯示,很好的Proteus資料,快來下載不學(xué)習(xí)吧。
發(fā)表于 04-18 17:11
?0次下載
Proteus之兩個16×16點陣漢字顯示
Proteus之兩個16×16點陣漢字顯示,很好的Proteus資料,快來下載不學(xué)習(xí)吧。
發(fā)表于 04-18 17:11
?0次下載
Proteus之兩個16×16點陣漢字分批顯示
Proteus之兩個16×16點陣漢字分批顯示,很好的Proteus資料,快來下載不學(xué)習(xí)吧。
發(fā)表于 04-18 17:11
?0次下載
使用8255芯片和74LS154設(shè)計的16X16點陣屏的仿真電路圖免費(fèi)下載
本文檔的主要內(nèi)容詳細(xì)介紹的是使用8255芯片和74LS154設(shè)計的16X16點陣屏的仿真電路圖免費(fèi)下載。
發(fā)表于 12-30 17:48
?22次下載
16X16點陣編寫技巧的思路
來說一下16X16點陣的編寫技巧,主要講一下思路,因為在寫16X16點陣驅(qū)動時,很多人一上來大腦一片空白啊,根本無從下手,我這里舉一個例子講下思路,以后大家可以按照我下面的思路來寫程序
16x16點陣滾動顯示漢字74HC595程序仿真原理圖驅(qū)動文件
16x16點陣滾動顯示漢字程序+仿真原理圖 74HC595驅(qū)動資料文件下載
發(fā)表于 08-29 10:16
?51次下載
評論