這一陣剛休息閑著無(wú)聊制作8X8X8光立方,應(yīng)為是初學(xué)者有什么問題請(qǐng)見諒??!~~~
一、光立方的基本原理
利用人眼的暫留效應(yīng),利用單片機(jī)控制LED燈泡快速的閃爍,顯示出一個(gè)完整的圖案!
二、使用工具和材料
(一)、使用工具:1、焊槍(不用這么好的,隨便哪種便宜的也行)2、剝線鉗3、鋸子(要是相信自己的手工能力,就挑戰(zhàn)手鋸吧,手鋸便宜啊?。?、鋼尺5、電鉆6、電流表(主要用來(lái)測(cè)是否焊錯(cuò)的)7、鑷子8、熱熔膠槍(可有可無(wú))
(二)使用材料:1、單片機(jī)X1個(gè)2、最小系統(tǒng)X1個(gè)(帶寫入功能的,我這個(gè)是不帶的,應(yīng)為我有實(shí)驗(yàn)板)3、74hc136X9個(gè)4、74hc573X1個(gè)5、LED燈X516個(gè)(顏色無(wú)所謂)6、排插、排針多個(gè)(排插至少要兩排,做底盤需要64個(gè)點(diǎn))7、實(shí)驗(yàn)板(看大小購(gòu)買,夠用就行)8、熱縮管(不用太多,夠用就好)9、電線(這個(gè)要不少,看著來(lái)吧)10、20針插座1個(gè)、16針插座9個(gè)
(三)原件原理
1、74hc138:作用是用三位二進(jìn)制數(shù),來(lái)輸出只有一位為零的八位二進(jìn)制數(shù)
2、74hc573:鎖存器,在這次中沒用的什么功能,主要用來(lái)電流放大的,
OE、GNG直接地線,Vcc、LE直接接電源就行了。
三、--》電路圖
應(yīng)為是一個(gè)8X8X8的立體結(jié)構(gòu),用三軸坐標(biāo)系就可以分別控制單一一盞燈
74hc573(Y)控制Y軸
74hc138(Z)控制Z軸
74hc138(X1~X8)控制X軸
四、制作流程
現(xiàn)在開始正式制作了,前面全是準(zhǔn)備。
1、 彎LED燈的針腳,注意正負(fù)極不要搞錯(cuò)了,一共彎512個(gè),多彎上幾個(gè),作為備用的。
2、 制作定位板,井字形的間隔為20mm,8行8列共計(jì)64個(gè)點(diǎn),可以用紙張劃線代替。(我這個(gè)其實(shí)只有7*8個(gè)實(shí)在是沒大板子了!~~)
3、 用定位板焊接單一一排8個(gè),正極正極項(xiàng)鏈焊接,中間間隔20mm,一共焊64條。
4、 64個(gè)單條焊好后,用8個(gè)單條組成一個(gè)面,這時(shí)是負(fù)極與負(fù)極相連,每條之間的間距是20mm,焊接時(shí)順便調(diào)整陣腳,不要短路了。一共8面。
5、 焊好8面以后,就是測(cè)試環(huán)節(jié)了,負(fù)極串聯(lián)起來(lái),給每一行的正極單獨(dú)供一次電觀察有沒有短路、沒亮、亮度暗等問題的,及時(shí)更換,修理。
6、 制作插座,將排插剪開只留下中間的銅質(zhì)圓柱插座,直接焊接在實(shí)驗(yàn)板上,橫豎各8排,其中間隔20mm,共計(jì)64個(gè)點(diǎn)。焊好后背面每個(gè)點(diǎn)連出一條線,用以連接74hc138(X1~X8)。線路簡(jiǎn)單的梳理一下用東西暫時(shí)固定一下。然后在線的另一端用剪開的排針焊上一個(gè)插頭,以備后面連接使用,焊好后套上熱縮管(這些圖片都不是當(dāng)時(shí)照的,這是已經(jīng)鋸掉一半了,另一半和這一半一樣)
7、 將8個(gè)面插到低上,將橫向相鄰的正極彎好后直接焊道一起,注意之間的間隔是20mm,使每一層所有燈的正極是串聯(lián)在一起的,然后每一層單獨(dú)引出一條線(圖中的紅線),分別插在74Hc573(Y)的O0~O7口上。
8、 焊好后就可以放到一邊了,接下來(lái)就是焊控制電路了。
我們不用將芯片直接焊在實(shí)驗(yàn)板上,先焊插座,讓后將芯片插進(jìn)去,這樣就不會(huì)出現(xiàn)燒壞芯片的情況了。
74hc138(X1~X8)焊接在一塊將這8塊芯片的Vcc、E3全部串聯(lián)到一起用來(lái)輸入電壓,GND,E2串聯(lián)到一起直接接地,然后是A、B、C、分別串聯(lián)一塊,分別連接單片機(jī)的P1.0口、P1.1口、P1.2口,Y0~Y7分別單獨(dú)的向正面引出排插每一個(gè)口單獨(dú)焊接不是串聯(lián),用來(lái)連接底座上的64個(gè)點(diǎn),E1向正面單獨(dú)引出一個(gè)排針,用來(lái)連接74Hc138(Z)的(Y0~Y7)。焊接完成后用萬(wàn)用電流表檢查是否有虛焊,焊錯(cuò)的。
74hc138(Z)和74HC573(Y)的焊接方法都是每個(gè)針單獨(dú)連接一個(gè)排針。
9、74hc138(X1~X8)焊接在一塊將這8塊芯片的Vcc、E3全部串聯(lián)到一起用來(lái)輸入電壓,GND,E2串聯(lián)到一起直接接地,然后是A、B、C、分別串聯(lián)一塊,分別連接單片機(jī)的P1.0口、P1.1口、P1.2口,Y0~Y7分別單獨(dú)的向正面引出排插每一個(gè)口單獨(dú)焊接不是串聯(lián),用來(lái)連接底座上的64個(gè)點(diǎn),E1向正面單獨(dú)引出一個(gè)排針,用來(lái)連接74Hc138(Z)的(Y0~Y7)
74hc138(Z)A、B、C口分別連接單片機(jī)的P1.3口、P1.4口、P1.2口
74hc73(Y)D0~D7八個(gè)口連接單片機(jī)的P0的八個(gè)口,OE、GNG直接地線,Vcc、LE直接接電源就行了。剩下的O0~O7口分別連接Y軸的每一層。
直接算是徹底的安裝好了。
裝飾用的自選項(xiàng):
1、 剪裁出180mmX180mm正方形,在背面畫井字形方格,間距20mm,然后再交錯(cuò)點(diǎn)處打孔。
2、 將底板鋸開,接頭一一對(duì)應(yīng)的插入鉆好的孔,用膠水固定,全部粘好后,梳理線路用熱熔膠將線路粘牢,再將每一列的八條線用熱縮管捆到一起。
這就算是徹底的完成了!~~~
五、程序
#include《reg52.h》
#define uint unsigned int
#define uchar unsigned char
uchar a,b,c;
uchar code TAB[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x7F,0x41,0x7F,0x3E,0x00,
0x00,0x00,0x3E,0x7F,0x41,0x7F,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x7F,0x7F,0x40,0x00,0x00,
0x00,0x00,0x42,0x7F,0x7F,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x62,0x73,0x59,0x4F,0x46,0x00,
0x00,0x00,0x62,0x73,0x59,0x4F,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x22,0x6B,0x49,0x7F,0x36,0x00,
0x00,0x00,0x22,0x6B,0x49,0x7F,0x36,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x3E,0x7F,0x7F,0x20,0x00,
0x00,0x00,0x38,0x3E,0x7F,0x7F,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4F,0x4F,0x49,0x79,0x31,0x00,
0x00,0x00,0x4F,0x4F,0x49,0x79,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x7F,0x49,0x7B,0x32,0x00,
0x00,0x00,0x3E,0x7F,0x49,0x7B,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x73,0x79,0x0F,0x07,0x00,
0x00,0x00,0x03,0x73,0x79,0x0F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x7F,0x49,0x7F,0x36,0x00,
0x00,0x00,0x36,0x7F,0x49,0x7F,0x36,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x26,0x6F,0x49,0x7F,0x3E,0x00,0x00,
0x00,0x26,0x6F,0x49,0x7F,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x7F,0x11,0x7F,0x7E,0x00,0x00,
0x00,0x7E,0x7F,0x11,0x7F,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x49,0x7F,0x36,0x00,0x00,
0x00,0x7F,0x7F,0x49,0x7F,0x36,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x7F,0x41,0x63,0x22,0x00,0x00,
0x00,0x3E,0x7F,0x41,0x63,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x41,0x7F,0x3E,0x00,0x00,
0x00,0x7F,0x7F,0x41,0x7F,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x49,0x49,0x41,0x00,0x00,
0x00,0x7F,0x7F,0x49,0x49,0x41,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x09,0x09,0x01,0x00,0x00,
0x00,0x7F,0x7F,0x09,0x09,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x7F,0x49,0x7B,0x3A,0x00,0x00,
0x00,0x3E,0x7F,0x49,0x7B,0x3A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x08,0x7F,0x7F,0x00,0x00,
0x00,0x7F,0x7F,0x08,0x7F,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x7F,0x7F,0x41,0x00,0x00,0x00,
0x00,0x41,0x7F,0x7F,0x41,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x70,0x40,0x7F,0x3F,0x00,0x00,
0x00,0x30,0x70,0x40,0x7F,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x1C,0x77,0x63,0x00,0x00,
0x00,0x7F,0x7F,0x1C,0x77,0x63,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x40,0x40,0x40,0x00,0x00,
0x00,0x7F,0x7F,0x40,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x06,0x7F,0x7F,0x00,0x00,
0x00,0x7F,0x7F,0x06,0x7F,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x1E,0x7F,0x7F,0x00,0x00,
0x00,0x7F,0x7F,0x1E,0x7F,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x41,0x7F,0x7F,0x00,0x00,
0x00,0x7F,0x7F,0x41,0x7F,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x09,0x0F,0x06,0x00,0x00,
0x00,0x7F,0x7F,0x09,0x0F,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x7F,0x71,0x7F,0x7E,0x00,0x00,
0x00,0x3E,0x7F,0x71,0x7F,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x39,0x6F,0x46,0x00,0x00,
0x00,0x7F,0x7F,0x39,0x6F,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x26,0x6F,0x49,0x7B,0x32,0x00,0x00,
0x00,0x26,0x6F,0x49,0x7B,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x7F,0x7F,0x01,0x01,0x00,0x00,
0x00,0x01,0x7F,0x7F,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x7F,0x40,0x7F,0x3F,0x00,0x00,
0x00,0x3F,0x7F,0x40,0x7F,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x7F,0x70,0x7F,0x0F,0x00,0x00,
0x00,0x0F,0x7F,0x70,0x7F,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x30,0x7F,0x7F,0x00,0x00,
0x00,0x7F,0x7F,0x30,0x7F,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x63,0x7F,0x1C,0x7F,0x63,0x00,0x00,
0x00,0x63,0x7F,0x1C,0x7F,0x63,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x7C,0x7C,0x07,0x03,0x00,0x00,
0x03,0x07,0x7C,0x7C,0x07,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0x79,0x5D,0x4F,0x43,0x00,0x00,
0x00,0x61,0x79,0x5D,0x4F,0x43,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
void delay(uint z) //延時(shí)程序
{
uint x,y;
for(x=z;x》0;x--)
for(y=10;y》0;y--);
}
void xianshi1(uchar d) //顯示程序
{
for(a=0;a《64;a++)
{
P0=TAB[64*d+a];
P1=a;
delay(1);
}
}
void init() //定時(shí)器初始化程序
{
TMOD=0x01;
TH0=(65536-50000)/256;
TL0=(65536-50000)%6;
EA=1;
ET0=1;
TR0=1;
a=b=c=0;
P1=0;
P0=0;
}
void main()
{
init();
while(1)
{
if(c》=50)
{
c=0;
b++;
}
xianshi1(b);
if(b》=36)
b=0;
}
}
void timer0() interrupt 1
{
TH0=(65536-50000)/256;
TL0=(65536-50000)%6;
c++;
}
程序用來(lái)顯示的圖案應(yīng)為暫時(shí)沒有時(shí)間去編了,只能靠大家來(lái)整了!~~
圖案的編輯規(guī)則是:應(yīng)為是每一次給Y軸一個(gè)8位的圖案,所以只要64次就可以循環(huán)過來(lái)了,如圖示,第一面顯示完成后第二面開始顯示,來(lái)回八次,直到第八面顯示完成,再次轉(zhuǎn)到第一面,再次循環(huán)以上步奏,因?yàn)樗俣扰秹蚩?,就可形成完整的圖案安了。
所以如果要形成一個(gè)完整的圖案就要有64個(gè)數(shù)據(jù)。
這就算是徹底的制作完成了!~~
-
led
+關(guān)注
關(guān)注
242文章
23252瀏覽量
660551 -
單片機(jī)
+關(guān)注
關(guān)注
6035文章
44554瀏覽量
634614 -
光立方
+關(guān)注
關(guān)注
23文章
164瀏覽量
60554
發(fā)布評(píng)論請(qǐng)先 登錄
相關(guān)推薦
評(píng)論