基于單片機的風速測量的設計—軟件部分.doc
約46頁DOC格式手機打開展開
基于單片機的風速測量的設計—軟件部分,摘 要經(jīng)過50多年的單片機發(fā)展,單片機的性能價格比提高了千萬倍,主要體現(xiàn)在速度提高了千萬倍,存儲器容量提高了千萬倍,體積縮小了千萬倍,軟件性能提高了百萬倍,而價格卻降為萬分之幾。匯編語言作為用來使計算機工作的指令,與機器語言一一對應,它是用一些英語單詞和字符等作為助記符來描述每一條指令,每條指令的意義一目了然,給程序的...
內(nèi)容介紹
此文檔由會員 shixin7751 發(fā)布
摘 要
經(jīng)過50多年的單片機發(fā)展,單片機的性能價格比提高了千萬倍,主要體現(xiàn)在速度提高了千萬倍,存儲器容量提高了千萬倍,體積縮小了千萬倍,軟件性能提高了百萬倍,而價格卻降為萬分之幾。匯編語言作為用來使計算機工作的指令,與機器語言一一對應,它是用一些英語單詞和字符等作為助記符來描述每一條指令,每條指令的意義一目了然,給程序的編寫、閱讀和修改帶來了很大的方便。
本文介紹了51系列單片機,通過風速測量的硬件設計,畫出程序流程圖,編寫出風速測量的軟件程序,設計軟件定時器,選擇適當?shù)挠嫈?shù)器,接收三杯式風速傳感器的脈沖信號,用八位51單片機將其處理成風速信號,對相應時刻的平均風速進行計算,并保存一小時的數(shù)據(jù)以備查詢。
關鍵詞:單片機;風速測量;匯編語言;軟件程序
Abstract
After 50 years development of single chip microcontroller(SCM), its performance to price improved thousands of times, mainly in the following aspects: the speed increased thousands of times, the memory capacity improved thousands of times, meanwhile, the size became thousands of times smaller. While the performance of software increased a million times, the price dropped to only parts per ten-thousandth of the original. As the instructions used to make computer works, assembly language is one-to-one correspondence with machine language. It is a language which uses some English words and characters as the mnemonic symbols to describe each instruction. So the meaning of each instruction is clear, and this brings a big convenience to write, read and modify the program.
This paper introduces the 51 series microcontroller, through the wind speed measurement of hardware design, drawing the program flow chart, writing out software programs of the wind speed measurement , next designing software timer, selecting the appropriate counters, receiving the signal pulse from three-cup type wind speed sensor. Then the signal is processed into the wind speed signal with eight-bit 51 microcontroller, and then calculating the average wind speed of the corresponding moment, and saving an hour of data for reference.
Keywords: SCM; wind speed measurement ; assembly language; software program
目 錄
引 言 1
第一章 51系列單片機簡介 3
1.1單片機與PC機的比較 3
1.2 51系列單片機 3
1.2.1 51系列單片機產(chǎn)生及特性 3
1.2.2 51系列單片機功能 4
1.2.3單片機系統(tǒng)的啟動 8
第二章 系統(tǒng)硬件介紹 10
2.1 三杯式風速傳感器 10
2.2 信號處理電路 11
2.3 AT89C51單片機 13
第三章 軟件程序設計 15
3.1脈沖計數(shù)的程序設計 15
3.1.1計數(shù)器的結構及功能 15
3.1.2計數(shù)器的控制和狀態(tài)寄存器 16
3.1.3計數(shù)的程序框圖及子程序 17
3.2定時器的程序設計 19
3.3 十六進制數(shù)轉換十進制數(shù)程序設計 20
結 論 26
參考文獻 27
附 錄A 29
附 錄B 30
謝 辭 43
經(jīng)過50多年的單片機發(fā)展,單片機的性能價格比提高了千萬倍,主要體現(xiàn)在速度提高了千萬倍,存儲器容量提高了千萬倍,體積縮小了千萬倍,軟件性能提高了百萬倍,而價格卻降為萬分之幾。匯編語言作為用來使計算機工作的指令,與機器語言一一對應,它是用一些英語單詞和字符等作為助記符來描述每一條指令,每條指令的意義一目了然,給程序的編寫、閱讀和修改帶來了很大的方便。
本文介紹了51系列單片機,通過風速測量的硬件設計,畫出程序流程圖,編寫出風速測量的軟件程序,設計軟件定時器,選擇適當?shù)挠嫈?shù)器,接收三杯式風速傳感器的脈沖信號,用八位51單片機將其處理成風速信號,對相應時刻的平均風速進行計算,并保存一小時的數(shù)據(jù)以備查詢。
關鍵詞:單片機;風速測量;匯編語言;軟件程序
Abstract
After 50 years development of single chip microcontroller(SCM), its performance to price improved thousands of times, mainly in the following aspects: the speed increased thousands of times, the memory capacity improved thousands of times, meanwhile, the size became thousands of times smaller. While the performance of software increased a million times, the price dropped to only parts per ten-thousandth of the original. As the instructions used to make computer works, assembly language is one-to-one correspondence with machine language. It is a language which uses some English words and characters as the mnemonic symbols to describe each instruction. So the meaning of each instruction is clear, and this brings a big convenience to write, read and modify the program.
This paper introduces the 51 series microcontroller, through the wind speed measurement of hardware design, drawing the program flow chart, writing out software programs of the wind speed measurement , next designing software timer, selecting the appropriate counters, receiving the signal pulse from three-cup type wind speed sensor. Then the signal is processed into the wind speed signal with eight-bit 51 microcontroller, and then calculating the average wind speed of the corresponding moment, and saving an hour of data for reference.
Keywords: SCM; wind speed measurement ; assembly language; software program
目 錄
引 言 1
第一章 51系列單片機簡介 3
1.1單片機與PC機的比較 3
1.2 51系列單片機 3
1.2.1 51系列單片機產(chǎn)生及特性 3
1.2.2 51系列單片機功能 4
1.2.3單片機系統(tǒng)的啟動 8
第二章 系統(tǒng)硬件介紹 10
2.1 三杯式風速傳感器 10
2.2 信號處理電路 11
2.3 AT89C51單片機 13
第三章 軟件程序設計 15
3.1脈沖計數(shù)的程序設計 15
3.1.1計數(shù)器的結構及功能 15
3.1.2計數(shù)器的控制和狀態(tài)寄存器 16
3.1.3計數(shù)的程序框圖及子程序 17
3.2定時器的程序設計 19
3.3 十六進制數(shù)轉換十進制數(shù)程序設計 20
結 論 26
參考文獻 27
附 錄A 29
附 錄B 30
謝 辭 43