![EDA技術(shù)課程設計出租車自動計費系統(tǒng)_第1頁](http://file2.renrendoc.com/fileroot_temp3/2021-6/19/24b97081-eed6-48fc-822d-d972f50b0354/24b97081-eed6-48fc-822d-d972f50b03541.gif)
![EDA技術(shù)課程設計出租車自動計費系統(tǒng)_第2頁](http://file2.renrendoc.com/fileroot_temp3/2021-6/19/24b97081-eed6-48fc-822d-d972f50b0354/24b97081-eed6-48fc-822d-d972f50b03542.gif)
![EDA技術(shù)課程設計出租車自動計費系統(tǒng)_第3頁](http://file2.renrendoc.com/fileroot_temp3/2021-6/19/24b97081-eed6-48fc-822d-d972f50b0354/24b97081-eed6-48fc-822d-d972f50b03543.gif)
![EDA技術(shù)課程設計出租車自動計費系統(tǒng)_第4頁](http://file2.renrendoc.com/fileroot_temp3/2021-6/19/24b97081-eed6-48fc-822d-d972f50b0354/24b97081-eed6-48fc-822d-d972f50b03544.gif)
![EDA技術(shù)課程設計出租車自動計費系統(tǒng)_第5頁](http://file2.renrendoc.com/fileroot_temp3/2021-6/19/24b97081-eed6-48fc-822d-d972f50b0354/24b97081-eed6-48fc-822d-d972f50b03545.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、課 程 設 計課 程 eda技術(shù)課程設計 題 目 出租車自動計費系統(tǒng) 院 系 電子科學學院 專業(yè)班級 電子信息工程 學生姓名 學生學號 指導教師 東北石油大學課程設計任務書課程 eda技術(shù)課程設計題目 出租車自動計費系統(tǒng)專業(yè) 電子信息工程 姓名 宋延龍 學號 070901140316主要內(nèi)容、基本要求、主要參考資料等主要內(nèi)容:設計一個最大量程為99.99元的出租車自動計費,計費器具有行車里程計費、等候時間計費及起價三部分功能,并用數(shù)碼管顯示車費的數(shù)目?;疽螅?、設計一個出租車自動計費器,具有行車里程計費、等候時間計費、及起價三部分,用四位數(shù)碼管顯示總金額,最大值為99.99元;2、行車里程
2、單價1元/公里,等候時間單價0.5元/10分鐘,起價3元(3公里起價)均能通過人工輸入。3、行車里程的計費電路將汽車行駛的里程數(shù)轉(zhuǎn)換成與之成正比的脈沖數(shù),然后由計數(shù)譯碼電路轉(zhuǎn)換成收費金額,實驗中以一個脈沖模擬汽車前進十米,則每100個脈沖表示1公里,然后用bcd碼比例乘法器將里程脈沖乘以每公里單價的比例系數(shù),比例系數(shù)可由開關(guān)預置。例如單價是1.0元/公里,則脈沖當量為0.01元/脈沖。4、用led顯示行駛公里數(shù),兩個數(shù)碼管顯示收費金額。主要參考資料:1 潘松著.eda技術(shù)實用教程(第二版). 北京:科學出版社,2005.2 康華光主編.電子技術(shù)基礎 模擬部分. 北京:高教出版社,2006.3
3、閻石主編.數(shù)字電子技術(shù)基礎. 北京:高教出版社,2003. 完成期限 2011.3.11 指導教師 專業(yè)負責人 2011年 3月7日一、總體設計思想1.基本原理隨著出租車行業(yè)的發(fā)展,出租車已經(jīng)是城市交通的重要組成部分,從加強行業(yè)管理以及減少司機與乘客的糾紛出發(fā),具有良好性能的計價器對出租車司機和乘客來說都是很必要的。而采用模擬電路和數(shù)字電路設計的計價器整體電路的規(guī)模較大,用到的器件多,造成故障率高,難調(diào)試。而采用單片機進行的設計,相對來說功能強大,用較少的硬件和適當?shù)能浖嗷ヅ浜峡梢院苋菀椎貙崿F(xiàn)設計要求,且靈活性強,可以通過軟件編程來完成更多的附加功能。本設計采用at89s52單片機為主控器,
4、以a44e霍爾傳感器測距,實現(xiàn)對出租車的多功能的計價設計,輸出采用8段數(shù)碼顯示管。大體設計思路為把傳感器安裝在車輪上,主要檢測汽車行進的公里數(shù),并產(chǎn)生一系列相應的脈沖輸出,脈沖送到單片機進行處理,單片機根據(jù)程序設定通過計算脈沖數(shù)換算出行駛公里數(shù),再根據(jù)從eeprom中讀取的價格等相關(guān)數(shù)據(jù)進行金額的計算,計算好的金額、里程和單價都實時地顯示在數(shù)碼管上。獨立鍵盤可以調(diào)節(jié)價格等相關(guān)數(shù)據(jù),按下相應的按鈕,產(chǎn)生信號交由單片機處理并實時顯示出來,調(diào)節(jié)好的數(shù)據(jù)存儲到eeprom中,掉電后可以使調(diào)好的數(shù)據(jù)不丟失,系統(tǒng)結(jié)構(gòu)圖如圖。2.設計框圖根據(jù)計費器設計要求,可將該系統(tǒng)分成四大模塊,一塊為計費模塊,一塊為時間
5、計時模塊,一塊為路程控制模塊,另一塊為輸出顯示模塊。速度控制模塊路程控制模塊計費模塊掃描顯示模塊二、設計步驟和調(diào)試過程1、總體設計電路 主控機系統(tǒng)采用了atmel 公司生產(chǎn)的 at89s52單片機,它含有256 字節(jié)數(shù)據(jù)存儲器,內(nèi)置8k 的電可擦除flash rom,可重復編程,大小滿足主控機軟件系統(tǒng)設計,所以不必再擴展程序存儲器。復位電路和晶振電路是at89s52 工作所需的最簡外圍電路。單片機最小系統(tǒng)電路圖如下圖所示。2、模塊設計和相應模塊程序2.1速度控制程序如下:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_un
6、signed.all;entity sudukongzhi isport(clk,reset,start:in std_logic; k:in std_logic_vector(2 downto 0); clkout:out std_logic);end sudukongzhi;architecture fun of sudukongzhi is signal count1:std_logic_vector(1 downto 0); signal tmpclk,clks:std_logic; begin kinside=000-k; clks_label: process(reset,clk)
7、 variable count2:std_logic_vector(2 downto 0); begin if reset=0 then count2:=000; elsif (clkevent and clk=1) then if start=1 then if count2=kinside then count2:=000; end if; if not(k=000) then count2:=count2+1; end if; if count2=001 then tmpclk=not tmpclk; end if;end if;end if;end process; clkout=tm
8、pclk;end fun;2.2路程控制程序如下:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity luchengkongzhi isport(clk,reset:in std_logic; lucheng1:out std_logic_vector(3 downto 0); lucheng2:out std_logic_vector(3 downto 0);end luchengkongzhi;architecture fun
9、 of luchengkongzhi isbegin process(clk,reset) variable mm:std_logic_vector(11 downto 0); begin if reset=0 then elsif clkevent and clk=1 then if mm(3 downto 0)=1001then mm:=mm+7; else mm:=mm+1; end if; if mm(7 downto 4)=1010then mm:=mm+01100000; end if; if mm(11 downto 8)=1010then mm:=mm+011000000000
10、; end if; end if; lucheng1=mm(3 downto 0); lucheng2=mm(7 downto 4); lucheng3=mm(11 downto 8); end process;end fun; 2.3計費模塊程序如下:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity jifeimokuai isport(clk,reset:in std_logic; judge2:in std_logic_v
11、ector(3 downto 0); judge3:in std_logic_vector(3 downto 0); jifei1:out std_logic_vector(3 downto 0); jifei2:out std_logic_vector(3 downto 0); jifei3:out std_logic_vector(3 downto 0); jifei4:out std_logic_vector(3 downto 0);end jifeimokuai;architecture fun of jifeimokuai issignal en:std_logic;signal s
12、houfei:std_logic_vector(7 downto 0);signal shoufeijishu:std_logic_vector(15 downto 0);begin shoufei=00110011when(shoufeijishu(15)=1) or(shoufeijishu(14)=1) or(shoufeijishu(13)=1) else00100010;en=0 when judge3=0000 and judge2(3 downto 2)=00 and (judge2(1)=0)or (judge2(1)=1 and judge2(0)=0) else 1; pr
13、ocess(clk,reset) variable mm:std_logic_vector(15 downto 0); begin if reset=0then mm:=0000011100000000; elsif clkevent and clk=1 then if en=1 then mm:=mm+shoufei; end if; if mm(3)=1 and (not(mm(2 downto 1)=00)then mm:=mm+6; end if; if mm(7)=1 and (not(mm(6 downto 5)=00)then mm:=mm+01100000; end if; i
14、f mm(11)=1 and (not(mm(10 downto 9)=00)then mm:=mm+011000000000; end if; if mm(15 downto 12)=1010then mm:=mm+0110000000000000; end if; end if; jifei1=mm(3 downto 0); jifei2=mm(7 downto 4); jifei3=mm(11 downto 8); jifei4=mm(15 downto 12); shoufeijishu=mm; end process; end fun;2.4掃描顯示模塊程序如下:library ie
15、ee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity xianshimokuai isport(clk:in std_logic; p8:in std_logic_vector(3 downto 0); p7:in std_logic_vector(3 downto 0); p6:in std_logic_vector(3 downto 0); p5:in std_logic_vector(3 downto 0); p4:in std_logic_vector(3 downto 0); p3:in std_l
16、ogic_vector(3 downto 0); p2:in std_logic_vector(3 downto 0); p1:in std_logic_vector(3 downto 0); xuanze:out std_logic_vector(7 downto 0); shuzhi:out std_logic_vector(7 downto 0);end entity;architecture fun of xianshimokuai is signal count:std_logic_vector(2 downto 0); signal tmp:std_logic_vector(3 d
17、ownto 0); signal choicein:std_logic_vector(7 downto 0); signal datain:std_logic_vector(7 downto 0);begin clk1_label: process(clk) begin if clkevent and clk=1 then count=count+1; end if; end process; clk2_label: process(clk) begin if clkevent and clk=0 then xuanze=choicein; shuzhi(7 downto 1)=datain(
18、7 downto 1); if(count=0110 or count=0010) then shuzhi(0)=1; else shuzhi(0)=0; end if; end if; end process; choicein=11111110 when count=000else 11111101 when count=001else 11111011 when count=010else 11110111 when count=011else 11101111 when count=100else 11011111 when count=101else 10111111 when co
19、unt=110else 01111111; tmp=p1 when count=000else p2 when count=001else p3 when count=010else p4 when count=011else p5 when count=100else p6 when count=101else p7 when count=110else p8; with tmp select datain(7 downto 1)=1111110 when 0000, 0110000 when 0001, 1101101 when 0010, 1111001 when 0011, 0110011 when 0100, 1011011 when 0101, 1011111 when 0110, 1110000 wh
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 《大學物理(上冊)》課件-第1章
- 2025-2030全球車輛燃油油位計行業(yè)調(diào)研及趨勢分析報告
- 2025-2030全球電積銅行業(yè)調(diào)研及趨勢分析報告
- 2025年全球及中國直接空氣捕獲和儲存(DACS)行業(yè)頭部企業(yè)市場占有率及排名調(diào)研報告
- 2025-2030全球多層土壤傳感器行業(yè)調(diào)研及趨勢分析報告
- 2025年全球及中國阻燃塑料薄膜和片材行業(yè)頭部企業(yè)市場占有率及排名調(diào)研報告
- 2025-2030全球醫(yī)用手指康復訓練儀行業(yè)調(diào)研及趨勢分析報告
- 2025-2030全球化學谷物熏蒸劑行業(yè)調(diào)研及趨勢分析報告
- 2025年全球及中國智慧教育公共服務平臺行業(yè)頭部企業(yè)市場占有率及排名調(diào)研報告
- 2025年全球及中國工業(yè)膠囊填充設備行業(yè)頭部企業(yè)市場占有率及排名調(diào)研報告
- 2025年度院感管理工作計劃(后附表格版)
- 勵志課件-如何做好本職工作
- 化肥銷售工作計劃
- 2024浙江華數(shù)廣電網(wǎng)絡股份限公司招聘精英18人易考易錯模擬試題(共500題)試卷后附參考答案
- 2024年山東省濟南市中考英語試題卷(含答案解析)
- 2024年社區(qū)警務規(guī)范考試題庫
- 2025中考英語作文預測:19個熱點話題及范文
- 第10講 牛頓運動定律的綜合應用(一)(講義)(解析版)-2025年高考物理一輪復習講練測(新教材新高考)
- 靜脈治療護理技術(shù)操作標準(2023版)解讀 2
- 2024年全國各地中考試題分類匯編(一):現(xiàn)代文閱讀含答案
- GB/T 30306-2024家用和類似用途飲用水處理濾芯
評論
0/150
提交評論