【正文】
基于單片機出租車計費器的設計 摘 要 本設計的是一個基于單片機 AT89S52的出租車自動計費設計 ,附有復位電路 ,時鐘電路 ,鍵盤電路等。復位電路是單片機的初始化操作 ,除了正常的初始化外 ,為擺脫困境 ,通過復位電路可以重新開始。時鐘電路采用 12MHz的晶振 ,作為系統(tǒng)的時鐘源 ,具有較高的準確性。 在上電時字符型液晶 1602 顯示最初的起步價,里程收費,等待時間收費三種收費,通過按鍵可以調(diào)整起步價,里程收費,等待時間收費。通過按鍵模擬出租車的運行,暫停,停止。在 1602 液晶上可以顯示運行的時間,運行時暫停的時間,通過計算可以得出總共的費用和總的路程。在這里主要是以 AT89S52單片機為核心控制器, P0口接 1602液晶顯示模塊,P1口接按鍵的,通過按鍵輸入。 關鍵字 AT89S52; 1602液晶;出租車計費器 ABSTRACT The design is based on a monolithic integrated circuit AT89S52 taxi billing design, with reset circuit, clocking circuit, keyboard circuit. Reset circuit is initialized, besides the normal operation of the initial dilemma, as a foreigner, through the reset circuit can start again. 12MHz adopts the clock circuit, as a system of crystal oscillator, higher clock source. The characters in the crystal that the initial 1602, charges, fees mileage waiting time, three buttons can be adjusted by charging fees, just waiting time, mileage. Through the simulation of the taxi, buttons, stop. Suspension In the liquid crystal display can run 1602, operation time, when suspension can be obtained by the putation of the total is mainly for the core controller, AT89S52 SCM P0 mouth after 1602 LCD module, P1 mouth after the keys, through the 1 keystroke. Keyword: AT89S52; 1602 LCD; Taxi devices 目 錄 1 課程設計書 3 課程設計任務 3 功能要求 3 課程設計方案 3 2 硬件電路設計 5 振蕩電路設計 4 復位電路設計 4 鍵盤接口電路 6 顯示電路 6 直流電機電路 7 單片機各引腳功能說明 7 2 L298和 1602液晶的簡介 9 3 軟件設計 13 單片機資源 13 單片機模塊18