【正文】
4C02實現(xiàn)在系統(tǒng)掉電的時候保存里程信息,并能將自行車的里程數(shù)及速度用 LED實時顯示。I 摘 要 隨著居民生活水平的不斷提高,自行車不再僅僅是普通的運輸、代步的工具,而是成為人們娛樂、休閑、鍛煉的首選。文章詳細介紹了自行車的速度里程表的硬件電路和軟件設計。 關鍵詞: 里程 /速度;霍爾元件;單片機; LED 顯示II ABSTRACT With the developing of people’s life, the bicycle is not only the universal tool of transportation and substitute for walking, but bees the first choice of entertainment and exercising. The bicycle mileage/speed can fulfill the basic need of people’s life, so that they can learn the speed and the mileage of the bicycle. In this paper, the bicycle mileage/speed design based on the Hall element is elaborated. By AT89C52 as kernel, using A44E Hall element to measure revolution, the measure and statistic are achieved. The range information is saved by 24C02 when the power is off, the bicycle speed can be displayed on LED. In this article, the hardware circuit and software design of bicycle mileage/speed instrument are introduced in detail. About the hardware, the pulse number is transmitted of one cycle of the bicycle into Single Chip Microputer system. Then the signal processed by Single Chip Microputer system is sent to display scream. About the software, in assemble language。 LED III 目 錄 摘 要 .............................................................................................................. I 第一章 緒 論 .................................................................................................1 ........................................................................................... 1 單片機發(fā)展趨勢 ................................................................................ 1 ...................................................................... 3 第二章 系統(tǒng)總體方案設計 .............................................................................4 .................................................................................... 4 .................................................................................... 6 .................................................................................... 8 第三章 硬件電路設計 ..................................................................................10 ................................................................................................ 10 ........................................................................ 10 ............................................................... 11 ............................................................... 12 ........................................................................ 13 片機原理簡介 .......................................................................... 13 ............................................................... 15 ................................................................... 18 /計數(shù)功能介紹 .......................................................... 20 ........................................................................... 21 ............................................................................. 21 觸發(fā)器的選擇 ............................................................................ 22 74LS244芯片的介紹 ................................................................... 24 .................................................................... 24 .......................................................................... 24 .......................................................................... 26 .......................................................................... 27 本章小結 ......................................................................................... 29 IV 第四章 軟件程序設計 .................................................................................. 30 .......................................................................................... 30 ................................................................................... 30 斷子程序的設計 ............................................................................ 33 ..................................................................... 34 ............................................................................ 35 第五章 系統(tǒng)調試與分析 .............................................................................. 38 ................................................................................... 38 ........................................................................ 39 .......................................................................................... 41 ...................................................................................... 41 致 謝 ........................................................................................................ 43 參考文獻 ..................................................................................................... 44 附 錄 .......................................................................................................... 46 1 第一章 緒 論 課題 簡介 自行車被發(fā)明及使用到現(xiàn)在已有兩百多年的歷史,這兩百年間人類在不斷的嘗試與研發(fā)過程中,將玩具式的木馬車轉換到今日各式新穎休閑運動自行車,自行車發(fā)展的目的也從最早的交通代步的工具轉換成休閑娛樂運動的用途。本設計采用了 MCS51 系列單片機設計一種體積小、操作簡單的便攜式自行車的速度里程表,它能自動地顯示當前自行車行走的距離及運行的速度。 CMOS 雖然功耗較低,但由于其物理特征決定其工作速度不夠高,而 CHMOS 則具備了高速和低功耗的特點,這些 特征,更適合于在要求低功耗象電池供電的應用場合。此外,現(xiàn)在的產(chǎn)品普遍要求體積小、重量輕,這就要求單片機除了功能強和功耗低外,還要求其體積要小。而 Microchip 公司的 PIC精簡指令集 (RISC)也有著強勁的發(fā)展勢頭,中國臺灣的 HOLTEK公司近年的單片機產(chǎn)量與日俱增,與其低價質優(yōu)的優(yōu)勢,占據(jù)一定的市場分額。 本文首先扼要對該課題的任務進行方案論證,包括硬件方案和軟件方案的設計;繼而具體介紹了自行車的速度里程表的硬件設計,包括傳感器的選擇、單片機的選擇、顯示電路的設計;然后闡述了該自行車的速度里程表的軟件設計 ,包括數(shù)據(jù)處理