摘 要
數字電壓表是一種結構簡單、應用廣泛的測量儀表「,近年來越來越多地應用在電壓測量場合,因此對其測量精度、可靠性和可維護性的要▅求也越來越高。數字電壓表是也諸多數字化儀表的核心與基礎,其數字化是將連續的模擬量如直流電壓轉換〒成不連續的離散的數字形式並加以顯示,具有清晰直觀、讀數準確、擴展』功能強等特點。
本次畢業設計主要是為了實現可控的兩路直流數字電壓※表。
本次畢業設計對當前數字電壓表開發手段進行了比較和分析,最終確定了采用單片∏機技術實現兩路直流數字電壓表。本設計采Ψ 用單片機AT89C51做為主控◤制器,ADC0832作為A/D轉換器,把輸入的模擬信號轉換成數字信號,單片機↓對轉換的結果進行運算和處理,最後輸出驅動液晶顯示屏LCD1602顯示,並通過+5V電源為此系統供電。這種實現方法的優點是電路簡單,性能可靠,實時性好,操作簡單,編程容易。
該數字電壓表的整個系統具有低成本、易使用和穩定性高等特點。用單片機制作出的直流數字電壓表結構簡單,可靠性高,價格低廉,在相關領域有著◇不可忽視的市場前景。
關鍵詞:數字電壓表;單片機系統;AT89C51;ADC0832;LCD1602
Abstract
Digital voltmeter is a kind of simple structure, widely used in measuring instrument, in recent years more and more application in voltage measurement of occasions, so the measurement accuracy, reliability and maintainability demands more and more is also high. Digital voltmeter is also the core of many digital instrument with foundation, its digital is a analog quantities such as dc voltage converted into digital form of discrete discontinuous and it shows, with clear intuitive, readings accurate and function expansion strong characteristics.
The graduation design is mainly in order to achieve the controllable two road dc digital voltmeter.
The graduation design on the current digital voltmeter development methods were compared and analyzed, finally determined the one-chip computer technology to achieve two road dc digital voltmeter. This design USES the single-chip microcomputer AT89C51 do ADC0832 mainly controller, A/D converter, as the input analog signal converted into digital signals, the monolithic integrated circuit to convert results are operation and processing, finally outputs drive LCD screen, and through LCD1602 display system current supply power + 5V for. The advantages of this method is simple, reliable performance, circuit good real-time performance, simple operation, programming easier.
The digital voltmeter whole system has low cost, easy to use and stability higher characteristic. With single-chip computer produce dc digital voltmeter simple structure, high reliability, low prices in related fields have overlooked the market prospect.
Key Words: digital voltmeter; Microcomputer System;AT89C51; ADC0832;LCD1602
目 錄
摘 要 1
Abstract 2
1 引言 4
2 基於單片機的數字直流電壓表設計 6
2.1 主※要芯片選擇 6
2.1.1 AT89C51單片機簡介 6
2.1.2 AT89C51單片機的結構特點 7
2.1.3 AT89C51單片機的外部引腳 8
2.2 A/D轉換芯片ADC0832 11
2.2.1 ADC0832特點 11
2.2.2 ADC0832 與單片機的接口電路: 12
2.2.3 單片機對ADC0832 的控制原理: 12
2.3 LCD液晶顯示器 14
2.3.1液晶顯示器LCD1602簡介 14
2.3.2 LCD的基本指令 15
2.4 地址鎖存器74LS373 17
2.4.1 74LS373簡介 17
2.4.2 74LS373在單片機中的應用 18
3數字電壓表硬件電路設計 19
3.1 單片機系統 19
3.2 A/D轉換芯〗片與單片機的連接 19
3.3 時鐘電路 20
3.4 復位電路 20
用AT89C51的復位電路如圖3-4所示。當單片機一上電,立即復位。電容C3和電阻R1實現上電自動復位⌒ 。復位也是使單片機退出低功耗工作方式而進入正常狀態的一種操作。 20
21
圖3-4 復位電路 21
3.5 顯示電路 21
3.6 輸入電路 22
4系統的軟件設計 24
4.1 ADC0832選通設計 24
4.2 LCD顯示模塊部分 24
4.2.1基本操作程序 24
4.2.2 RAM地址映射圖 24
表4-1 對應關系 24
4.2.3狀態字說明 24
4.2.4數據指針設置 25
4.2.5顯示模式設置 25
4.2.6初始化設置 25
4.2.7其他設置 26
4.3 LCD顯示設計 26
4.3.1 地址鎖存器74LS373的設計 26
4.3.2 LCD顯示程序設計 26
5系統調試 27
5.1軟件調試 27
5.1.1 Proteus 簡介 27
5.1.2 Keil 簡介 27
5.1.3 Proteus與Keil連接調試 28
致謝 32
參考文獻 33
附錄 34
附錄1:總體電路圖 34
附錄2:源程序 35















