【正文】
畢 業(yè) 設(shè) 計 ( 論 文 ) 題 目: 電子密碼鎖的設(shè)計 學(xué) 院: 電氣與信息工程學(xué)院 專 業(yè): 電子信息工程 姓 名: 學(xué) 號: 093409142 指導(dǎo)老師: 陳 英 完成時間: 2021年 5 月 28 日 河南城建本科畢業(yè)設(shè)計(論文) 摘要 I 摘 要 隨著經(jīng)濟社會發(fā)展,人們生活水平的提高,如何實現(xiàn)家庭防盜這一問題也變的尤其的突出。傳統(tǒng)的機械鎖,由于其構(gòu)造簡單,安全性能低,無法滿足人們的需要。隨著電子產(chǎn)品向智能化和微型化的不斷發(fā)展,數(shù)字密碼鎖作為防盜衛(wèi)士的作用顯得尤為重要。而單片機以其實用,功能強大,價格低廉等功能,已成為電子產(chǎn)品研制和開發(fā)中首選的控制器。 本文從經(jīng)濟實用的角度出發(fā) ,闡述一個基于單片機的液晶顯示電子密碼鎖的設(shè)計與實現(xiàn)。系統(tǒng)采用 ATMEL 公司的 AT89C51 單片機作為系統(tǒng)核心, 液晶顯示器LCD1602 作為輸出設(shè)備顯示系統(tǒng)提示信息, 4*4 矩陣鍵盤作為輸入設(shè)備, CMOS 串行 E2PROM 存儲器 AT24C02 作為數(shù)據(jù)存儲器,配合蜂鳴器、繼電器等電路構(gòu)成整個系統(tǒng)硬件;系統(tǒng)軟件采用 C語言編寫。設(shè)計的系統(tǒng)液晶顯示,密碼修改方便,具有報警、鎖定等功能,使用便捷簡單,符合住宅、辦公用鎖需求,具有一定的實用價值。 關(guān)鍵詞: 單片機,密碼鎖, AT89C51, LCD1602, AT24C02 河南城建本科畢業(yè)設(shè)計(論文) Abstract II Abstract With the development of our society and the improvement of people’s living standard, how to ensure the family security is being more and more important in particular. Traditional mechanical lock is unable to meet the need of us because of its simple structure and low security. Nowadays, electronic products bee smarter and smaller, electronic password antitheft lock plays a more important role as the security guards. The MCU with its practical, strong function, low price and other functions , has bee the preferred controller in electronic product research and development. This article is written from the economic perspective, elaborates the design and implementation of a LCD electronic password antitheft lock which is based on MCU. This system is posed of AT89C51 which is designed as the core of this system, LCD1602 as the output device to display the message of this system, 4 * 4 matrix keyboard as the input device, a CMOS serial E2PROM AT24C02 as the data storage, and a buzzer, relay circuit. The software of the system is written in C language. The system displays in a LCD, it can change password easily, and has the function of alarming, locking, and so on. This system has some practical value, and it is simple and easy to use, meets the demand of residential and the need of office lock. Key Words: MCU, PasswordLock, AT89C51, LCD1602, AT24C02 河南城建學(xué)院本科畢業(yè)設(shè)計(論文) 目錄 III 目 錄 摘要 ................................................................. I Abstract ............................................................ II 目錄 ............................................................... III 1 引言 ............................................................ 1 課題的背景和意義 .............................................. 1 課題的研究現(xiàn)狀 ................................................ 1 課題研究內(nèi)容 .................................................. 2 2 數(shù)字密碼鎖總體設(shè)計 ................................................. 3 系統(tǒng)方案論證 .................................................. 3 采用數(shù)字電路的設(shè)計方案 ................................. 3 采用以單片機為核心設(shè)計方案 ............................. 4 基于單片機的數(shù)字密碼鎖的設(shè)計原理 .............................. 5 3 系統(tǒng)硬件設(shè)計 ....................................................... 6 主要元器件介紹 ................................................ 6 主控芯片 AT89C51 的的介紹 ................................ 6 繼電器的介紹 ............................................ 9 存儲芯片 AT24C02 的介紹 ................................. 10 LCD1602 顯示器的介紹 .................................... 10 矩陣鍵盤模塊的介紹 ..................................... 11 系統(tǒng)硬件部分 ................................................. 12 系統(tǒng)電源部分 ........................................... 12 鍵盤輸入部分 ........................................... 13 密碼存儲部分 ........................................... 14 顯示部分 ............................................... 14 報警部分 ............................................... 15 開鎖部分 ................................................ 16 4 系統(tǒng)軟件設(shè)計 ...................................................... 17 系統(tǒng)程序流程圖 ............................................... 17 主程序流程圖 ............................................ 17 鍵功能程序流程圖 ....................................... 18 修改密碼程序流程圖 ..................................... 19 開鎖程序流程圖 ......................................... 20 子程序舉例 ................................................... 21 按鍵掃描子程序 ......................................... 21 顯示子程序 ............................................. 22 開鎖子程序 ............................................. 22 系統(tǒng)軟件調(diào)試及結(jié)果 ........................................... 24 Proteus 軟件介紹 ........................................ 24 系統(tǒng)軟件調(diào)試 ........................................... 25 仿真結(jié)果 ............................................... 25 河南城建學(xué)院本科畢業(yè)設(shè)計(論文) 目錄 IV 5 硬件系統(tǒng)制作及調(diào)試 ................................................ 29 焊接注意事項 ................................................. 29 硬件調(diào)試問題及解決辦法 ....................................... 30 硬件調(diào)試效果 ................................................. 31 總結(jié) ................................................................ 34 致謝 ................................................................ 35 參考文獻 ............................................................ 36 附錄 ................................................................ 37 附錄 A 電 路原理圖 ................................................ 37 附錄 B 系統(tǒng)總體程序 .