智能轉(zhuǎn)速測量系統(tǒng)的軟件設(shè)計.doc
智能轉(zhuǎn)速測量系統(tǒng)的軟件設(shè)計,摘 要轉(zhuǎn)速是工程中應(yīng)用非常廣泛的一個參數(shù),其測量方法較多,隨著單片機對脈沖數(shù)字信號的處理能力越來越強大,使得全數(shù)字量系統(tǒng)越來越普及,并且使轉(zhuǎn)速測量系統(tǒng)也可以用全數(shù)字化處理。本文在對了解轉(zhuǎn)速測量理論與掌握單片機原理的基礎(chǔ)上,根據(jù)硬件設(shè)計,提出系統(tǒng)程序設(shè)計方案,構(gòu)建軟件系統(tǒng),以實現(xiàn)智能轉(zhuǎn)速測量與顯...
內(nèi)容介紹
此文檔由會員 lanxin520 發(fā)布智能轉(zhuǎn)速測量系統(tǒng)的軟件設(shè)計
摘 要
轉(zhuǎn)速是工程中應(yīng)用非常廣泛的一個參數(shù),其測量方法較多,隨著單片機對脈沖數(shù)字信號的處理能力越來越強大,使得全數(shù)字量系統(tǒng)越來越普及,并且使轉(zhuǎn)速測量系統(tǒng)也可以用全數(shù)字化處理。
本文在對了解轉(zhuǎn)速測量理論與掌握單片機原理的基礎(chǔ)上,根據(jù)硬件設(shè)計,提出系統(tǒng)程序設(shè)計方案,構(gòu)建軟件系統(tǒng),以實現(xiàn)智能轉(zhuǎn)速測量與顯示的功能。
本設(shè)計根據(jù)基于AT89C51單片機的測速測量電路,設(shè)計出轉(zhuǎn)速測量軟件系統(tǒng),此系統(tǒng)包含系統(tǒng)初始化程序的設(shè)計、鍵盤掃描程序的設(shè)計、數(shù)據(jù)接收和處理程序的設(shè)計、顯示程序的設(shè)計四個模塊。對所設(shè)計的軟件系統(tǒng)通過μVision3軟件對其進行程序調(diào)試。最后,對構(gòu)建的系統(tǒng)利用設(shè)計的電路進行調(diào)試,對測量指標進行了分析、比較并提出改進方案。在設(shè)計中測量方法采用M法進行測量,編譯語言采用C語言進行編譯。
本課題完成了軟件系統(tǒng)的設(shè)計,實現(xiàn)了智能轉(zhuǎn)速系統(tǒng)的轉(zhuǎn)速計算、顯示功能,同時實現(xiàn)鍵盤的開始/停止功能,完成了設(shè)計的要求。
關(guān)鍵詞:單片機 轉(zhuǎn)速測量 軟件設(shè)計
Intelligent rotational speed measurement system of software design
Abstract
Rotational speed is the engineering of a very wide range of parameters, its measurement more, with the SCM digital signal on the pulse of more and more powerful processing capability, making the volume of all-digital system is becoming increasingly popular, and so rotational speed measurement system can be used to deal with all-digital.
In this paper, the understanding of the theory and master rotational speed measurement based on the principle of SCM, the system program design, to build software systems, compiler, in order to achieve intelligent Rotational speed measurement and display functions. In this paper, accroding to the tachometric survey system based on the SCM of AT89C51, I designed the software part of it. This system includes four module: the initializer code design, the keyboard scanning code design, the data receiving and processing code design and the displaying code design. I set up them using the software ofμVision3. At last, the builded system is setted up through circuit. The measured index were analysed and compared and the improved programmes were proposed. M method was adopt in the measuring and the language of C was adopt to comple.
The design of software system of this project is completed. The function of calculating and displaying the speed of rotation and the beginning and stoping of keyboard are finished. Finally I achevie the requirment of design.
Key words: SCM tachometric survey Software Design
目錄
中文摘要 I
英文摘要 II
1 緒論 1
1.1課題研究目的和意義 1
1.2轉(zhuǎn)速測量在國內(nèi)外研究情況 1
1.3主要內(nèi)容和存在的問題 2
1.3.1研究的主要內(nèi)容 2
1.3.2需解決的問題 2
2 基于單片機的轉(zhuǎn)速測量方法及原理 3
2.1單片機測量轉(zhuǎn)速的方法 3
2.2轉(zhuǎn)速測量原理 4
2.2.1測周期法“T法” 4
2.2.2測頻法“M法” 4
2.2.3測頻測周法M/T法 5
3 智能轉(zhuǎn)速測量系統(tǒng)的硬件結(jié)構(gòu) 7
3.1系統(tǒng)的硬件結(jié)構(gòu) 7
3.2硬件電路中主要部件的介紹 9
4 智能轉(zhuǎn)速測量系統(tǒng)的軟件設(shè)計 11
4.1單片機C51的介紹 11
4.1.1單片機C語言與匯編語言 11
4.1.2 C51對標準C語言的擴展 12
4.2程序設(shè)計 12
4.2.1工作方式及控制字設(shè)置 12
4.2.2變量分配及程序的初始化 14
4.2.3顯示功能的實現(xiàn) 15
4.2.4鍵盤的功能的實現(xiàn)與設(shè)計 17
4.3系統(tǒng)流程 17
5 程序調(diào)試及固化 18
5.1單片機開發(fā)平臺簡介 18
5.2本系統(tǒng)開發(fā)平臺 18
5.2.1keil C51軟件集成開發(fā)環(huán)境 18
5.2.2程序調(diào)試 18
6 結(jié)論 22
6.1主要研究結(jié)論 22
6.2研究展望 23
參考文獻 24
致 謝 26
附錄 1 電路圖 29
附錄 2 源程序 30