【正文】
遍提供了擴展方便,靈活、電路系統(tǒng)簡單的串行擴展方式 ??梢詮母鱾€角度進行測控數(shù)據(jù)的傳輸 , 可以實現(xiàn)多個測控儀器設(shè)備間的連網(wǎng) , 便于進行集中監(jiān)測與控制。 因此我們提出了一個新型的解決此類問題的方案 ——基于藍牙技術(shù)的 無線語音安全 提示系統(tǒng)。 本文將單片機技術(shù)和藍牙無線通信技術(shù)相結(jié)合,設(shè)計了一個基于藍牙技術(shù)的安全提示系統(tǒng) ,應(yīng)用非常廣泛,該系統(tǒng)由兩部分組成,一部分是安全提示點,用來給攜帶了另一個系統(tǒng)的人發(fā)送危險提示信號;另一部分是接收安全提示點發(fā)來的信號且選擇事先存好的語音信息,然后用語音 的形式播放出來。但是,由于私家車的數(shù)量的日益增多,盲人群體生活的不便捷,以及許多電器和生活必需品都存在多多少少的安全隱患,這些都對社會安全構(gòu)成了威脅。 關(guān)鍵詞 : 藍牙, 單片機 技術(shù),無線通信 貴州大學(xué)本科畢業(yè)論文(設(shè)計) 第 V頁 SAFETY REMINDING SYSTEM BASED ON BLUETOOTH Abstract With the development of the economy and the improvement of people’s living standard ,people’s requirement of life have increased ,so families, enterprises, institutions and public places are equipped with a wide variety of electrical appliance. While the number of private cars is increasing, the inconvenience of the blind, what’s more ,the appliances and necessities are unsafe to some degree, the state of affairs above have threaten the safety of our society. In families, people fet closing of the gas because of negligence, such situations are very mon .Lightly, they are pernicious to health ,seriously, they will kill people, thus bring tragedy to people. When some institutions or stores catch fire, and no one notice that, in the long run it will cause serious consequences. The numbers of private cars has increased , many drivers are not familiar with the plexity of the road information or signs , they are likely to cause some traffic accidents, while the tip relies mainly on the information on the highway sides of the signpost currently, if it is rainy or foggy ,these signs will be greatly reduced visibility, which could make the drivers miss some important information and cause unnecessary trouble. The dangers are often happen to the blind because of visually impaired. This paper bine the single chip microputer with bluetooth wireless munication technology, and design a safety reminding system based on bluetooth, technology ,which is widely applied, this system is consists of two parts, one is safety reminding used to give hints of another system which carries the risk, The other part is receiving safety reminding and choose the voice information which has been stored in advance , then it will broadcast it . Firstly, this paper the background and the studying significance of the system, secondly, it gives a brief introduction and some technology involved, thirdly the paper puts forward the design concept of the system, finally it introduce the process of the design and realize of the system in module. The model of the system realized in the paper support a serious of feasible program for the information reminding of roads. With the consummatement and expanding of the system’s function . The safety reminding system based on buetooth technology will be 貴州大學(xué)本科畢業(yè)論文(設(shè)計) 第 VI 頁 widely used and obtain people’s approval . Keywords: Bluetooth, STC89C51 Single Chip Computer, Wireless Communication 貴州大學(xué)本科畢業(yè)論文(設(shè)計) 第 1 頁 第一章 緒論 背景分析 隨著中國公路和交通事業(yè)的蓬勃發(fā)展,中國的公路網(wǎng)規(guī)模在不斷的擴大,公路網(wǎng)不斷變得密集,據(jù)中國交通部權(quán)威人士介紹, 2020 年前中國公路仍將處于較快的發(fā)展階段,仍將進行全球最大規(guī)模的路網(wǎng)建設(shè)。另外通過圖標(biāo)與語音相結(jié)合的方式,能夠使駕駛員充分了解道路狀況,避免誤解。 如 今單片微型計算機發(fā)生了巨大的變化,歸納起來有: ROM 應(yīng)用技術(shù)得到發(fā)展。首先介紹 MCS51 單片機 系統(tǒng),包括 MCS51單片機的硬件和軟件編程技術(shù) ;接著介紹 本設(shè)計用到的 藍牙 模塊 的基本結(jié)構(gòu)、 基本功能、無線通信技術(shù) 等 。 3) 控制信號引腳 RST 為復(fù)位信號輸入端 ; VPD 為內(nèi)部 RAM 的備用電源輸入端 ; PSEN 外部程序存儲器的讀選通信號 ; ALE 地址鎖存允許信號 。 貴州大學(xué)本科畢業(yè)論文(設(shè)計) 第 5 頁 圖 單片機內(nèi)部 結(jié)構(gòu)示意圖 本設(shè)計中涉及到的主要 通信 技術(shù) (1) 計算機串行通 信基礎(chǔ) 隨著多微機系統(tǒng)的廣泛應(yīng)用和計算機網(wǎng)絡(luò)技術(shù)的普及,計算機的通信功能愈來愈顯得重要。 圖 串行數(shù)據(jù)傳輸 示意圖 接收設(shè)備發(fā)送設(shè)備8 位 順 次 傳 送D 0D 7 貴州大學(xué)本科畢業(yè)論文(設(shè)計) 第 6 頁 串行通信的特點:傳輸線少,長距離傳送時成本低,且可以利用電話網(wǎng)等現(xiàn)成的設(shè)備,但數(shù)據(jù)的傳送控制比并行通信復(fù)雜。 2)串行通信 的傳輸方向 ? 單工 單工是指數(shù)據(jù)傳輸僅能沿一個方向,不能實現(xiàn)反向傳輸。當(dāng)接收機的 SM2=1 時可以利用收到的 RB8 來控制是否激活 RI( RB8= 0 時不激活 RI,收到的信息丟棄; RB8= 1時收到的數(shù)據(jù)進入 SBUF,并激活 RI,進而在中斷服務(wù)中將數(shù)據(jù)從 SBUF 讀走)。可以用作數(shù)據(jù)的奇偶校驗位,或在多機通信中,作為地址幀 /數(shù)據(jù)幀的標(biāo)志位。在方式 0時,當(dāng)串行接收第 8 位數(shù)據(jù)結(jié)束時,或在其它方式,串行接收停止位的中間時,由內(nèi)部硬件使 RI 置 1,向 CPU 發(fā)中斷申請。 圖 異步通信傳送幀 示意圖 ? 方式 1 輸出 圖 方式 1 輸出 示意圖 停止位數(shù) 據(jù) 位 8 位起始位L S B M S B空閑空閑D 0D 71 幀 共 1 0 位D 0 D 1 D 2 D 3 D 4 D 5 D 6 D 7寫 入 S B U F停 止 位T X DT I ( 中 斷 標(biāo) 志 )起 始 貴州大學(xué)本科畢業(yè)論文(設(shè)計) 第 10 頁 ? 方式 1 輸入 圖 方式 1 輸入 示意圖 用軟件置 REN 為 1 時,接收器以所選擇波特率的 16 倍速率采樣 RXD 引腳電平,檢測到 RXD 引腳輸入電平發(fā)生負跳變時,則說明起始位有效,將其移入輸入移位寄存器,并開始接收這一幀信息的其余位 。 fosc 方式 1 的波特率 =( 2SMOD/32) 具體步驟如下: ? 確定 T1 的工作方式(編程 TMOD 寄存器); ? 計算 T1 的初值,裝載 TH TL1; ? 啟動 T1(編程 TCON 中的 TR1 位); ? 確定串行口控制(編程 SCON 寄存器); 串行口在中斷方式工作時,要進行中斷設(shè)置(編程 IE、 IP寄存器)。 uVision2 允許用戶在編輯時設(shè)置程序斷點(甚至在源代碼未經(jīng)編譯和匯編之前)。主要優(yōu)點是:可以隨時隨地用無線接口來代替有線電纜連接;具有很強的移植性,可以用于多種場合,如 WAP、 GSM、 DECT 等,引入身份識別后可以靈活的實現(xiàn)漫游;功耗低,對人體危害較?。凰{牙的集成電路應(yīng)用簡單、成本低廉、實現(xiàn)容易、易于 推廣。兩個或多個微微網(wǎng)可以連接組成分布式網(wǎng)( Scatter ),或稱散射網(wǎng)。 與其他無線技術(shù)一樣,藍牙技術(shù)中微微網(wǎng)通過使用各種信道來實現(xiàn)數(shù)據(jù)的無線傳輸。 查詢:查詢時主 設(shè)備 用來查找可監(jiān)視區(qū)域中的藍牙設(shè)備,以便通過收集來自從 設(shè)備響應(yīng)查詢消息中得到該設(shè)備 的 地址和時鐘,查詢過程使用 IAC。 連接狀態(tài)以主 設(shè)備 發(fā)送一個 POLL 分組開始,表示連接已經(jīng)建立,此時分組包可以在主從 設(shè)備 間來回發(fā)送。 ( 3) 電話傳送控制協(xié)議: TCS 二進制、 AT 命令集。 系統(tǒng)配置 根據(jù)系統(tǒng)功能以及 設(shè)計單片機 系統(tǒng)的要求,開發(fā) 此系統(tǒng)需要以下主要配置: ( 1)開發(fā)環(huán)境: keil uVision2, Proteus , Windows7 系統(tǒng) ( 2)開發(fā)語言: C 語言 、匯編語言 ( 3)硬件: STC89C5 STC89C54; 藍牙模塊 (主從) ; 干電池 ; 語音模塊 WTV020SD; 揚聲器( , 8 ) SD 卡 (1G)。 車載系統(tǒng)包括以上 四 個模塊,硬件結(jié)構(gòu)框圖 如圖 所示。 貴州大學(xué)本科畢業(yè)論文(設(shè)計) 第 22 頁 第四章 模塊設(shè)計與實現(xiàn) 本章主要介紹了系統(tǒng)設(shè)計與實現(xiàn)的過程和方法。數(shù)據(jù)終端查詢到可用的服務(wù)信息后,就可以開始建立連接 (如果發(fā)現(xiàn)沒有需要的服務(wù),就放棄本次的連接請求 )。連接拆除各層的操作順序與建立時剛好相反。能加載 WAV格式語音和 AD4格式語音。支持 6KHz~ 32KHz、 36KHz采樣率的 AD4語音和 6KHz~ 16KHz采樣率的 WAV音頻,能自 動 識別語音采樣率以及語音文件格式。沒有發(fā)碼 時 CLK跟 DI都要置 于高電平。 注意:在將錄制好的語音文件拷貝到 miniSD卡之前,必須將 SD卡 FAT格式化,格式化以后直接把錄好的語音文件拷貝到 SD卡的根目錄就可以了。(實際上本設(shè)計中要發(fā)生的信息量非常小,只發(fā)生一個編碼,幾乎可以忽略不