【正文】
I 摘 要 隨著人們生活水平的提高,如何實(shí)現(xiàn)家庭防盜這一問(wèn)題也變得尤為突出。在科學(xué)技術(shù)不斷發(fā)展的今天,電子密碼防盜鎖作為防盜衛(wèi)士的作用顯得日趨重要。 本文從經(jīng)濟(jì)實(shí)用的角度出發(fā),系統(tǒng)由 STC89C52與低功耗 CMOS 型 E178。PROM AT24C02 作為主控芯片與數(shù)據(jù)存儲(chǔ)器單元,結(jié)合外圍的鍵盤(pán)輸入、 LCD 顯示、報(bào)警、開(kāi)鎖等電路模塊。它能完成以下功能:正確輸入密碼前提下,開(kāi)鎖;錯(cuò)誤輸入密碼情況下,報(bào)警;密碼可以根據(jù)用戶(hù)需要更改。用 C 語(yǔ)言編寫(xiě)的主控芯片控制程序與 EEPROM AT24C02 讀寫(xiě)程序相結(jié)合, 并用 Keil 軟件進(jìn)行編譯,設(shè)計(jì)了一款可以多次更改密碼,具有報(bào)警功能的電子密碼控制系統(tǒng)。 本密碼鎖具有設(shè)計(jì)方法合理,簡(jiǎn)單易行,成本低,安全實(shí)用,保密性強(qiáng),靈活性高等特點(diǎn),具有一定的推廣價(jià)值。 關(guān)鍵詞 :電子密碼鎖;報(bào)警;液晶顯示 II Design of Electric Password Lock Based on MCU Abstract As people39。s living standards improve, the question how to achieve home security has bee particularly prominent. In science and technology is developing continuously, electronic code lock as a security guard39。s role is increasingly important. This article from the economical point of view, the system by the STC89C52 with low power CMOS based E 178。 PROM AT24C02 as the master chip and the data memory unit, bined with the external keyboard, LCD display, alarm, unlock and other circuit modules. It performs the following functions: enter the password correctly under the premise of unlocking。 wrong password case the alarm。 password can be changed according to user needs. Master in C language control program and EEPROM AT24C02 chip to read and write process are bined and piled with the Keil software, designed a number you can change the password, the password with an electronic alarm control system. The lock has a reasonable design, simple, low cost, safe and practical, confidentiality, flexibility, and high, with some promotional value. Key Words: Electric Password lock。Alarm。 LCD Display III 目 錄 引言 ............................................................................................................................................................... 1 第 1章 緒論 ........................................................................................................................................... 2 電子密碼鎖的背景與研究意義 ............................................................................................. 2 電子密碼鎖的現(xiàn)狀及發(fā)展趨勢(shì) ............................................................................................. 2 本章小結(jié) .......................................................................................................................................... 4 第 2章 系統(tǒng) 整體方案設(shè)計(jì) ............................................................................................................. 5 設(shè)計(jì)目標(biāo) .......................................................................................................................................... 5 主控部分的選擇 ........................................................................................................................... 5 密碼輸入方式的選擇 ................................................................................................................. 5 本章小結(jié) .......................................................................................................................................... 6 第 3章 硬件系統(tǒng)設(shè)計(jì) ....................................................................................................................... 7 系統(tǒng)芯片介紹 .................................................................................................................................... 7 單片機(jī) STC89C52 功能介紹 .................................................................................................. 7 LCD1602 顯示器介紹 ................................................................................................................ 8 存儲(chǔ)芯片 AT24C02 介紹 .......................................................................................................... 9 I2C 總線介紹 ................................................................................................................................. 9 硬件電路設(shè)計(jì) .............................................................................................................................. 11 復(fù)位電路 ....................................................................................................................................... 11 晶振電路 ....................................................................................................................................... 12 存儲(chǔ)電路 ........................................................................................................................................ 12 鍵盤(pán)輸入電路 ............................................................................................................................. 13 顯示電路 ....................................................................................................................................... 14 電源輸入電路 ............................................................................................................................. 15 報(bào)警電路 ....................................................................................................................................... 15 開(kāi)鎖電路 ....................................................................................................................................... 16 本章小結(jié) ........................................................................................................................................ 17 第 4章 軟件程序設(shè)計(jì) ....................................................................................................................... 18 主程序流程圖 ................................................................................................................................ 18 按鍵軟件設(shè)計(jì) .............................................................................................................................. 18 按鍵功能程序流程圖 ............................................................................................................