【正文】
也只占用一個(gè) IO口。語音模塊采用的語音芯片是ISD1730,可以錄制想要的語音,通過錄音可以對(duì)設(shè)計(jì)進(jìn)行介紹。由于單片機(jī)的 IO口不夠用,本設(shè)計(jì)采用74HC154對(duì)其擴(kuò)充,將四線擴(kuò)充到十六線。關(guān)鍵詞:?jiǎn)纹瑱C(jī);紅外遙控;點(diǎn)陣;譯碼器;霓虹燈第 2頁 共 47頁The Design of the Neon Lights controller Based on SCMAbstractThis design uses the AT89C52 single chip microputer to control the neon lights. The system is posed by the infrared remote control module, the singlechip microputer control module, the display module and the speech module. Infrared remote control module is divided into the infrared transmitter and infrared receiver parts. After decoding through the single chip microputer, the infrared emission button address can be taken out in order to realize the remote control of infrared neon lights display. The infrared receiving tube only takes up one IO port. The display part uses the dot matrix module with 16 plus 16, through the singlechip control, it can display different patterns and the text, and make the word to move, pause, and switch from the current text to the other. The voice module uses voice chip ISD1730, which can record the desired voice, which can be played to introduce the design. It is support for pause, next, adjust the volume and reset of the voice playback. Due to the IO port of the microcontroller is not enough, this design uses a 74HC154 to expand the IO port, which is expanding the fourline to 16line. The system has a strong practical value because of its advantages of simple circuit structure, easy operation and low cost. Key words: Single Chip。 Dot Matrix。 Neon Lights第 3頁 共 47頁目 錄論文總頁數(shù):47 頁1 引言 .......................................................................4 .........................................................4 ...................................................42 方案研究與主要芯片選擇 .....................................................6 總體方案原理及設(shè)計(jì)框圖 .................................................6 主控電路的選擇與論證 ...............................................6 顯示設(shè)備的選擇與論證 ...............................................8 .....................................................9 主要芯片介紹 ..........................................................11 譯碼器 74LS154的介紹 ..............................................11 LED點(diǎn)陣的介紹 ....................................................12 ....................................................133 硬件電路設(shè)計(jì)與調(diào)試 ........................................................15 單片機(jī)模塊單元電路設(shè)計(jì) ................................................15 串口通信電路設(shè)計(jì) ......................................................16 譯碼器模塊單元電路設(shè)計(jì) ................................................17 點(diǎn)陣模塊單元電路設(shè)計(jì) ..................................................17 紅外遙控模塊單元電路設(shè)計(jì) ..............................................18 語音模塊單元電路設(shè)計(jì) ..................................................19 硬件仿真與調(diào)試 ........................................................214 軟件 設(shè)計(jì) ..................................................................23 單片機(jī) I/O口分配 ......................................................23 各模塊程序 ............................................................23 主程序設(shè)計(jì) ........................................................23 顯示程序設(shè)計(jì) ......................................................24 紅外接收程序設(shè)計(jì) ..................................................26 設(shè)定的圖案和字程序 ................................................285 軟硬件聯(lián)調(diào)及技術(shù)改進(jìn) ......................................................30 ..................................................30 技術(shù)改進(jìn) ..............................................................32第 4頁 共 47頁結(jié) 語 ....................................................................32參考文獻(xiàn) ....................................................................33致 謝 ....................................................................34聲 明 ....................................................................35附 錄 ....................................................................36第 5頁 共 47頁1 引言 課題背景及意義 霓虹燈是一種冷陰極輝光放電燈,直接將電能轉(zhuǎn)換成光能。霓虹燈由于其外形變幻多端、加工靈活、色彩豐富,在廣告業(yè)、商業(yè)、交通、建筑、室內(nèi)外裝飾、舞臺(tái)布景、家用電器、城市美化等領(lǐng)域發(fā)揮了特有的作用。單片機(jī)有著體積小、功耗低、功能強(qiáng)、性能價(jià)格比高、易于推廣應(yīng)用等顯著優(yōu)點(diǎn),在自動(dòng)化裝置、智能儀器儀表、過程控制、通信、家用電器等許多領(lǐng)域得到日益廣泛的應(yīng)用。它給人們的生活帶來了很多便利。流水燈在現(xiàn)代社會(huì)就有廣泛的應(yīng)用,大型電子廣告牌、霓虹燈、指示牌和工業(yè)控制的控制面板等等都有流水燈的應(yīng)用。AT89C52 單片機(jī)是可多次改寫的可編程芯片,用這種芯片構(gòu)成的系統(tǒng)簡(jiǎn)單、可靠,性價(jià)比相當(dāng)高,適合成為霓虹燈程序控制器的核心部件,結(jié)合鎖存器 MC74HC373實(shí)現(xiàn)的控制器功能,時(shí)間常數(shù)易修改,使用靈活,電路易實(shí)現(xiàn),成本低,控制芯片更換方便。 本課題研究方法和目標(biāo)本設(shè)計(jì)要求完成一個(gè)霓虹燈控制器,控制發(fā)光二極管點(diǎn)陣顯示,要求能形成多種圖案和字。加設(shè)語音芯片,對(duì)整個(gè)設(shè)計(jì)進(jìn)行簡(jiǎn)要概況。實(shí)物以 AT89C52 為主控芯片,ISD1730 語音模塊、紅外遙控模塊構(gòu)成電路,主要包括電源、控制電路、顯示電路、語音電路。該軟、硬件系統(tǒng)具有很好的通用性和一定的實(shí)第 6頁 共 47頁際使用價(jià)值。(1)單片機(jī)最小系統(tǒng)模塊,采用經(jīng)典配置。(3)為實(shí)現(xiàn)語音與圖像的搭配,要搭載語音模塊,每顯示一個(gè)圖案,發(fā)出不同的語音信息。(5)為實(shí)現(xiàn)圖像的顯示,由 1616 的點(diǎn)陣模塊,由點(diǎn)陣模塊顯示不同的圖形。軟件部分在主程序下,分別編寫了如下子程序:時(shí)鐘程序、紅外譯碼程序、圖像顯示程序、中斷程序等。第 7頁 共 47頁單片機(jī)紅外遙控串口通信U S B 電源語音模塊L e d 點(diǎn)陣圖 控制系統(tǒng)框圖如圖 所示,本方案具有紅外遙控模塊、語音模塊、單片機(jī)控制模塊、顯示模塊,共四個(gè)模塊。單片機(jī)控制霓虹燈的設(shè)計(jì)以單片機(jī) STC89C52RC 控制為核心,通過紅外遙控器發(fā)出信號(hào),接收頭接收信號(hào),通過單片機(jī)的中斷處理,對(duì)圖案的顯示進(jìn)行控制;在通電的同時(shí)伴隨一段語音,對(duì)整個(gè)設(shè)計(jì)進(jìn)行一個(gè)簡(jiǎn)要介紹;串口通信是為了幫助STC 單片機(jī)實(shí)現(xiàn)程序的下載;點(diǎn)陣模塊有圖案顯示,也有文字顯示,對(duì)文字有左右滾動(dòng)、速度變化、暫停、播放等操作。 主控電路的選擇與論證在本設(shè)計(jì)中,主控電路有三種實(shí)現(xiàn)方式。89C51 單片機(jī)是 8 位單片機(jī),4k 字節(jié) Flash 閃速存儲(chǔ)器,128 字節(jié)內(nèi)部RAM,32 個(gè) I/O 口線,兩個(gè)數(shù)據(jù)指針,兩個(gè) 16 位定時(shí)/計(jì)數(shù)器,一個(gè) 5 向量中斷結(jié)構(gòu),一個(gè)全雙工串口通信口,片內(nèi)振蕩器及時(shí)鐘電路。采用 LCP2138 單片機(jī)作為 CPU該芯片其本身自帶 A/D 轉(zhuǎn)換功能,帶大容量的 32K