【正文】
畢業(yè)設(shè)計培養(yǎng)了我們獨立思考問題 ,分析 問題與解決問題的能力,在設(shè)計中我明白了理論與實踐有很大的區(qū) 別,理論上可以實現(xiàn)的,但要做具體的實物,卻要多方面考慮。如果出現(xiàn)看不到 12MHZ 的正弦波形的現(xiàn)象,說明此部分電路不正常 。 硬件檢測 設(shè)計的過程中,對硬件的檢測和對軟件的測試都不能忽略,因為在系統(tǒng)的仿真過程中。當(dāng)少量松香殘留時 ,可以用電烙鐵再輕輕加熱一下 ,讓松香揮發(fā)掉 ,也可以用蘸有無水酒精的棉球 ,擦去多余的松香或焊劑。若是要拆下印刷板上的元器件 ,則待烙鐵頭加熱后 ,用手或 鑷子輕輕拉動元器件 ,看是否可以取下。 常用排阻 有 A 型和 B 型。 調(diào)試的一般過程如圖 所示: 圖 系統(tǒng)調(diào)試流程圖 系統(tǒng)調(diào)試的一般過程是上電運行后觀察其運行狀態(tài),數(shù) 碼管是否點亮等。 另外為功能鍵,控制價格調(diào)整,這個按鍵是在沒有按下啟動 /停止按鍵時有作用,計價過程中無效。 A1(引腳 2):器件地址的 A1 位。 為了簡化硬件,通常將所有位的段碼線相應(yīng)段并聯(lián)在一起,由一個 8 位 I/O 口控制,在同一時刻,只讓一位選通,如此循環(huán),就可以使各位顯示出將要顯示的字符。 P0口接數(shù)碼管段選端, P2口接驅(qū)動芯片。 AT89S51 單片機簡介 AT89S51 具有如下特點: 40 個引腳, 4k Bytes Flash 片內(nèi)程序存儲器, 128 bytes 的隨機存取數(shù)據(jù)存儲器( RAM), 32 個外部雙向輸入 /輸出( I/O)口, 5 個中斷優(yōu)先級 2 層中斷嵌套, 2 個 16 位可編程定時計數(shù)器 ,2 個全雙工串行通信口,看門狗( WDT)電路,片內(nèi)時鐘振蕩器。 系統(tǒng)結(jié)構(gòu)圖如下: 系統(tǒng)結(jié)構(gòu)圖 通 過比較以上兩種方案,我們采用 方案二 實現(xiàn)出租車計價 器 的功能。s market will have the great potential. The taxi mileage fare meter is a digital instrument which has the function to demonstrate fare according to the customer use of the car and charge customer the total fee according to start price of the using car together with the mileage, and then it can demonstrates the corresponding course and amount through 8 sections of digital tubes. In this design, I am responsible for the part of hardware. This electric circuit takes AT89S51 monolithic integrated circuit as a center and that attaches A44E the Hall sensor range finder (in this electric circuit to replace with analog switch), which realizes the rental car valuation. The use of AT224C02 is to preserve the unit price when the present system power is failure. The output uses 8 sections of digital display tubes, demonstrating that goes the total course and the aggregate amount. The design of simulated rental car mileage fare meter: the fare meter can demonstrate the course of rode, preinstall start price and start distance in kilometer. 畢業(yè)設(shè)計 第 頁 III The traveling schedule realizes charge according to the entire journey, attaching the reset function and the start function. The fare meter starts the valuation after the beginning. We use the monolithic integrated circuit to carry on the design and use the little hardware and the suitable software coordination to realize the design mutually and flexibly, furthermore we can plete the more additional functions through the software programs and the application prospect is promising. Keywords: Taximeter Singlechip AT89S51 A44E Hall Sensor Power Preservation Eight Digital Display Tube 畢業(yè)設(shè)計 第 頁 I 目 錄 摘 要 ...................................................................... I Abstract ................................................................... II 第 1 章 緒 論 ................................................................ 1 課題背景 ............................................................ 1 設(shè)計目的與要求 ...................................................... 1 設(shè)計目的 ....................................................... 1 主要設(shè)計內(nèi)容及基本要求 ......................................... 1 方案論證與比較 ...................................................... 1 第 2 章 系統(tǒng)硬件設(shè)計 ......................................................... 3 硬件設(shè)計說明 ......................................................... 3 AT89S51 單片機簡介 ................................................... 3 硬件電路設(shè)計 ........................................................ 4 硬件組成 ............................................................ 5 驅(qū)動電路 ....................................................... 5 顯示電路 ....................................................... 6 復(fù)位電路 ....................................................... 7 掉電保護電路 ................................................... 8 時鐘電路 ....................................................... 9 按鍵電路 ....................................................... 9 第 3 章 系統(tǒng)軟 件設(shè)計 ........................................................ 10 軟件總體設(shè)計 ....................................................... 10 系統(tǒng)程序設(shè)計 ....................................................... 10 第 4 章 系統(tǒng)調(diào)試 ............................................................ 12 軟件調(diào)試 ........................................................... 12 編程工具 — C51 語言 ............................................ 12 程序調(diào)試工具 — KEIL ............................................ 12 單片機仿真軟件在線調(diào)試 — PROTEUS ............................... 13 硬件電路 ........................................................... 13 電路元件檢測 .................................................. 13 元件的焊接方法 ................................................ 14 硬件檢測 ........................................................... 15 總 結(jié) ..................................................................... 17 致 謝 ..................................................................... 18 參考文獻 ................................................................... 19 附錄 I參考文獻及譯文 ....................................................... 20 英文資料 ............................................................... 20 中文翻譯 ............................................................... 27 附錄Ⅱ程序源代碼 ........................................................... 31 附錄 III 電路仿真圖 ......................................................... 38 畢業(yè)設(shè)計 第 頁 1 第 1 章 緒 論 課題背景 隨著出 租車行業(yè)的發(fā)展, 出租車已經(jīng)是城市交通的重要組成部分,從加強行業(yè)管理以及減少司機與乘客的糾紛出發(fā),具有良好性能的計價器對出租車司機和乘客來說都是很必要的。 總線驅(qū)動器 74LS245 經(jīng)常用作三態(tài)數(shù)據(jù)緩沖器, 它也 是 8 路同相三態(tài)雙向總線收發(fā)器,可雙向傳輸數(shù)據(jù)。 ( 2)按模擬傳感器信號的按鍵, 顯示 行駛 里程與總金額。 2 按鍵替 代 霍爾傳感器的選用: 我們選用按鍵替代 傳感器,主要因為它接線簡單,價格便宜,同時對它的控制也是相對容易 ,易于實現(xiàn)的。 出租車計價器是根據(jù)客戶用車情況來自動顯示車費的數(shù)字儀表,根據(jù)用車起步價、行車里程計費求得客戶用車的總費用,并通過數(shù)碼管顯示相應(yīng)的里程及金額。通過對以上各 功能的設(shè)計,制作出的出租車計價器應(yīng)具有以下功能:上電時顯示全為零,通過按下啟動按鍵來開始計價,數(shù)碼管開始顯示起步價和起步金額;按下模擬開關(guān)按鍵來產(chǎn)生一個脈沖信號,模擬行駛的里程;