畢業(yè)設(shè)計(jì)論文-基于at89c52單片機(jī)的led點(diǎn)陣廣告牌的設(shè)計(jì)與制作_第1頁
畢業(yè)設(shè)計(jì)論文-基于at89c52單片機(jī)的led點(diǎn)陣廣告牌的設(shè)計(jì)與制作_第2頁
畢業(yè)設(shè)計(jì)論文-基于at89c52單片機(jī)的led點(diǎn)陣廣告牌的設(shè)計(jì)與制作_第3頁
畢業(yè)設(shè)計(jì)論文-基于at89c52單片機(jī)的led點(diǎn)陣廣告牌的設(shè)計(jì)與制作_第4頁
畢業(yè)設(shè)計(jì)論文-基于at89c52單片機(jī)的led點(diǎn)陣廣告牌的設(shè)計(jì)與制作_第5頁
已閱讀5頁,還剩26頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

貴陽學(xué)院本科畢業(yè)論文(設(shè)計(jì))PAGE30本科畢業(yè)論文(設(shè)計(jì))題目:基于AT89C52單片機(jī)的LED點(diǎn)陣廣告牌的設(shè)計(jì)與制作院系:物電系08級(jí)電信(1)班專業(yè):電子信息科學(xué)與技術(shù) 姓名: 學(xué)號(hào): 指導(dǎo)教師: 教師職稱: 填寫日期:2011年12月20日摘要對(duì)于這個(gè)設(shè)計(jì),我用的主控模塊是AT89C52,驅(qū)動(dòng)8×8的點(diǎn)陣式廣告牌是由一些簡(jiǎn)單的外圍電路來驅(qū)動(dòng)的,在這個(gè)設(shè)計(jì)中,我們不僅用了AT89C52,還用了四個(gè)74HC595,這四個(gè)芯片是用來作為8×8點(diǎn)陣的驅(qū)動(dòng),最終能夠達(dá)到的目標(biāo)是能是實(shí)現(xiàn)——“祝您路途愉快!”這幾個(gè)漢字的往左移的過程,也就是說,整體的電路大致可以分類為兩塊,一個(gè)是外圍電路,一個(gè)是驅(qū)動(dòng)電路。這兩個(gè)電路能夠一起實(shí)現(xiàn)一個(gè)8×8的點(diǎn)陣廣告牌,在人體肉眼觀察的情況下,廣告牌的亮點(diǎn)都能夠顯示亮度均勻,不晃眼,可以顯示圖形和文字。不僅如此,顯示的文字還很穩(wěn)定,特別的清晰無擾動(dòng)。其顯示方式有移入和移出。最后,燒錄很方便,可以實(shí)現(xiàn)單片機(jī)和電腦等一系列的外圍存儲(chǔ)設(shè)備的傳輸數(shù)據(jù)功能。并且能夠用軟件來仿真出其內(nèi)容的變化。從另外一個(gè)角度來說,LED點(diǎn)陣是當(dāng)今新型的顯示器件,由多個(gè)二極管組成的。通過控制Led燈的亮滅個(gè)數(shù)來控制我所需要顯示的圖形和文字。關(guān)鍵詞:AT89C52;控制模塊;點(diǎn)陣廣告牌;驅(qū)動(dòng)電路;外圍電路AbstractForthisdesign,IusethemaincontrolmoduleisbasedonAT89C52anddrivethe8*8dotmatrixtypebillboardisdrivenbysomesimpleperipheralcircuits,inthisdesign,wenotonlyusetheAT89C52,four74HC595.Thesefourchipisusedasthe8*8dotmatrixdrive,andultimatelytoachievethetargetisisabletoachieve:"Iwishyouapleasantjourney!"ThisseveralChinesecharacterstotheleftoftheprocess,thatis,theoverallcircuitcanberoughlyclassifiedastwo,oneistheexternalcircuit,oneisthedrivecircuit.Thetwocircuitscantogethertoachievea8*8dotmatrixbillboardsandinthehumaneyeobservation,billboardhighlightsareabletodisplaybrightnessuniformity,noglare,candisplaygraphicsandtext.Notonlythat,thetextisstillverystable,especiallyclearwithoutdisturbance.Thedisplaymodehastomoveinandoutof.Finally,programmingisveryconvenient,datatransmissionfunctioncanachieveaseriesofsingle-chipcomputerandcomputerperipheralstoragedevices.Andcanusethesoftwaretosimulatethechangeofitscontent.Fromtheotherpointofview,LEDdotmatrixisanewtypeofdisplaydevice,whichiscomposedofapluralityofdiodes.BycontrollingtheLedbrightlightstocontrolwhatIneedtodisplaygraphicsandtext..Keywords:AT89C52;controlmodule;dotmatrixadvertisementboard;drivingcircuit;peripheralcircuit目錄第一章前言 4第二章點(diǎn)陣的概述 5第一節(jié)功能要求 5第二節(jié)關(guān)于LED的了解 5一、LED點(diǎn)陣顯示系統(tǒng)簡(jiǎn)介 5二、LED點(diǎn)陣顯示系統(tǒng)的主要特點(diǎn) 5三、LED點(diǎn)陣顯示屏的分類 5四、8*8點(diǎn)陣內(nèi)部電路圖 6第三節(jié)方案論證 6(一)點(diǎn)陣探究 6(二)掃描規(guī)律 7第三章方案比較 8第一節(jié)LED點(diǎn)陣廣告牌的設(shè)計(jì)一般有兩種方案: 8第二節(jié)電源的選擇與論證 8第三節(jié)點(diǎn)陣信息提取方案 8第四節(jié)顯示驅(qū)動(dòng)電路 9第四章系統(tǒng)總體設(shè)計(jì)方案 10第一節(jié)廣告牌總體設(shè)計(jì)方案 10第二節(jié)LED顯示驅(qū)動(dòng)電路 10(一)LED顯示原理 10(二)驅(qū)動(dòng)所用芯片 11(三)所選方案論述 11(四)74HC595的引腳接線 11第三節(jié)單片機(jī)系統(tǒng)及外圍電路 12第五章軟件設(shè)計(jì) 13第一節(jié)顯示驅(qū)動(dòng)程序 13第二節(jié)系統(tǒng)主程序 13第六章Proteus軟件仿真 15第一節(jié)Proteus軟件簡(jiǎn)介 15第二節(jié)proteus仿真過程 15圖6-2-1仿真過程 15致謝 16參考文獻(xiàn) 17附錄 18第一章前言點(diǎn)陣式廣告牌于生活中處處可見,它的存在對(duì)我們的生活有著十分重要的影響。點(diǎn)陣廣告牌在顯示的時(shí)候,其顏色艷麗,視覺效果強(qiáng)。用于許多地方,如,店鋪,十字路口,站臺(tái),警察局,醫(yī)院,等等任何建筑都有著它的存在。它的成本十分的低廉,但它實(shí)現(xiàn)的功能又特別重要,所以它十分受人們的青睞。它的原理是利用動(dòng)態(tài)掃描的顯示方法。第二章點(diǎn)陣的概述功能要求我們需要設(shè)計(jì)一個(gè)8*8的點(diǎn)陣式廣告牌,我們需要它的顯示能夠穩(wěn)定,抗擾動(dòng)性能好,能夠顯示我們所需要的圖形和文字,并且能夠按照我們自己的要求進(jìn)行左移或者右移。第二節(jié)關(guān)于LED的了解一、LED點(diǎn)陣顯示系統(tǒng)簡(jiǎn)介我所介紹的LED顯示屏,能夠按照要求顯示一些生活中常見的圖形和文字,能夠廣泛的應(yīng)用于社會(huì)。其結(jié)構(gòu)和原理都十分簡(jiǎn)單,安裝起來也沒有難度。不僅如此,其外形簡(jiǎn)潔美觀,顯示的內(nèi)容也十分清晰。通過AT89C52芯片來控制,其穩(wěn)定性和可靠性都大大的提升。而且它還具有掉電保護(hù)的功能,并不影響它的脫機(jī)工作。總共大約能夠顯示將近2000個(gè)文字。經(jīng)過串口來和電腦進(jìn)行信息交互,操作起來很簡(jiǎn)單,容易上手。二、LED點(diǎn)陣顯示系統(tǒng)的主要特點(diǎn)1.選用高品質(zhì)的LED晶片,抗靜電強(qiáng),亮度衰減低,波長(zhǎng)穩(wěn)定性高;

2.先進(jìn)的封裝設(shè)備,保證品質(zhì)和壽命;

3.室全彩戶外電子屏幕,由RGB三色LED燈組成,可顯示36bit色,且能實(shí)時(shí)、同步地顯示各種信息,如二維或三維動(dòng)畫、錄像、電視及現(xiàn)場(chǎng)實(shí)況等多種視頻信息內(nèi)容。

4.顯示屏長(zhǎng)期使用后仍可保持完美的畫質(zhì)和白平衡再現(xiàn)及足夠的亮度。

5.高精度的LED光學(xué)設(shè)計(jì),使RGB三色LED的遠(yuǎn)場(chǎng)視角圖完美匹配,以保證從任一角度都能得到視屏畫面的完美再現(xiàn)。

6.具有視角大、色彩均勻一致、故障率低、易維護(hù)。

7.標(biāo)準(zhǔn)的加工工藝,保證每一行和每一列燈管都在同一水平線上,保證畫面的穩(wěn)定清晰。

8.IP65級(jí)高性能的防水,防塵能力!三、LED點(diǎn)陣顯示屏的分類1、我們將LED點(diǎn)陣顯示屏分為兩大類,主要依據(jù)與他們的應(yīng)用場(chǎng)所不同(1)室內(nèi)屏從字面上理解來說,就是放在室內(nèi)的液晶顯示屏幕,是將許多點(diǎn)陣模塊或者數(shù)碼管模塊拼湊到一定的板子上,根據(jù)客戶的需求來定制他們所需要的尺寸。(2)戶外屏從字面上理解來說就是放在戶外的液晶顯示屏幕,是將許多點(diǎn)陣模塊或者數(shù)碼管組裝成一個(gè)箱,根據(jù)場(chǎng)地的不同要求可以設(shè)計(jì)成不同的形狀或者大小。我們一般采用強(qiáng)反光的介質(zhì),使得顯示起來更加醒目。2、LED是由許多發(fā)光二極管組成的,根據(jù)發(fā)光二極管發(fā)出不同顏色的光,我們又將LED分為單色,雙色或者全彩色這幾種類型。(1)單色從字面上理解來說,就是只有一種顏色,一般我們采用紅色,應(yīng)為紅色的透射率最強(qiáng),也是最醒目的,其次就是黃色,或者綠色。(2)雙基色從字面理解來說,就是有兩種顏色,通過采用兩種不同顏色的發(fā)光二極管來組合出不同顏色灰度。有點(diǎn)黑白的意思。(3)全彩色從字面上理解就是有很多顏色,多種顏色的混合就可以形成彩色,通過不同的變化,能夠不錯(cuò)的還原大自然的顏色,這也是許多客戶喜愛的原因之一。四、8*8點(diǎn)陣內(nèi)部電路圖圖2-2-18*8點(diǎn)陣模塊內(nèi)部電路圖第三節(jié)方案論證(一)點(diǎn)陣探究動(dòng)態(tài)掃描這個(gè)名詞,從字面上來說就是不斷的掃描,具體的對(duì)于8*8點(diǎn)陣來說,就是8行中的每一行都將一極連在一起,這里又分為共陰極和共陽極,這主要取決于二極管是什么類型,如果輸入高電平就亮,這種就是共陰極,如果輸入低電平就亮,這種就是共陽極。他們的8每8行,每8列都連在一起,同一個(gè)時(shí)間只能點(diǎn)亮一個(gè)燈亮,所以需要單片機(jī)一個(gè)一個(gè)點(diǎn)亮,因?yàn)閱纹瑱C(jī)執(zhí)行速度很快,這樣逐個(gè)點(diǎn)亮的速度用肉眼就分辨不出來,在人看來,這就是同時(shí)亮,這里利用了人類的視覺暫留效果。這樣我們就能看到穩(wěn)定的圖形或者文字了。第三章方案比較第一節(jié)LED點(diǎn)陣廣告牌的設(shè)計(jì)一般有兩種方案:方案一:控制器,我們采用可編程邏輯器件,PLC或者PLD,這種方案執(zhí)行力差,速度較慢,編程起來也十分復(fù)雜,不易控制。而且成本很高,不受消費(fèi)者青睞。方案二:我們采用AT89C52芯片,芯片的執(zhí)行速度相對(duì)較快,而且編程十分容易,對(duì)于我們來說已經(jīng)熟練掌握,而且它的成本也是十分低廉。綜合多方面考慮,選擇方案二。第二節(jié)電源的選擇與論證方案一:采用普通干電池,方便攜帶,但是容量小,不利于大功率使用,也不能長(zhǎng)期使用,需要頻繁的更換,而且污染環(huán)境。方案二:采用自制直流穩(wěn)壓電源,這個(gè)能夠根據(jù)不同的要求設(shè)計(jì)不同的電源,個(gè)性化強(qiáng),節(jié)省成本,耐用。綜上所述,采用方案二第三節(jié)點(diǎn)陣信息提取方案上大學(xué)的時(shí)候搞單片機(jī)實(shí)驗(yàn),大家都知道要提取字庫。

很多人還在研究UCDOS下的那些點(diǎn)陣文件,其實(shí)使用C#,可以很方便地寫一個(gè)程序提取Windows字體。

優(yōu)點(diǎn)是,代碼實(shí)現(xiàn)起來非常容易。并且可以借助Windows上龐大的TTF字體資源,實(shí)現(xiàn)各種各樣的字體,

不再局限UCDOS中幾種有限的字體。還可以實(shí)現(xiàn)很多特殊效果,因?yàn)閃indows的字體就是繪圖嘛。第四節(jié)顯示驅(qū)動(dòng)電路LED顯示屏幕常規(guī)驅(qū)動(dòng)電路的設(shè)計(jì):只要合理選擇電阻的值,就可以保證LED中流過的電流穩(wěn)定不變,并且可以使LED發(fā)光二極管鞏工作在正向電流與對(duì)應(yīng)發(fā)光亮度的最佳狀態(tài),用這種列恒流驅(qū)動(dòng)工作方式,可以做到不管一行中LED管子亮點(diǎn)數(shù)的多少,其行驅(qū)動(dòng)管的管壓降雖然有變化,電源電壓VCC也可以有所變化,由于每個(gè)LED發(fā)光二極管中流過的電流恒定不變,從而保證了LED顯示屏幕亮度的均勻性。該LED顯示屏恒流驅(qū)動(dòng)電路與原常規(guī)驅(qū)動(dòng)電路相比,僅利用較小的改動(dòng)就客服了常規(guī)型驅(qū)動(dòng)電路的缺陷,確保了較完美的性能,筆者通過多塊顯示屏的實(shí)際使用均得到了理想的顯示效果。第四章系統(tǒng)總體設(shè)計(jì)方案第一節(jié)廣告牌總體設(shè)計(jì)方案驅(qū)動(dòng)驅(qū)動(dòng)器單片機(jī)片機(jī)LED顯示點(diǎn)陣圖4-1-1總體設(shè)計(jì)方案圖第二節(jié)單片機(jī)系統(tǒng)及外圍電路我們的單片機(jī)采用的型號(hào)是AT89C52,它的晶振是12MHZ的,我們將單片機(jī)與驅(qū)動(dòng)電路相連接,驅(qū)動(dòng)電路將驅(qū)動(dòng)顯示電路也就是LED顯示屏。P0和P3口連接驅(qū)動(dòng),P3口送數(shù)據(jù)從而控制LED液晶屏的顯示,P1.6接時(shí)鐘,P1.7輸出使能。圖4-2-174HC595的引腳圖4-2-274HC595在電路中的連線第五章軟件設(shè)計(jì)1.初始化設(shè)置程序#include<reg52.h>#defineucharunsignedchar#defineuintunsignedintsbitouten=P1^7;sbitlatch=P1^6;設(shè)置變量和使能管腳,輸出端口。2.顯示字的模塊ucharcodezero[12][2]={ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};//祝ucharcodezhu[12][2]={ 0x40,0x40,0x27,0xE0,0xF4,0x40,0x14,0x40, 0x24,0x40,0x67,0xC0,0xB2,0x80,0x22,0x80, 0x22,0xA0,0x24,0xA0,0x38,0xE0,0x00,0x00};//您ucharcodenin[12][2]={ 0x24,0x00,0x27,0xE0,0x48,0x40,0xD5,0x80, 0x49,0x40,0x51,0x20,0x47,0x00,0x08,0x00, 0x54,0xC0,0x50,0xA0,0x9F,0x80,0x00,0x00};//旅ucharcodelui[12][2]={ 0x42,0x00,0x22,0x00,0xFB,0xE0,0x44,0x00, 0x70,0xC0,0x57,0x00,0x55,0x40,0x55,0x80, 0x54,0x80,0x95,0x40,0xB6,0x20,0x00,0x00,};//途ucharcodetu[12][2]={ 0x82,0x00,0x45,0x00,0x48,0x80,0x17,0x60, 0xC2,0x00,0x4F,0xC0,0x42,0x00,0x4A,0x80, 0x56,0x40,0xA0,0x00,0x9F,0xE0,0x00,0x00};//愉ucharcodeyu[12][2]={ 0x42,0x00,0x45,0x00,0x68,0x80,0xD7,0x60, 0xC0,0x00,0x4E,0xA0,0x4A,0xA0,0x4E,0xA0, 0x4A,0xA0,0x4E,0xA0,0x4A,0x60,0x00,0x00};//快ucharcodekuai[12][2]={ 0x42,0x00,0x42,0x00,0x4F,0xC0,0xE2,0x40, 0xD2,0x40,0x42,0x40,0x5F,0xE0,0x42,0x00, 0x45,0x00,0x48,0x80,0x70,0x60,0x00,0x00};//!ucharcodewell[12][2]={ 0x00,0x00,0x30,0x00,0x78,0x00,0x78,0x00, 0x78,0x00,0x30,0x00,0x30,0x00,0x00,0x00, 0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00};分別是“祝您旅途愉快!“這幾個(gè)字樣。3.液晶屏的初始化程序ucharidatabuffer[16][8]; uchar*pc[16];voiddisplay(uint); //顯示voiddelay(uint); //延時(shí)voidmove(void); voidcarry();voidt_state(void); voidclean(void); //清空顯存voidslogan(ucharm); voidLeftMove(uchar*p); voidUpMove(void); voidWordUpMove(void); voidLoadNoSmoking(uchar*p);顯示字符之前的準(zhǔn)備程序4.顯示字符程序uchari; TMOD=0x11; SCON=0x00; EA=1; ES=0; while(1){ clean(); display(20); for(i=0;i<1;i++){ //祝您旅途愉快! pc[0]=&dh[0][0];pc[1]=&zhu[0][0];pc[2]=&nin[0][0];pc[3]=&lui[0][0];pc[4]=&tu[0][0];pc[5]=&yu[0][0]; pc[6]=&kuai[0][0];pc[7]=&well[0][0]; slogan(8); //slogan(8); pc[0]=&zero[0][0]; for(i=0;i<5;i++) slogan(1); }}正式顯示“祝您旅途愉快!“這幾個(gè)字樣5.清屏程序voidclean(void){ uchari,j; for(i=0;i<16;i++) for(j=0;j<8;j++) buffer[i][j]=0x00; }屏幕清空6.左移程序voidslogan(ucharm){ uchari; for(i=0;i<m;i++) LeftMove(pc[i]);字符向左移動(dòng)一個(gè)字符長(zhǎng)度。7.延時(shí)函數(shù)voiddelay(uintt){ inti,j; for(i=0;i<t;i++) for(j=0;j<10;j++);}用于延時(shí)間隔。8.展示函數(shù)voiddisplay(uintt){ uinti; ucharj,k,a; uchar*disp; for(i=0;i<t;i++){ a=0x80; latch=0; outen=1; P0=0; P2=0; for(j=0;j<8;j++){ disp=buffer[j]+6; for(k=0;k<7;k++){ SBUF=*disp--; while(!TI){;} TI=0; } latch=1; latch=0; P0=a; outen=0; delay(6); a=a>>1; outen=1; } P0=0; a=0x80; for(j=0;j<8;j++){ disp=buffer[j+8]+6; for(k=0;k<7;k++){ SBUF=*disp--; while(!TI){;} TI=0; } latch=1; l P2=a; outen=0; delay(6); a=a>>1; outen=1; } }}挨個(gè)展示字符函數(shù)9.字符操作函數(shù)voidmove(void){ uchar*m,i,j; for(i=0;i<16;i++){ for(j=0;j<7;j++){ m=&buffer[i][j]; *m=*m<<1; *m=*m|*(m+1)>>7; } buffer[i][7]=buffer[i][7]<<1; }}/*==============voidcarry(){ uchari,j,*car=wc; for(i=0;i<16;i++) //16行 for(j=0;j<4;j++) //4byte buffer[i][j+3]=*car++; }*////////////////////voidLeftMove(uchar*p){ uchari; buffer[0][7]=buffer[1][7]=buffer[14][7]=buffer[15][7]=0x00; for(i=0;i<12;i++) buffer[i+2][7]=*(p+2*i); //裝載高8位 for(i=0;i<8;i++){ //左移8次,并顯示 move(); display(1); } for(i=0;i<12;i++) buffer[i+2][7]=*(p+1+2*i); //裝載低4位 for(i=0;i<4;i++){ //左移4次,并顯示 move(); display(1); }}voidLoadNoSmoking(uchar*p){ uchari; for(i=0;i<16;i++) buffer[i][7]=*(p+2*i); //裝載高8位 for(i=0;i<8;i++){ //左移8次,并顯示 move(); display(1); } for(i=0;i<16;i++) buffer[i][7]=*(p+1+2*i); //裝載低4位 for(i=0;i<8;i++){ //左移8次,并顯示 move(); display(1); }}voidUpMove(void){ uchari,j; for(i=0;i<15;i++){ for(j=0;j<7;j++) buffer[i][j]=buffer[i+1][j]; } for(i=0;i<7;i++) buffer[15][i]=0x00; }voidWordUpMove(void){ uchari,j; buffer[15][0]=*pc[0]; display(3); UpMove(); buffer[15][0]=*(pc[0]+1); display(3); UpMove(); for(i=0;i<12;i++){ buffer[15][0]=*(pc[0]+2+i); for(j=0;j<2;j++){ buffer[15][1+3*j]=*(pc[1+2*j]+2*i); buffer[15][2+3*j]=*(pc[1+2*j]+1+2*i)|(*(pc[2+2*j]+2*i)>>4); buffer[15][3+3*j]=(*(pc[2+2*j]+2*i)<<4)|(*(pc[2+2*j]+1+2*i)>>4); } display(3); UpMove(); } buffer[15][0]=*(pc[0]+14); display(3); UpMove(); buffer[15][0]=*(pc[0]+15); display(150); display(150);第六章Proteus軟件仿真第一節(jié)proteus仿真過程原理圖的繪制程序編寫和編譯裝載HEX代碼調(diào)試原理圖的繪制程序編寫和編譯裝載HEX代碼調(diào)試得到仿真效果圖6-2-1仿真過程參考文獻(xiàn)[1]譚浩強(qiáng).《C程序設(shè)計(jì)》.第三版.北京:清華大學(xué)出版社,2005[2]童詩白.《模擬電子技術(shù)基礎(chǔ)》.第三版.北京:高等教育出版社,2000[3]閆石.《數(shù)字電子技術(shù)基礎(chǔ)》.第三版.北京:高等教育出版社,1989[4]何立民.《單片機(jī)應(yīng)用技術(shù)選編》.北京:北京航空航天大學(xué)出版社,2000[5]余發(fā)山,王福忠.《單片機(jī)原理及應(yīng)用技術(shù)》.徐州:中國(guó)礦大出版社,2004[6]胡漢才.《單片機(jī)原理及其接口技術(shù)》.第二版.北京:清華大學(xué)出版社,2004[7]江澤佳.《電路原理》.第三版.北京:高等教育出版社,1992[8]張新成,楊志邦.《c語言程序設(shè)計(jì)》.鄭州:河南科學(xué)技術(shù)出版社,2009附錄附1源程序代碼#include<reg52.h>#defineucharunsignedchar#defineuintunsignedintsbitouten=P1^7;sbitlatch=P1^6;//zeroucharcodezero[12][2]={ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};//祝ucharcodezhu[12][2]={ 0x40,0x40,0x27,0xE0,0xF4,0x40,0x14,0x40, 0x24,0x40,0x67,0xC0,0xB2,0x80,0x22,0x80, 0x22,0xA0,0x24,0xA0,0x38,0xE0,0x00,0x00};//您ucharcodenin[12][2]={ 0x24,0x00,0x27,0xE0,0x48,0x40,0xD5,0x80, 0x49,0x40,0x51,0x20,0x47,0x00,0x08,0x00, 0x54,0xC0,0x50,0xA0,0x9F,0x80,0x00,0x00};//旅ucharcodelui[12][2]={ 0x42,0x00,0x22,0x00,0xFB,0xE0,0x44,0x00, 0x70,0xC0,0x57,0x00,0x55,0x40,0x55,0x80, 0x54,0x80,0x95,0x40,0xB6,0x20,0x00,0x00,};//途ucharcodetu[12][2]={ 0x82,0x00,0x45,0x00,0x48,0x80,0x17,0x60, 0xC2,0x00,0x4F,0xC0,0x42,0x00,0x4A,0x80, 0x56,0x40,0xA0,0x00,0x9F,0xE0,0x00,0x00};//愉ucharcodeyu[12][2]={ 0x42,0x00,0x45,0x00,0x68,0x80,0xD7,0x60, 0xC0,0x00,0x4E,0xA0,0x4A,0xA0,0x4E,0xA0, 0x4A,0xA0,0x4E,0xA0,0x4A,0x60,0x00,0x00};//快ucharcodekuai[12][2]={ 0x42,0x00,0x42,0x00,0x4F,0xC0,0xE2,0x40, 0xD2,0x40,0x42,0x40,0x5F,0xE0,0x42,0x00, 0x45,0x00,0x48,0x80,0x70,0x60,0x00,0x00};//!ucharcodewell[12][2]={ 0x00,0x00,0x30,0x00,0x78,0x00,0x78,0x00, 0x78,0x00,0x30,0x00,0x30,0x00,0x00,0x00, 0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00};ucharidatabuffer[16][8]; uchar*pc[16];voiddisplay(uint); //顯示voiddelay(uint); //延時(shí)voidmove(void); voidcarry();voidt_state(void); voidclean(void); //清空顯存voidslogan(ucharm); voidLeftMove(uchar*p); voidUpMove(void); voidWordUpMove(void); voidLoadNoSmoking(uchar*p);/***************************************//**************主程序開始***************//***************************************/voidmain(void){ uchari; TMOD=0x11; SCON=0x00; EA=1; ES=0; while(1){ clean(); display(20); for(i=0;i<1;i++){ //祝您旅途愉快! pc[0]=&dh[0][0];pc[1]=&zhu[0][0];pc[2]=&nin[0][0];pc[3]=&lui[0][0];pc[4]=&tu[0][0];pc[5]=&yu[0][0]; pc[6]=&kuai[0][0];pc[7]=&well[0][0]; slogan(8); //slogan(8); pc[0]=&zero[0][0]; for(i=0;i<5;i++) slogan(1); }}voidclean(void){ uchari,j; for(i=0;i<16;i++) for(j=0;j<8;j++) buffer[i][j]=0x00; }voidslogan(ucharm){ uchari; for(i=0;i<m;i++) LeftMove(pc[i]); }voiddelay(uintt){ inti,j; for(i=0;i<t;i++) for(j=0;j<10;j++);}voiddisplay(uintt){ uinti; ucharj,k,a; uchar*disp; for(i=0;i<t;i++){ a=0x80; latch=0; outen=1; P0=0; P2=0; for(j=0;j<8;j++){ disp=buffer[j]+6; for(k=0;k<7;k++){ SBUF=*disp--; while(!TI){;} TI=0; } latch=1; latch=0; P0=a; outen=0; delay(6); a=a>>1; outen=1; } P0=0; a=0x80; for(j=0;j<8;j++){ disp=buffer[j+8]+6; for(k=0;k<7;k++){ SBUF=*disp--; while(!TI){;} TI=0; } latch=1; l P2=a; outen=0; delay(6); a=a>>1; outen=1; } }}voidmove(void){ uchar*m,i,j; for(i=0;i<16;i++){ for(j=0;j<7;j++){ m=&buffer[i][j]; *m=*m<<1; *m=*m|*(m+1)>>7; } buffer[i][7]=buffer[i][7]<<1; }}/*==============voidcarry(){ uchari,j,*car=wc; for(i=0;i<16;i++) //16行 for(j=0;j<4;j++) //4byte buffer[i][j+3]=*car++; }*////////////////////voidLeftMove(uchar*p){ uchari; buffer[0][7]=buffer[1][7]=buffer[14][7]=buffer[15][7]=0x00; for(i=0;i<12;i++) buffer[i+2][7]=*(p+2*i); //裝載高8位 for(i=0;i<8;i++){ //左移8次,并顯示 move(); display(1); } for(i=0;i<12;i++) buffer[i+2][7]=*(p+1+2*i); //裝載低4位 for(i=0;i<4;i++){ //左移4次,并顯示 move(); display(1); }}voidLoadNoSmoking(uchar*p){ uchari; for(i=0;i<16;i++) buffer[i][7]=*(p+2*i); //裝載高8位 for(i=0;i<8;i++){ //左移8次,并顯示 move(); display(1); } for(i=0;i<16;i++) buffer[i][7]=*(p+1+2*i); //裝載低4位 for(i=0;i<8;i++){ //左移8次,并顯示 move(); display(1); }}voidUpMove(void){ uchari,j; for(i=0;i<15;i++){ for(j=0;j<7;j++) buffer[i][j]=buffer[i+1][j]; } for(i=0;i<7;i++) buffer[15][i]=0x00; }voidWordUpMove(void){ uchari,j; buffer[15][0]=*pc[0]; display(3); UpMove(); buffer[15][0]=*(pc[0]+1); display(3); UpMove(); for(i=0;i<12;i++){ buffer[15][0]=*(pc[0]+2+i); for(j=0;j<2;j++){ buffer[15][1+3*j]=*(pc[1+2*j]+2*i); buffer[15][2+3*j]=*(pc[1+2*j]+1+2*i)|(*(pc[2+2*j]+2*i)>>4); buffer[15][3+3*j]=(*(pc[2+2*j]+2*i)<<4)|(*(pc[2+2*j]+1+2*i)>>4); } display(3); UpMove(); } buffer[15][0]=*(pc[0]+14); display(3); UpMove(); buffer[15][0]=*(pc[0]+15); display(150); display(150);}附2系統(tǒng)原理圖附2-1系統(tǒng)原理圖附3所用到部分PCB圖附3-1驅(qū)動(dòng)器模塊附3-2最小系統(tǒng)

請(qǐng)刪除以下內(nèi)容,O(∩_∩)O謝謝!!!TheoriginoftaxationintheUnitedStatescanbetracedtothetimewhenthecolonistswereheavilytaxedbyGreatBritainoneverythingfromteatolegalandbusinessdocumentsthatwererequiredbytheStampTax.Thecolonists'disdainforthistaxationwithoutrepresentation(so-calledbecausethecolonieshadnovoiceintheestablishmentofthetaxes)gaverisetorevoltssuchastheBostonTeaParty.However,evenaftertheRevolutionaryWarandtheadoptionoftheU.S.Constitution,themainsourceofrevenueforthenewlycreatedstateswasmoneyreceivedfromcustomsandexcisetaxesonitemssuchascarriages,sugar,whiskey,andsnuff.IncometaxfirstappearedintheUnitedStatesin1862,duringtheCivilWar.Atthattimeonlyaboutonepercentofthepopulationwasrequiredtopaythetax.Aflat-rateincometaxwasimposedin1867.Theincometaxwasrepealedinitsentiretyin1872.IncometaxwasarallyingpointforthePopulistpartyin1892,andhadenoughsupporttwoyearslaterthatCongresspassedtheIncomeTaxActof1894.Thetaxatthattimewastwopercentonindividualincomesinexcessof$4,000,whichmeantthatitreachedonlythewealthiestmembersofthepopulation.TheSupremeCourtstruckdownthetax,holdingthatitviolatedtheconstitutionalrequirementthatdirecttaxesbeapportionedamongthestatesbypopulation(pollockv.farmers'loan&trust,158U.S.601,15S.Ct.912,39L.Ed.1108[1895]).Aftermanyyearsofdebateandcompromise,thesixteenthamendmenttotheConstitutionwasratifiedin1913,providingCongresswiththepowertolayandcollecttaxesonincomewithoutapportionmentamongthestates.Theobjectivesoftheincometaxweretheequitabledistributionofthetaxburdenandtheraisingofrevenue.Since1913theU.S.incometaxsystemhasbecomeverycomplex.In1913theincometaxlawswerecontainedineighteenpagesoflegislation;theexplanationofthetaxreformactof1986wasmorethanthirteenhundredpageslong(Pub.L.99-514,Oct.22,1986,100Stat.2085).CommerceClearingHouse,apublisheroftaxinformation,releasedaversionoftheInternalRevenueCodeintheearly1990sthatwasfourtimesthickerthanitsversionin1953.Changestothetaxlawsoftenreflectthetimes.Theflattaxof1913waslaterreplacedwithagraduatedtax.AftertheUnitedStatesenteredworldwari,theWarRevenueActof1917imposedamaximumtaxrateforindividualsof67percent,comparedwitharateof13percentin1916.In1924SecretaryoftheTreasuryAndrewW.Mellon,speakingtoCongressaboutthehighleveloftaxation,stated,Thepresentsystemisafailure.Itwasanemergencymeasure,adoptedunderthepressureofwarnecessityandnottobecounteduponasapermanentpartofourrevenuestructure….Thehighratesputpressureontaxpayerstoreducetheirtaxableincome,tendtodestroyindividualinitiativeandenterprise,andseriouslyimpedethedevelopmentofproductivebusiness….Wayswillalwaysbefoundtoavoidtaxessodestructiveintheirnature,andtheonlywaytosavethesituationistoputthetaxesonareasonablebasisthatwillpermitbusinesstogoonandindustrytodevelop.Consequently,theRevenueActof1924reducedthemaximumindividualtaxrateto43percent(RevenueActs,June2,1924,ch.234,43Stat.253).In1926theratewasfurtherreducedto25percent.TheRevenueActof1932wasthefirsttaxlawpassedduringtheGreatDepression(RevenueActs,June6,1932,ch.209,47Stat.169).Itincreasedtheindividualmaximumratefrom25to63percent,andreducedpersonalexemptionsfrom$1,500to$1,000forsinglepersons,andfrom$3,500to$2,500formarriedcouples.Thenationalindustrialrecoveryactof1933(NIRA),partofPresidentfranklind.roosevelt'snewdeal,imposedafivepercentexcisetaxondividendreceipts,imposedacapitalstocktaxandanexcessprofitstax,andsuspendedalldeductionsforlosses(June16,1933,ch.90,48Stat.195).Therepealin1933oftheeighteenthamendment,whichhadprohibitedthemanufactureandsaleofalcohol,broughtinanestimated$90millioninnewliquortaxesin1934.Thesocialsecurityactof1935providedforawagetax,halftobepaidbytheemployeeandhalfbytheemployer,toestablishafederalretirementfund(OldAgePensionAct,Aug.14,1935,ch.531,49Stat.620).TheWealthTaxAct,alsoknownastheRevenueActof1935,increasedthemaximumtaxrateto79percent,theRevenueActsof1940and1941increaseditto81percent,theRevenueActof1942raiseditto88percent,andtheIndividualIncomeTaxActof1944raisedtheindividualmaximumrateto94percent.Thepost-WorldWarIIRevenueActof1945reducedtheindividualmaximumtaxfrom94percentto91percent.TheRevenueActof1950,duringthekoreanwar,reduceditto84.4percent,butitwasraisedthenextyearto92percent(RevenueActof1950,Sept.23,1950,ch.994,Stat.906).Itremainedatthisleveluntil1964,whenitwasreducedto70percent.TheRevenueActof1954revisedtheInternalRevenueCodeof1939,makingmajorchangesthatwerebeneficialtothetaxpayer,includingprovidingforchildcaredeductions(laterchangedtocredits),anincreaseinthecharitablecontributionlimit,ataxcreditagainsttaxableretirementincome,employeedeductionsforbusinessexpenses,andliberalizeddepreciationdeductions.From1954to1962,theInternalRevenueCodewasamendedby183separateacts.In1974theemployeeretirementincomesecurityact(ERISA)createdprotectionsforemployeeswhoseemployerspromisedspecifiedpensionsorotherretirementcontributions(Pub.L.No.93-406,Sept.2,1974,88Stat.829).ERISArequiredthattobetaxdeductible,theemployer'splancontributionmustmeetcertainminimumstandardsastoemployeeparticipationandvestingandemployerfunding.ERISAalsoapprovedtheuseofindividualretirementaccounts(IRAs)toencouragetax-deferredretirementsavingsbyindividuals.TheEconomicRecoveryTaxActof1981(ERTA)providedthelargesttaxcutuptothattime,reducingthemaximumindividualratefrom70percentto50percent(Pub.L.No.97-34,Aug.13,1981,95Stat.172).ThemostsweepingtaxchangessinceworldwariiwereenactedintheTaxReformActof1986.ThisbillwassignedintolawbyPresidentronaldreaganandwasdesignedtoequalizethetaxtreatmentofvariousassets,eliminatetaxshelters,andlowermarginalrates.Conservativeswantedtheacttoprovideasingle,lowtaxratethatcouldbeappliedtoeveryone.Althoughthissingle,flatratewasnotincludedinthefinalbill,taxrateswerereducedto15percentonthefirst$17,850ofincomeforsinglesand$29,750formarriedcouples,andsetat28to33percentonremainingincome.Manydeductionswererepealed,suchasadeductionavailabletotwo-incomemarriedcouplesthathadbeenusedtoavoidthe"marriagepenalty"(agreatertaxliabilityincurredwhentwopersonsfiledtheirincometaxreturnasamarriedcoupleratherthanasindividuals).Althoughthepersonalexemptionexclusionwasincreased,anexemptionforelderlyandblindpersonswhoitemizedeductionswasrepealed.Inaddition,aspecialcapitalgainsratewasrepealed,aswasaninvestmenttaxcreditthathadbeenintroducedin1962byPresidentjohnf.kennedy.TheOmnibusBudgetReconciliationActof1993,thefirstbudgetandtaxactenactedduringtheClintonadministration,wasvigorouslydebated,andpassedwithonlytheminimumnumberofnecessaryvotes.Thislawprovidedforincometaxratesof15,28,31,36,and39.6percentonvaryinglevelsofincomeandforthetaxationofsocialsecurityincomeifthetaxpayerreceivesotherincomeoveracertainlevel.In2001CongressenactedamajorincometaxcutattheurgingofPresidentgeorgew.bush.Overthecourseof11yearsthelawreducesmarginalincometaxratesacrossalllevelsofincome.The36percentratewillbeloweredto33percent,the31percentrateto28percent,the28percentrateto25percent.Inaddition,anewbottom10percentratewascreated.Sincetheearly1980s,aflat-ratetaxsystemratherthanthegraduatedbracketedmethodhasbeenproposed.(Thegraduatedbracketedmethodistheonethathasbeenusedsincegraduatedtaxeswereintroduced:thepercentageoftaxdiffersbasedontheamountoftaxableincome.)Theflat-ratesystemwouldimposeonerate,suchas20percent,onallincomeandwouldeliminatespecialdeductions,credits,andexclusions.Despitefirmsupportbysome,theflat-ratetaxhasnotbeenadoptedintheUnitedStates.Regardlessofthechangesmadebylegislatorssince1913,thebasicformulaforcomputingtheamountoftaxowedhasremainedbasicallythesame.Todeterminetheamountofincometaxowed,certaindeductionsaretakenfromanindividual'sgrossincometoarriveatanadjustedgrossincome,fromwhichadditionaldeductionsaretakentoarriveatthetaxableincome.Oncetheamountoftaxableincomehasbeendetermined,taxratechartsdeterminetheexactamountoftaxowed.Iftheamountoftaxowedislessthantheamountalreadypaidthroughtaxprepaymentorthewithholdingoftaxesfrompaychecks,thetaxpayerisentitledtoarefundfromtheIRS.Iftheamountoftaxowedismorethanwhathasalreadybeenpaid,thetaxpayermustpaythedifferencetotheIRS.CalculatingthegrossincomeofrestaurantemployeeswhoseincomeispartiallyderivedfromgratuitiesleftbycustomershasledtodisputeswiththeIRSandemployersoverhowmuchtheyshouldcontributeinfederalinsurancecontributionact(fica)taxes.Althoughcustomerspaythesetipsdirectlytoemployees,federallawdeemsthetipstohavebeenwagespaidbytheemployerforFICAtaxpurposes.Employersareimputedtohavepaidlargesumsofmoneytheyneverhandledandforwhichtheynowayofascertainingtheexactamount.TheSupremeCourt,in

UnitedStatesv.FiorD'Italia,536U.S.238,122S.Ct.2117,153L.Ed.2d280(2002),upheldtheIRS"aggregatemethod"ofreportingtipincome.InsteadofrequiringtheIRStomakeindividualdeterminationsofunreportedtipsforeachemployeewhencalculatingFICAtax,theCourtheldthattheIRScouldmakeemployersreporttheirgrosssalesonamon

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論