【正文】
I 西安郵電大學畢業(yè)論文 基于單片機的簡易電子稱 作 者:梁忠濤 院 系:自動化學院 專 業(yè):測控技術(shù)與儀器 班 級:測控 1103 指導老師:周 有 英 文 摘 要 II 摘要 此次設(shè)計主要是 以單片機 AT89S52 為核心設(shè)計的 簡易 電子秤。本設(shè)計主要分為傳感器部分 、 單片機中央處理 部分、 LCD 顯示部分、 鍵盤輸入部分 。利用壓力傳感器采集信號, DS1602 顯示單價和質(zhì)量。輸出信號輸入到中央處理部分 AT89S52 的芯片 ,通過信號放大和 AD 轉(zhuǎn)換,編程對信號進行處理傳送到 1602 液晶顯示屏顯示相關(guān) 數(shù)據(jù),按鍵電路通過按鍵對單價進行設(shè)置。本設(shè)計結(jié)構(gòu)簡單,具有抗干擾能力強、成本便宜、可擴展性強等特點。 關(guān)鍵詞 :單片機 壓力傳感器 液晶顯示 電子秤 英 文 摘 要 II Topic: Hardware Design of Electronic Scale Based on Single Chip Microputer Cai Liming 20xx926068, Automation major Abstract This hardware design of electronic scale is mainly based on the 51 series singlechip AT89S52 as control core, realizes the basic control function of electronic scale. In the design of the system, in order to make better use of the modular design method, the design of each unit step function module, the hardware of the system can be divided into the smallest system, data acquisition, manmachine interface and power supply system four parts. Minimum system consists of AT89S52 and extension of the external data memory。 data acquisition part consists of pressure sensor, signal preprocessing and A / D conversion parts, includes an operational amplifier ADC0832。 manmachine interface for keyboard input and liquid crystal display, the main use of matrix keyboard and LCD1602 display, can easily input data and intuitive display value. Software design of singlechip C programming language, to achieve the design of the whole control function. The electronic scale can realize the basic function of weighing, weighing range for whole system has the advantages of simple structure, convenient use, plete function, high precision, has the certain development value. Keywords: microcontroller pressure sensor liquid crystal display electronic scale 目 錄 III 目 錄 第 1 章 引 言 ............................................................................................................................... 1 選題的目的和意義 ...................................................................................................... 1 目的 .....................................................................................錯誤 !未定義書簽。 意義 .....................................................................................錯誤 !未定義書簽。 研究現(xiàn)狀綜述 .............................................................................................................. 1 第 2 章 系統(tǒng)總體設(shè)計 ............................................................................................................. 4 系統(tǒng)設(shè)計要求 .............................................................................................................. 4 系統(tǒng)設(shè)計思想 .............................................................................................................. 4 設(shè)計要完成的任務(wù) ...................................................................................................... 5 第 3 章 .系統(tǒng)硬件電路設(shè)計 ....................................................................................................... 6 數(shù)據(jù)采集模塊電路的設(shè)計 ......................................................................................... 6 控制模塊的選型與研究 ........................................................................................... 12 選擇單片機 ....................................................................................................... 12 AT89S52 單片機芯片的學習 ......................................................................... 13 A/D 轉(zhuǎn)換器 ADC0832 與 AT89S52 單片機的接口電路 ...................................... 18 ADC0832 的介紹 ............................................................................................ 18 ADC0832 與單片機接口電路設(shè)計 ................................................................ 20 顯示模塊的設(shè)計 ....................................................................................................... 21 顯示模塊的選擇與介紹 ................................................................................... 21 LCD1602 與 AT89S52 單片機接口電路的設(shè)計 ........................................... 22 鍵盤電路與 AT89S52 單片機接口電路的設(shè)計 ...................................................... 23 鍵盤與單片機的連接方式選擇 ....................................................................... 23 單片機對鍵盤的掃描 ....................................................................................... 24 鍵盤接口和鍵輸入軟件中應(yīng)解決的一個問題 ............................................... 21 第 4 章 系統(tǒng)軟件程序設(shè)計 ................................................................................................... 24 主程序流程圖: .........................................................................錯誤 !未定義書簽。 AD 轉(zhuǎn)換流程圖 .........................................................................錯誤 !未定義書簽。 中 文 摘 要 IV 液晶顯示流程圖 .........................................................................錯誤 !未定義書簽。 單片機對矩陣式鍵盤接口處理過程如下圖所示: .................錯誤 !未定義書簽。 系統(tǒng)原理電路圖 ....................................................................................................... 27 第 5 章 結(jié) 論 .......................................................................................................................... 28 參考文獻 .................................................................................................................................. 29 致 謝 ....................................................................................................................................... 29 附錄:軟件程序設(shè)計 .............................................................................................................. 31 第 1 章 引 言 1 第 1章 引 言 選題的目的和意義如今,電子產(chǎn)品變得越來越豐富,給人們帶來了很多 很多的方便,其中電子秤成了人們生活中不可缺少的一部分。大大小小的市場電子秤能夠完成許多工作,為人們節(jié)省了時間,提高了工作效率。 電子秤不但能很精確的稱出商品的重量,還能去除皮重,累計所稱物品重量,輸入物品單價可快速的計算出金額,可以說非常的智能化,而且非常的精確。由此,顧客在購物的時候非常的放心,商家的效益也提高了,所以有了電子秤,顧