【正文】
void write_mand(unsigned char addr,unsigned char hdat,unsigned char ldat)。sbit SCLK=P1^2。 spi_write(0)。 spi_write(0)。 while(!DREQ)。 write_mand(0x0b,VOL_VALUE,VOL_VALUE)。 DREQ=1。 spi_write(hdat)。 SCLK=0。 delay_ms(50)。 a=6。 } } if(key4==0) { delay_ms(10)。 if(key1==0) { do_beep()。 } } else { P0=table[b]。 delay_ms(1000)。 k=1。 delay_ms(1000)。 delay_ms(1000)。 while(!DREQ)。 spi_write(Floor[i*32+j])。 } }}//播放語音樓void write_Floor(){ unsigned int i,j。 XDCS=0。 for(i=0。i217。//數(shù)碼管顯示1~8;uchar code table[9]={0xff,0xf9,0xc4,0xd0,0x99,0x92,0x82,0xf8,0x80}。sbit key7=P3^6。從2011年9月份入學(xué)到現(xiàn)在,我從一個(gè)稚嫩青少年成長成為一名合格的畢業(yè)生,老師的教導(dǎo),輔導(dǎo)員的督促,同學(xué)的意見都幫助了我對自我的完善。對C語言的運(yùn)用更加熟練。系統(tǒng)運(yùn)行結(jié)果圖如圖51所示:圖51 系統(tǒng)運(yùn)行結(jié)果圖結(jié) 論通過此次電梯自動(dòng)語音提示系統(tǒng)的設(shè)計(jì),我學(xué)到了不少東西。在設(shè)計(jì)過程中曾遇到過程序無問題的情況下,用實(shí)驗(yàn)室電源供電時(shí)候系統(tǒng)正常運(yùn)行,但是換上干電池后,當(dāng)按鍵選擇樓層后,LED顯示屏能夠正常顯示樓層變化以及最終到達(dá)的樓層,但是音頻設(shè)備無聲音提示。各模塊程序段需要不斷調(diào)試直到程序完整的運(yùn)行正確無誤才行。因此都是作為編程者編程軟件的首選。 軟件開發(fā)環(huán)境準(zhǔn)備 在確定選用的編程語言為C語言后,由于C語言中同一種功能可以用多種不同的語句來實(shí)現(xiàn),所以在編程過程中首先要符合從簡的原則,然后再考慮是否能進(jìn)行拓展。最后前往音頻輸出設(shè)備。 (2) LED顯示模塊:主要負(fù)責(zé)在按鍵鍵入樓層信號(hào)后經(jīng)主機(jī)模塊的處理,然后顯示從當(dāng)前樓層到目標(biāo)樓層的樓層數(shù)得變化以及所到達(dá)的樓層。整個(gè)系統(tǒng)采用的電源電壓只需+5V電壓的直流輸出。(8) 低功耗運(yùn)行。2音頻層III)(CBR + VBR + ABR),WMA (5384kbit / s的),WAV(PCM + IMA ADPCM)。LED顯示器是利用二極管的發(fā)光原理來顯示所設(shè)定的內(nèi)容。高128個(gè)字節(jié)為特殊功能寄存器。Intel公司的MCS51系列8位單片機(jī)結(jié)構(gòu)完善、功能豐富、體系開發(fā),因而一直被人們所看好。3 系統(tǒng)硬件結(jié)構(gòu)設(shè)計(jì) 硬件的設(shè)計(jì)主要圍繞電梯的自動(dòng)語音提示功能實(shí)現(xiàn),在保證整個(gè)系統(tǒng)在運(yùn)行過程中的穩(wěn)定性、安全性的基礎(chǔ)上考慮一下生產(chǎn)的經(jīng)濟(jì)性。用P2口做8*8點(diǎn)陣的行選通,Pl口完成按鍵的讀取及確認(rèn)。本次設(shè)計(jì)的電梯自動(dòng)語言提示系統(tǒng)是通過按鍵按下控制實(shí)現(xiàn)電梯的上下行和指定的目標(biāo)樓層。本設(shè)計(jì)預(yù)想結(jié)果是接通電源后,系統(tǒng)進(jìn)行重置復(fù)位:采用矩陣鍵盤鍵入輸入信號(hào)到 AT89C52,AT89C52通過信號(hào)采集,進(jìn)行信號(hào)處理對LED模塊和語音模塊同時(shí)分別輸出信號(hào),實(shí)現(xiàn)自動(dòng)語音提示的功能。高端化、智能化電梯自動(dòng)語言提示系統(tǒng)的研發(fā)迫在眉睫。電梯是室內(nèi)交通必不可少的設(shè)備,隨著電梯使用的普及,電梯已經(jīng)不單單將運(yùn)載作為唯一的目的了。電梯讓人們在室內(nèi)上下樓層之間點(diǎn)交通變得方便順暢,解決了曾經(jīng)樓層之間只能靠步行上下樓梯的困擾。電梯的制造商們也針對各種乘客的需求開始從電梯的材質(zhì)和樣式上進(jìn)行突破,圓柱形、弧形、扇形的各種觀光電梯被廣泛應(yīng)用于各大建筑中。自電梯問世以來,電梯不斷高端化美觀化只能化,老式單純的升降電梯已經(jīng)成為了歷史,現(xiàn)代建筑中無論在什么場合安裝的電梯都是智能化、自動(dòng)化的,它們大多數(shù)都是由單片機(jī)或者嵌入式系統(tǒng)控制的。關(guān)鍵詞:自動(dòng)語音提示 單片機(jī) 語音模塊 上下行狀態(tài) AbstractThe elevator automatic voice prompt system is the modern all the brain and the nerve center of the lift. In addition to those who stay in order to protect the historical old elevator,no matter in what occasion of installation of the elevators are automatic, they are basically controlled by single chip microputer, advanced elevator also used the embedded system. First determine the design goal is to achieve the eight design of elevator voice prompt system model, through the single chip microputer, eight floors respectively from the buttons, LED digital tube display, VS1003 voice module four parts coordination work, realize the automatic voice prompt function . Hardware part is mainly posed of single chip microputer module, elevator button circuit simulation testing module,floor broadcast voice module, elevator has LED display module and floor broadcast voice module four parts. The system USES singlechip puter (AT89C52) as the core, using the keys pressed or not caused by the change of the level, as users request information sent to the singlechip microputer, singlechip microputer according to the detected signal control floor speech broadcast and up and down the floor. Software part using C language, the use of a query to the detection of the key information, the user requests the operation of the elevator to the floor, simulate keystrokes level change, sent to the singlechip microputer count to determine the floor number, and sent to the display module and speech module for display and speech broadcast respectively.Key words: automatic vioce prompt voice module single chip microputer voice module the status of up and down目 錄摘要 IAbstract II緒論 11 課題研究的背景 2 電梯自動(dòng)語音提示系統(tǒng)研究的背景與意義 2 電梯自動(dòng)語音提示系統(tǒng)的發(fā)展現(xiàn)狀 2 電梯自動(dòng)語音提示系統(tǒng)終端節(jié)點(diǎn)設(shè)計(jì)的主要內(nèi)容 22 系統(tǒng)總體設(shè)計(jì) 4 系統(tǒng)構(gòu)成框圖 4 總體設(shè)計(jì)思路 53 系統(tǒng)硬件結(jié)構(gòu)設(shè)計(jì) 6 AT89C52 6 LED顯示模塊 10 語音模塊 11 按鍵中斷模塊 13 電源電路模塊 13 電路總圖 144 系統(tǒng)軟件設(shè)計(jì) 15 軟件流程圖 16 語音模塊的數(shù)據(jù)流程 17 軟件的設(shè)計(jì)原則 18 軟件開發(fā)環(huán)境準(zhǔn)備 185 系統(tǒng)調(diào)試與結(jié)果 19 系統(tǒng)調(diào)試 19 系統(tǒng)結(jié)果 20結(jié)論 21致謝 22參考文獻(xiàn) 23附錄1程序源代碼 2433緒 論電梯是一種以電動(dòng)機(jī)為動(dòng)力的垂直升降機(jī),裝有箱狀吊艙,用于多層建筑乘人或載運(yùn)貨物。天津從慶生電機(jī)廠光榮接此任,通過長達(dá)三個(gè)月的不懈努力,國人自主研發(fā)并設(shè)計(jì)的第一部電梯問世了。單片機(jī)技術(shù)與各種語言