基于51單片機的頻率計設計 - 圖文 - 下載本文

物理與電子工程學院 電子測量技術論文

2016--2017學年第2學期物電學院電子課程設計方案 《 電子技術課程設計 》 學號: 201472020218 姓名: 李鑫年 班級: 14級電子(2) 學 裝 訂 評語: (題目及要求) 線 基于單片機的頻率計 物理與電子工程學院 電子測量技術論文

目錄

摘 要 ...........................................................................................................................1 ABSTRACT ...........................................................................................................................2 第一章 緒 論 .............................................................................................................3 1.1 1.2

引言 .....................................................................................................................3 單片機簡介 .........................................................................................................3

1.2.1 單片機概述 ...................................................................................................3 1.2.2 單片機與單片機系統 ...................................................................................3 1.2.3 單片機的產生和發展 ...................................................................................2 1.2.4 單片機的應用領域 .......................................................................................3 1.2.5 MSC-51單片機 ............................................................................................5 1.3 1.4 1.5 1.6 1.7 1.8 1.9

頻率計數器概述 .................................................................................................5 PROTEUS軟件簡介 .................................................................................................7 C語言簡介 ..........................................................................................................7 KEILC51軟件開發系統簡介 ...............................................................................8 率計數器系統硬件組成 ...................................................................................10 AT89C51單片機簡介 ........................................................................................10 定時電路NE555 ................................................................................................13

1.10 LCD液晶顯示屏 ..............................................................................................16 1.10.1 1602字符液晶時序圖 ..............................................................................17 1.11 頻率計數器系統設計流程 ...............................................................................18 1.12 頻率計數器電路圖設計 ...................................................................................19 1.13 頻率計數器電路圖 ...........................................................................................19 1.14 數控直流穩壓電源介紹 ...................................................................................20 1.14.1 主要功能 .....................................................................................................21 1.14.2 雙15V電源原理 ........................................................................................21 1.14.3 總體思路 .....................................................................................................22 第二章 系統方案設計 .................................................................................................24 2.1

任務分析 ...........................................................................................................24

物理與電子工程學院 電子測量技術論文

2.1.1 設計任務與要求 .........................................................................................24 2.1.2 基本要求 .....................................................................................................24 2.1.3 課程設計學習要點 .....................................................................................25 2.2

三種方案比較 ...................................................................................................25

2.2.1 方案一 .........................................................................................................25 2.2.2 方案二 .........................................................................................................25 2.2.3 方案三 .........................................................................................................26 2.3

方案選擇 ...........................................................................................................27

第三章 軟件設計 .........................................................................................................28 3.1

程序流程圖設計 ...............................................................................................28

圖3—1系統程序流程圖 ...............................................................................................28 3.2 3.3 3.4

內容 ...................................................................................................................28 源程序設計 .......................................................................................................29 KEILC51進行源程序調試 ................................................................................30

第四章 設計詳情 .........................................................................................................31 4.1

硬件設計 ...........................................................................................................31

第五章 測試報告 .........................................................................................................34 5.1 5.2 5.3 5.4

測試準備 ...........................................................................................................34 測試詳細數據及分析 .......................................................................................34 測試心得 ...........................................................................................................43 所遇問題及解決方案 .......................................................................................43

第六章 總結與展望 .....................................................................................................49 致 謝 .........................................................................................................................50 參考文獻 .........................................................................................................................50 附錄A 頻率計仿真圖 ...............................................................................................51 附錄B 實物圖 ...............................................................................................................51 附錄C PCB圖 ...........................................................................................................52 附錄D 程序代碼 ...........................................................................................................53

物理與電子工程學院 電子測量技術論文

摘 要

近年來隨著計算機在社會領域的滲透和大規模集成電路的發展,單片機的應用正在不斷地走向深入,由于它具有功能強,體積小,功耗低,價格便宜,工作可靠,使用方便等特點,因此越來越廣泛地應用各個領域.

本文的頻率計系統是以單片機(AT89C51)為核心,利用AT89C51單片機的T0和T1的定時計數功能來完成對輸入的信號進行頻率計數,由時基集成電路NE555、液晶顯示屏等元器件以及C語言程序組成。具體介紹應用Proteus的ISIS軟件進行單片機系統的頻率設計與仿真的實現方法,以及Keil軟件的編譯與應用。該方法既能準確驗證所設計的系統是否滿足技術要求,又能提高系統設計的效率和質量,降低開發成本,具有推廣價值。

關鍵詞:AT89C51 NE555 頻率計 定時器 計數器

1

ABSTRACT

In recent years, with computers in the infiltration and the development of large-scale integrated circuits. SCM application is steadily deepening, as it has strong function, small size, low power dissipation, low prices, reliable, easy to use features, it is particularly suited to and control of the system, increasingly widely used in various fields.

This article describes an Frequency Counter is single-chip microcomputer (AT89C51) as the core, the Timer IC NE555, 7SEGMENT display led components, and the C language programming,such as .Describes the application of Proteus's ISIS software of the electronic single-chip system clock to achieve the design and simulation methods in details, and the application and coding of Keil.The method can not only test the property of the system precisely,but also improve development efficiency and reduce development cost,which values in popularity.

Keywords: AT89C51 NE555 Frequency Counter

2





3d走势图