【正文】
設(shè)計(jì)(論文)專用紙 第 1 頁 目 錄 摘要 ....................................................................................................................................... 3 ABSTRACT .......................................................................................................................... 4 前言 ....................................................................................................................................... 5 1. 系統(tǒng)總體方案選定 .......................................................................................................... 7 出租車計(jì)價(jià)器系統(tǒng)構(gòu)成及工作原理 ..................................................................... 7 計(jì)價(jià)器各組成部分的功能 ..................................................................................... 7 里程檢測單元 ............................................................................................... 8 鍵盤控制及 LED 顯示部分 ......................................................................... 8 單片機(jī)部分 ................................................................................................... 8 2. 系統(tǒng)硬件設(shè)計(jì) .................................................................................................................. 9 里程檢測單元電路設(shè)計(jì) ......................................................................................... 9 按鍵控制及 LED 顯示電路設(shè)計(jì) ......................................................................... 11 按鍵控制部分 .............................................................................................. 11 六位 LED 動(dòng)態(tài)顯示電路 ............................................................................ 12 LED 的結(jié)構(gòu)及工作原理 ............................................................................. 14 三位一體 LED 的結(jié)構(gòu)及工作原理 ............................................................ 15 單片機(jī)部分的硬件設(shè)計(jì) ....................................................................................... 17 單片機(jī)的特點(diǎn) .............................................................................................. 17 AT89S51 的最小系統(tǒng) .................................................................................. 17 AT89S51I/O 端口 ........................................................................................ 18 3. 系統(tǒng)軟件設(shè)計(jì) ................................................................................................................ 20 主程序模塊 ............................................................................................................ 20 89S51 芯片內(nèi)部 RAM 分配 .................................................................................. 20 按鍵程序設(shè)計(jì) ....................................................................................................... 22 中途等待中斷服務(wù)程序 ........................................................................................ 23 設(shè)計(jì)(論文)專用紙 第 2 頁 里程計(jì)數(shù)服務(wù)程序 ................................................................................................ 24 BCD 譯碼子程序 ................................................................................................... 25 顯示服務(wù)子程序 .................................................................................................... 26 結(jié)論 ..................................................................................................................................... 27 總結(jié)與體會(huì) ......................................................................................................................... 29 致謝 ..................................................................................................................................... 30 參考文獻(xiàn) ............................................................................................................................. 31 附錄 1 源程序 ..................................................................................................................... 32 附錄 2 元件清單 ................................................................................................................. 41 附錄 3 電路圖 ..................................................................................................................... 42 附錄 4 英文翻譯 ................................................................................................................. 43 設(shè)計(jì)(論文)專用紙 第 3 頁 摘 要 隨著電子技術(shù)的發(fā)展 ,出租車計(jì)價(jià)器技術(shù)也在不斷進(jìn)步和提高 ,國內(nèi)出租車計(jì)價(jià)器已經(jīng)經(jīng)歷了四個(gè)階段的發(fā)展 ,從傳統(tǒng)的全部由機(jī)械元器件組成的機(jī)械式 ,到半電子式即用電子線路代替部分機(jī)械元器件的出租車計(jì)價(jià)器 ,再從集成電路式到目前的單片機(jī)系統(tǒng)設(shè)計(jì)的出租車計(jì)價(jià)器。 本設(shè)計(jì)是以單片機(jī) AT89S51 為核心 , 以 74LS04 芯片、 霍爾傳感器 A44E 和 LED數(shù)碼管為外設(shè)的出租車計(jì)價(jià)器的微機(jī)系統(tǒng)設(shè)計(jì),該系統(tǒng)滿足 集計(jì)程、計(jì)費(fèi)等主要功能為一體的出租車計(jì)價(jià)器的實(shí)用要求。其里程計(jì)算是將 A44E 霍爾傳感器安裝在車輪上并將檢測到的信號(hào)傳輸給單片機(jī),通過測量轉(zhuǎn)速來計(jì)算汽車的行 駛路程。設(shè)計(jì)中充分考慮了出租車行駛過程中的各種情況,利用按鍵設(shè)計(jì)來切換計(jì)費(fèi)模式。 給出了硬件電路圖及主程序流程圖 ,闡述了軟硬件設(shè)計(jì)過程中關(guān)鍵技術(shù)的處理。 關(guān)鍵詞: 計(jì)價(jià)器 ; 單片機(jī) ; 霍爾傳感器 ; 設(shè)計(jì)(論文)專用紙 第 4 頁 ABSTRACT Along with the electronic technology development, mileage fare meter technology is also progressing and the enhancement, the domestic rental car mileage fare meter has already experienced four stage development, from the tradition pletely the mechanical type which is posed by the mechanical primary device, namely replaces the part mechanical primary device to half electronic formula with the electronic circuit the rental car mileage fare meter, again from integrated circuit type to present monolithic integrated circuit system design rental car mileage fare meter. This design is take monolithic integrated circuit AT89S51 as a core, take 74LS04, A44E, LED numerical code tube and so on the chips as the peripheral rental car mileage fare meter microputer system design, this system satisfies the collection idea regulation, the