【编者按】网学网自动化PLC相关毕业设计频道为大家收集整理了“门禁监控系统“提供大家参考,希望对大家有所帮助!
论文编号:DQ352 论文字数:11252,页数:26
摘 要
门禁监控系统是楼宇自动化系统的一部分,它是一种综合性,涉及到电子、机械、计算机、通信、生物仿真学等多学科的技术。在联网式门禁控制系统中,通常要实现实时现场控制。由于门禁控制器本身数据存贮容量和数据处理能力都比较低,所以一般情况下要通过串口通讯使控制器与上位机相连,把所采集到的数据传送到上位机,再在上位机上进行数据处理。
在文章中介绍了现在工业上最常用的两中串行通讯接口:RS-232和RS-485通讯接口。并介绍了在门禁控制系统中通过单片机做下位机,再经过MAX485芯片转换为RS-485通讯串口,在将转换过的485信号经RS-232/RS-485转换器,转换为RS-232通讯串口信号,实现与PC机通信,以实现远距离通讯的要求。
关键词: 门禁控制系统;串行通信;RS-232/RS-485转换器
Abstract
That entrance guard monitors system is building world automatic system part , it is one kind of comprehensiveness , deals with multidisciplinary technologies such as electron , machinery , computer, communicate by letter , living things study of emulation. Naval is middle in dyadic networked entrance guard , the real time scene controls generally essential points realization. Self controller data stores capacities and the data-handling capacity all comparatively low because of entrance guard , needing to pass string communication makes the controller and super ordination machine be linked together therefore under ordinary circumstances, the data transfer what be collected is arrived at arrives at super ordination machine , carries out a data handling again on super ordination machine.
Have introduced that industry goes to the two in common use middle serial communication interface now in article: RS-232 and RS-485 communication interface. The monolithic machine having introduced that naval middle passes in entrance guard composes place machine down and , the chip changes into RS-485 communication string again process MAX485 before 485 signals will have change pass through the RS-232/RS-485 converter, change into RS-232 communication string signal , realize the request communicating by letter with PC machine, to realize remote communication.
Keywords:access control system ;Serial Communication; RS-232/RS-485 converter
目 录
摘要……………………………………………………………………………. . .……………..I
Abstract…………………………………………………………………………….Ⅱ
目录……………………………………………………………………………………………..Ⅲ
1 前言…………………………………………………………………………………………..1
2 门禁控制系统……………………………………………………………………………. . .2
2.1 门禁系统的概念………………………………………………………………….……2
2.2 门禁系统的组成………………………………………………………………….... . .2
2.3 门禁系统的功能……………………………………………………………………….3
2.4 门禁系统的发展……………………………………………………………………….3
3 串行通讯………………………………………………….………………………………...5
3.1 RS-232串行通讯………………………….………………………………………….5
3.2 RS-485串行通讯……………………………….……………………………….……6
3.3 通讯协议………………………………………………………………………………7
3.3.1 数据的传输速度………………………………………………….……..……..7
3.3.2 数据的发送单位……………………………..…………………………………7
3.3.3 起始位和停止位…………………………………………………..……………8
3.3.4 校验位的检查………………………………………………………………….8
3.3.5 模式和流量…………………………………………………………………….8
3.3.6 错误预防…………………………………………………………………….…9
4 硬件设计…………………………………………………………………………….……..10
4.1 AT89C51单片机介绍.………………………………………………………………10
4.1.1晶振和复位电路……………………………………………………………….11
4.1.2 单片机程序……………………………………………………………………12
4.2 RS-232/RS-485转换…………………………………………………………………12
4.3 RS-232和RS-485接口……………………………………..……………………….12
4.4 RS-232和RS-485转换电路设计………………………………..............13
4.4.1 RS485接口芯片介绍. ………………………………... ……………....13
4.4.2 RS232/RS485转换电路设计………………………………... ……………14
5 上位机串口通讯实现………………………………….………………………………..16
5.1 MSComm控件………………………………………………………………………16
5.1.1 工作方式………………………………………………………………………..16
5.1.2 属性说明………………………………………………………………………..16
5.2 上位机流程图………………………….……………………………………………..18
5.3 上位机VB程序……………………….……………………………………………..18
6 下位机串口通讯实现……………………………………………………. . .…………..20
6.1 C语言………………………………………..…………………………………………20
6.1.1 C语言编程的特点……………………..………………………………………..20
6.2 下位机流程图…………………………………………………………………….….21
6.3 下位机程序…………………………………………………………………………..22
7 总结………………………………………………………………………………………...24
致谢……………………………………………………………………………………………...25
参考文献………………………………………………………………………………………….26