【正文】
洛陽理工學院畢業(yè)設計(論文) I 基于單片機的門 禁 系統(tǒng) 的 設計 摘 要 門禁系統(tǒng)采用 89C52 單片機作為控制核心,外圍加蜂鳴器控制電路、開門指示燈電路、電控鎖控制電路以及 LCD 液晶顯示電路等。門禁系統(tǒng)主要由 CPU、復位電路、電源指示電路、工作指示電路、振蕩電路、蜂鳴器電路、門控鎖電路、出門按鈕、讀卡模塊、顯示模塊等組成。該門禁系統(tǒng)采用射頻卡完成刷卡進門,按刷卡出門等功能。其 工作原理為:當刷卡時,蜂鳴器響一下,如卡權限獲得允許,顯示模塊顯示卡號,同時繼電器動作將門鎖打開,指示燈點亮,延時一段時間后繼電器再次動作將門鎖鎖閉,指示燈熄滅。當按 下出門按鈕時,繼電器動作將門鎖打開,指示燈點亮,延時一段時間后繼電器再次動作將門鎖鎖閉,指示燈熄滅。當輸入初始密碼時,若輸入正確,繼電器動作將門鎖打開,指示燈點亮,延時一段時間后繼電器再次動作將門鎖鎖閉。此外, 程序中還增加了射頻卡權限判斷的功能,當遇到合法卡時顯示卡號,門鎖打開,延時 5s 自動關閉,當遇到非法卡時不顯示卡號門鎖不開。本系統(tǒng)設計簡單、性能優(yōu)良,具有一定的實用性。 關鍵詞: 門禁,射頻卡,電控鎖,顯示,控制 . 洛陽理工學院畢業(yè)設計(論文) II Microcontrollerbased access control system design ABSTRACT Entrance guard system uses 89C52 single chip microputer as control core and periphery add a buzzer control circuit, open the door indicator light circuit, control circuit and control lock LCD display circuit, etc. Entrance guard system mainly by the CPU and reset circuit, the power indicative circuit, work instructions circuit, oscillating circuit, a buzzer circuit, door control circuit, go out and lock button reading card module, display module. The entrance guard system uses RF card plete charge take the door, according to credit to go out, and other functions. Its working principle is: when credit, a buzzer rang, such as card to be allowed to access, display module display card number, and at the same time relay action will open the door lock, indicator light, delay after period of time relay action will again only door lock, lights go out. When the press out button, the relay action will open the door lock, indicator light, delay after period of time relay action will again only door lock, lights go out. When the input password, if you input the correct, relay action will open the door lock, indicator light, delay after period of time relay action will lock door lock again. In addition, the program will also increase the RF card authority judgment function, when facing legal card showed the card number, door open, delay 10 s automatically shut off, when meeting the illegal CARDS don39。t show the card number locks don39。t open. The system is simple in design, good performance, and has practical value! KEY WORDS: Access control, Radio frequency card, Electronically controlled lock, Display, control . 洛陽理工學院畢業(yè)設計(論文) III 目 錄 前 言 ....................................................................................................... 1 第 1 章 概述 ............................................................................................ 3 方案的論述 ............................................................................. 3 方案的選擇 ...................................................................... 3 CPU 的選擇 ...................................................................... 4 射頻卡的選擇 ................................................................. 5 第 2 章 最小系統(tǒng)的設計 ........................................................................ 6 電路圖的系統(tǒng)設計 .................................................................... 6 最小系統(tǒng)的設計 ........................................................................ 7 89C52 的簡述 ................................................................... 7 單片機資源分配 ........................................................... 10 硬件電路原理圖的設計 ................................................11 第 3 章 硬件電路的設計 ...................................................................... 12 門控鎖電路設計 ...................................................................... 12 顯示模塊設計 .......................................................................... 12 1602 主要技術參數(shù) ....................................................... 13 引腳功能說明 ............................................................... 13 1602 指令集 .................................................................... 15 與 HD4478 相兼容的芯片時序表 ............................... 16 顯示模塊電路圖 ........................................................... 17 44 矩陣鍵盤電路設計 ........................................................... 17 蜂鳴器電路設計 ...................................................................... 18 讀卡模塊設計 .......................................................................... 19 控制指示燈電路設計 ............................................................. 21 第 4 章 門禁系統(tǒng)的軟件設計 ............................................................. 22 KeilC51 的概述 ........................................................................ 22 系統(tǒng)主程序及流程圖 ............................................................. 22 子程序流程圖 .......................................................................... 25 洛陽理工學院畢業(yè)設計(論文) IV 結 論 ..................................................................................................... 27 謝 辭 ....................................................................................................... 28 參考文獻 ................................................................................................. 29 附 錄 ..................................................................................................... 30 外文資料翻譯 ........................................................................................ 47 洛陽理工學院畢業(yè)設計(論文) 1 前 言 隨著科學技術的發(fā)展和企業(yè)管理模式的日趨成熟,高度科學化的企業(yè)管理已成為企業(yè)生存的有力保障。 出入口門禁安全管理系統(tǒng)是新型現(xiàn)代化 安全管理系統(tǒng),它集微機 自動識別技術 和現(xiàn)代安全管理措施為一體,它涉及 電子 ,機械,光學, 計算機 技術,通訊技術, 生物 技術等諸多新技術。它是解決重要部門出入口實現(xiàn)安全防范管理的有效措施。適用各種機要部門,如銀行、 賓館 、機房、軍械庫、機要室、辦公間 ,智能化小區(qū),工廠等。 在 數(shù)字技術 網(wǎng)絡技術飛速發(fā)展的今天,門禁技術得到了迅猛的發(fā)展。門禁系統(tǒng)早已超越了單純的門道及鑰匙管理,它已經(jīng)逐漸發(fā)展成為一套完整的出入管理系統(tǒng)。它在工作環(huán)境安全、人事考勤管理等 行政管理工作 中發(fā)揮著巨大的作用。它具有以下特點 [1]: 1. 系統(tǒng)的實用性 門禁系統(tǒng)的功能應符合實際需要 , 不能華而不實。如果片面追求系統(tǒng)的超前性 , 勢必造成投資過大 ,離實 際需要偏離太遠。因此 , 系統(tǒng)的實用性是首先應遵循的第一原則。同時,系統(tǒng)的前端產(chǎn)品和系統(tǒng)軟件均有良好的可學習性和可操作性。特別是可操作性(便捷性) ,使具備電腦初級操作水平的管理人員,通過簡單的培訓就能掌握系統(tǒng)的操作要領,達到能完成值班任務的操作水平。 2. 系統(tǒng)的安全性 門禁系統(tǒng)中的所有設備及配件在性能安全可靠運轉的同時 , 還應符合中國 或國際有關的安全標準 , 并可在非理想環(huán)境下有效 工作。強大的 實時監(jiān)控 功能和聯(lián)動報警功能,充分保證使用者的環(huán)境的安全性。 3