【正文】
基于單片機的數(shù)字電壓表設計畢設論文 目 錄 設計總說明 1 Design General Information 2 1 緒論 4 11 課題的背景及意義 4 12 數(shù)字電壓表的簡介 4 2 系統(tǒng)的方案設計與論證 5 21 數(shù)字電壓表原理 5 22 數(shù)字電壓表設計要求 5 3 系統(tǒng)硬件結構設計 5 31 電源電路 6 32 單片機芯片選擇 7 AT89C51 主要特性 8 管腳說明 9 元 10 中斷 13 芯片擦除 15 結構特點 15 33 AD 轉換電路 16 TLC2543 的特點 16 TLC2543 的引腳說明 17 TLC2543 控制字 18 TLC2543 接口時序 20 34 顯示電路 22 35 復位電路 24 36 晶振電路 24 4 系統(tǒng)軟件設計 26 41 主程序流程圖 26 42 中斷程序流程圖 27 43 源程序 28 總 結 35 參考文獻 36 致 謝 37 附錄 A 38 數(shù)字電壓表電路原理圖 38 附錄 B 39 元件清單列表 39 基于單片機的數(shù)字 電壓表的設計 設計總說明 在當今的數(shù)字時代大到空間雷達地球衛(wèi)星定位系統(tǒng)移動通信計算機醫(yī)用斷層掃描設備小到家用計算機數(shù)碼影像設備數(shù)字錄音筆數(shù)碼微波爐等設備中數(shù)字技術與數(shù)字電路組成的數(shù)字系統(tǒng)已經(jīng)成為這些現(xiàn)代電子系統(tǒng)的重要組成部分數(shù)字電壓表正進入一個蓬勃發(fā)展的新時期一方面它開拓了電子測量領域的先河另一方面它本身正朝著高準確度智能化低成本的方向發(fā)展此外數(shù)字電壓表在安裝工藝外觀設計安全性可靠性等方面也在不斷改進日臻完善 數(shù)字電壓表 Digital Voltmeter簡稱 DVM它是采用數(shù)字化測量技術把連續(xù)的模擬量直流輸入 電壓轉換成不連續(xù)離散的數(shù)字形式并加以顯示的儀表現(xiàn)代數(shù)字電壓表按測量功能可分為直流數(shù)字電壓表和交流數(shù)字電壓表數(shù)字電壓表一般由模擬部分和數(shù)字部分組成模擬部分主要功能是獲取電壓并將其轉換為相應的數(shù)字量數(shù)字部分完成邏輯控制譯碼和顯示等功能數(shù)字電壓表的核心是 AD 轉換器由AD 轉換器工作原理的不同數(shù)字電壓表又可分為逐次比較型和雙積分型傳統(tǒng)的指針式電壓表功能單一精度低不能滿足數(shù)字化時代的需求采用單片機的數(shù)字電壓表由精度高抗干擾能力強可擴展性強集成方便還可與 PC 進行實時通信目前由各種單片 AD 轉換器構成的數(shù)字電壓表已被廣泛用 于電子及電工測量工業(yè)自動化儀表自動測試系統(tǒng)等智能化測量領域示出強大的生命力與此同時由 DVM 擴展而成的各種通用及專用數(shù)字儀器儀表也把電量及非電量測量技術提高到嶄新水平 數(shù)字電壓表作為數(shù)字技術的成功應用發(fā)展相當快數(shù)字電壓表以其功能齊全精度高靈敏度高顯示直觀等突出優(yōu)點深受用戶歡迎特別是以 A/ D 轉換器為代表的集成電路為支柱使 DVM向著多功能化小型化智能化方向發(fā)展 DVM應用單片機控制組成智能儀表與計算機接口組成自動測試系統(tǒng)本設計主要是以 AT89C51 單片機為核心包含數(shù)據(jù)采集模塊數(shù)據(jù)處理模塊和輸入輸出模塊能實現(xiàn) 05V 直流電壓測量數(shù)字顯示小數(shù)點顯示等能對電壓值較小的線路進行電壓值的測量具有較高的測量精度能滿足一般電子系統(tǒng)電壓測量要求留有可擴展的接口便于依據(jù)實際情況增加其他功能 Microcontrollerbased digital voltmeter Design General Information In todays digital age space radar global satellite positioning systems mobile munications puter medical tomography device as small as home puters digital imaging equipment digital voice recorder digital microwave ovens and other equipment digital technology and digital circuit consisting of digital systems has bee an important part of modern electronic systems The digital voltmeter is entering a vibrant new period of development on the one hand it opened up the first of its kind in the field of electronic measuring the other hand it in itself is moving in the direction of high accuracy intelligent lowcost development In addition the digital voltmeter in the installation process design safety reliability is also continuous improvement and improving Digital voltage meter Digital Voltmeter referred to as DVM it is the use of digital measuring technology the continuous analog DC input voltage into a noncontinuous discrete digital form and to display the instrument Modern digital voltmeter measurement functions can be divided into a DC digital voltmeter and AC digital voltmeter The digital voltmeter is generally by the analog part and digital part and analog part of the main function is to obtain the voltage and converts it to digital and digital part of the plete logic control decode and display The digital voltmeter is the core of the A D converter the device works is different from the digital voltmeter can be divided into successive parison type and a double integral A D converter Analog voltage meter features a traditional single low accuracy can not meet the digital age using the single chip digital voltage meter from the high precision antiinterference ability scalability Integrated convenience and PC can municate in real time At present by a variety of single A D converter consisting of digital voltage meter has been widely used in electronic and electrical measurement industrial automation instrumentation automated test systems intelligent measurement showing strong vitality At the same time the DVM extension to the various general and specific digital instruments but also the power and nonpower measurement up to a new level This chapter focuses on singlechip A D converter and they form by the microcontrollerbased digital voltmeter works Digital voltmeter as the successful application of digital technology the development is quite fast Digital voltmeter with a fullfeatured high precision high sensitivity and intuitive display outstanding advantages weled by users In particular the A D converter is represented by IC pillar DVM toward multifunction miniaturization intelligent direction DVM application MCU control posed of intelligent instrument puter interface posed of the automatic test system This design is mainly based on 51 series microcontroller core contains the data acquisition module data processing module and input output modules digital display measuring DC voltage decimal point display and overrange display Measurement of the voltage value of the smaller line voltage higher measurement accuracy can meet the general electronic system voltage measurement requirements leaving the scalable interface easy to add other functions based on the actual situation Keywords digital voltmeter A D converter voltage measurement 1 緒論 11 課題的背景及意義 數(shù)字電壓表在上世紀 50 年代初 60 年代末發(fā)起來的電壓測量儀表簡稱 DVMTLC2543TLC2543 是 TI 公司的 12 位串行模數(shù)轉換器使用開關電容逐次逼近級數(shù)完成 AD 轉換過程由于是串行輸入結構能夠節(jié)省 51系列單片機 IO資源且價格適中分辨率較高因此在儀器儀表中有較為廣泛的應用 在輸入輸出模塊中顯示部分可用三個 8 段數(shù)碼管構成其中分別顯示個位十分位百分位的大小 2 系統(tǒng)的方案設計與論證 21 數(shù)字電壓表原 理 現(xiàn)代數(shù)字電壓表按測量功能可分為直流數(shù)字電壓表和交流數(shù)字電壓表數(shù)字電壓表一般由模擬部分和數(shù)字部分組成模擬部分主要功能是獲取電壓并將其轉